Pls. suggest how can we protect ur flash work from swf catchers.

thnx,

you cant, they need to able to download it to watch it

If you want to protect it, don't put it on the Internet.

I predict the end of the concept of "intellectual property" within a few years.

Member Avatar for GreenDay2001

If you mean that you dont want others to download and watch your swf files, then yes, you could save it, indirectly though. Basically they will download it, but wont be able to watch it. Firstly you could check whether the domain in which the swf movie is running is allowed using LocalConnection object. This is probably used extensively by Flash game sites. Here's how you could implement it.

var loc:LocalConnection = new LocalConnection();
var domain:String = loc.domain();

if (domain == "www.yoursite.com") {
    gotoAndPlay("start");
} else {
    gotoAndPlay("access_denied");
}

And you could check in which player are you running this swf file using System.capabilities.playerType
For Example:

var player:String = System.capabilities.playerType;
if( player == "ActiveX" )  
    gotoAndPlay("start");
else
    gotoAndPlay("access_denied");

And to prevent your swf from being decompiled, use any SWF Encrypters. However, as far as I know it would only encrypt your ActionScript, your sound and movies will still be readable.

thanks a lot for your great solution.

thnx,

There are several swf encryption programs.

Google swf encryption

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.