SWF Protection Frequently Asked Questions


I got a runtime access violation error when I launch the software, what should I do?

This may occur if you did not install Adobe Flash Player in Internet Explorer. Please launch Internet Explorer, visit http://www.adobe.com/products/flashplayer/, and then install the Adobe Flash player. After  installation, restart the software, the problem will be fixed. You may also need to restart your computer.

Does your software run on Windows 7?

Yes. It works on all Windows systems, including Windows 2000, 2003 Server, XP, Vista and 7, both 32 bits and 64 bits.

After protection, my SWF file does not load external image, SWF and XML files? What should I do?

After protection, the address of the SWF file will be changed, and the address relative to the SWF file will also be changed. If you are using a relative file address in your Flash design, it may not work anymore.

For example, if you are using a sentence like this:

var myfile = "music.mp3";

Before protection, this file will address to the "music.mp3" in the same folder as your SWF file. But after protection, it will not work. You now need to get the full URL address of your SWF file, and calculate its full URL address.

The ActionScript 3 codes are as following:

function getSWFFilePath()
{
var pathURL:String = stage.loaderInfo.loaderURL;
var suffixPos:int = pathURL.indexOf("/[[DYNAMIC]]/");
var resultURL:String = (suffixPos > 0)? pathURL.substr(0, suffixPos) : pathURL;
suffixPos = resultURL.lastIndexOf("/");
resultURL = (suffixPos > 0) ? resultURL.substr(0, suffixPos) : resultURL;
resultURL = resultURL + "/";
return resultURL;
}
var myfile = getSWFFilePath() + "music.mp3";

The ActionScript 2 codes are as following:

function getSWFFilePath()
{
var pathURL = _root._url;
var suffixPos = pathURL.indexOf("/[[DYNAMIC]]/");
var resultURL = (suffixPos > 0)? pathURL.substr(0, suffixPos) : pathURL;
suffixPos = resultURL.lastIndexOf("/");
resultURL = (suffixPos > 0) ? resultURL.substr(0, suffixPos) : resultURL;
resultURL = resultURL + "/";
return resultURL;
}
var myfile = getSWFFilePath() + "music.mp3";

How can I get the current URL address of SWF file?

In Actionscript 3, we normally use stage.loaderInfo.loaderURL to get the URL address of current Flash SWF file. In ActionScript 2, we use _root._url to the get this value. But in a protected SWF file, this value will be changed.

For example, before protection, the value is as following:

http://www.magichtml.com/test/test.swf

But in a protected SWF file, the value will be

http://www.magichtml.com/test/test.swf/[[DYNAMIC]]/1/[[DYNAMIC]]/2

You may use following function to remove the redundant suffix.

For ActionScript 3:

function getSWFLocation()
{
var pathURL:String = stage.loaderInfo.loaderURL;
var suffixPos:int = pathURL.indexOf("/[[DYNAMIC]]/");
var resultURL:String = (suffixPos > 0)? pathURL.substr(0, suffixPos) : pathURL;
return resultURL;
}

For ActionScript 2:

function getSWFLocation()
{
var pathURL:String = _root._url;
var suffixPos:Number = pathURL.indexOf("/[[DYNAMIC]]/");
var resultURL:String = (suffixPos > 0)? pathURL.substr(0, suffixPos) : pathURL;
return resultURL;
}

Why do I need to encrypt my SWF files?

Adobe Flash SWF comes with open format or open specification, that means, it does not have any native protection for its content.

With a piece of Flash Decompiler or SWF Decompiler software, normally just costs about $50, anyone, even without any SWF specification knowledge, can easily crack your Flash SWF file, peek at your Actionscripts, copy your images, sounds and movies. With the decompiler software, they can even convert your Flash SWF to original FLA source file, modify and redistribute it as its their own.

SWFProtection can stop all Flash decompilers, thus helps you protect your valuable design, hard working and intellectual properties from being stolen.

Is SWFProtection another Actionscript Obfuscator?

No. Before the release of Actionscript 3 and Flash 9, the only way to protect SWF is Actionscript obfuscation. Actionscript obfuscation can protect Actionscripts to some extent, but there are three drawbacks. Firstly, it can only protect Actionscripts, it does nothing with other SWF resources, such as images, sounds, buttons and movies. Secondly, most Actionscript obfuscators work well with Actionscript 2, but for Actionscript 3, the result is not so good. Thirdly, most obfuscators come with a lots of options, you need to figure out and configure the options carefully to avoid ruining your Actionscripts.

SWFProtection uses a new capability of Flash 9 and Actionscript 3, it encapsulates your whole SWF file into a ByteArray based data structure, then encrypts the data and embeds it into a new Flash SWF file. In this way, your SWF file is protected as whole, so all resources including Actionscripts, images, sounds, sprites and movies will be encrypted. SWFProtection also enhances the encryption further with Actionscript obfuscation.

Will SWFProtection protect my SWF resources (images, sounds, sprites, buttons, movies)?

Yes.

SWFProtection uses a new capability of Flash 9 and Actionscript 3, it encapsulates your whole SWF file into a ByteArray based data structure, then encrypts the data and embeds it into a new Flash SWF file. In this way, your SWF file is protected as whole, so all resources including Actionscripts, images, sounds, sprites and movies will be encrypted. SWFProtection also enhances the encryption further with Actionscript obfuscation.

Is the encrypted SWF file 100% secure?

SWF Protection can protect your Flash SWF file from all decompiler software on the market.

But Adobe Flash SWF is a kind of open format file, so theoretically, there is no 100% secure in SWF protection. A cracker, if he or she is smart enough, knowledgeable enough, persistent enough and with time enough, can crack any encryption manually. What we can do is increasing the difficulties of cracking, so crackers have to stop cracking, because it's beyond their abilities or it's not worth it, due to the time and expense of cracking are much longer and bigger than designing the Flash by themselves.

SWFProtection is a perfect combination of Actionscript obfuscation, data encryption and ByteArray based data embedding technology in Actionscript 3, it gives the best protection for your Flash SWF file, also your valuable design, hard working and intellectual properties from being stolen.