First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Alexandre Chevalier | Website:
Protect Flash:How to Protect SWF from Flash decompilers?

How to protect ActionScript code from Flash decompilers?

To protect ActionScript code inside your SWF files you can use SWF Protector by DComSoft.

Step 1.

Retrieve the installation package of SWF Protector from the official vendor`s website. Depending on OS type you use, download installation package for Windows, Mac OS X or Linux;

Step 2.

Install SWF Protector following installation steps;

Step 3.

After installation process is complete, launch SWF Protector;

Step 4.

Choose one of the available protection modes: Simple or Advanced.


When working in Simple mode, SWF Protector uses default protection algorithms, depending on the version of ActionScript in SWF file, both for standard and author scripts.

In case when SWF file contains AS 2.0, "Mask script" and "Mix script" algorithms are applied.
"Mask script" is an effective method to conceal code and doesn't lead to file size increase.
"Mix script" mixes the source code. This method is rather effective, but leads to file size increase. That is why SWF Protector offers an option to set the intensity of this method. In Simple mode the intensity for AS 2.0 files is 50% by default.

For SWF files with AS 3.0 "Protect" and "Obfuscate" algorithms are used.
"Protect" method modifies the scripts in such way that SWF files can play in Flash player, but cannot be decompiled.
"Obfuscate" method renames variables and other objects. It doesn't protect file from decompilation, but makes the code impossible to use for further compilation.

Simple mode use in SWF Protector - reliable ActionScript obfuscator
Imgage 1 - Simple mode use in SWF Protector - reliable ActionScript obfuscator

When using "Mix script" you can leave the default intensity value which is 50% or choose other using the slider. Note, that the lesser the intensity, the lesser the file size; however the protection security level is lower in this case.
Note 1: If "Mix script" is set to minimum, this protection method won't be applied.
Note 2: In order to decrease the resulting file size it is recommended not to use "Mix script" and methods for standard code. In this case however, the protection will be less reliable.
» Level Advanced

Added: 2010-04-01
Rating: 10 Votes: 3
(10 being the highest)
» Author
DComSoft evangelist SWF Protector 2.0
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.