Monday, October 27, 2014

How to prevent Flash stealling content

If someone steal your flash content and use to his own website you can redirect his website to yours by using below script into your flash project.

Suppose your domain is www.abc.com and other domain name is www.def.com or anything. Just use below script into your flash file.

import flash.events.Event;
var webOne = navigateToURL(new URLRequest("http://www.abc.com"), "_self");
var webTwo = navigateToURL(new URLRequest("http://www.def.com"), "_self");

content.addEventListener(Event.ENTER_FRAME, fl_ClickToGoToWebPage);

    function fl_ClickToGoToWebPage(event:Event):void

    {
       
        if(!webOne){
           
            webOne;
        }
       
    }
That's it.............Thanks