# Quick Tip: Protect Your ActionScript Code Using AS3Obfuscator

##### Tutorial Details
• Difficulty: Beginner
• Program: Flash
• Estimated Completion Time: 15 mins

There are many tools for decompiling and converting SWF files to Fla and/or revealing your source code. There isn’t a 100% effective way to protect your application against this, but with AS3Obfuscator you can go a long way. Read on to find out how!

## Step 1: What is AS3Obfuscator?

AS3Obfuscator is an application that lets you obfuscate your ActionScript source code, making it difficult to read when decompiled.

## Step 2: How it Works

AS3Obfuscator will modify the identifier names such as variables, instance names, functions, constants, etc. to random characters in order to break the logic of your code, making it really hard to read.

The application window presents a series of options that you can edit to obtain a determined level of obfuscation. It may appear difficult to use at first due to the many options it has, but as soon as you start playing with it you will notice that it is actually very user friendly.

## Step 3: Features

As you know, the main feature of this application is the code obfuscation, but let’s take a look at the main options:

• Change identifier names, you can choose which types will be modified.
• String Encryption (optional)
• Obfuscates FLA and AS files.
• Preview of the code that will be modified
• Maintains the original files/code

## Step 4: Where Can I Get It?

You can download a free 90 days trial version via the as3obfuscator website or purchase a copy for \$30. The trial version is very functional and has just a few restrictions on the number of files and obfuscations it can make.

## Step 5: Obfuscate!

Download the trial version and try the application, take for instance this example of my Detect Flash Player Version tutorial, although you can understand that TextFields are displaying some Capabilities info, you will have a hard time reading a full featured game, for example.

package
{
import flash.display.Sprite;
import flash.system.Capabilities;

public class f0xuh8iV extends Sprite
{
public function f0xuh8iV():void
{
AbAon80w.text = Capabilities.version;
hl1i3uH9.text = Capabilities.os;
uoHTyUjK.text = Capabilities.isDebugger ? acAJaAwM.UfsBsq4D(0,18) : acAJaAwM.UfsBsq4D(1,19);
}
}
}


## Conclusion

Depending on the way you work and where your applications end, you may have the need of a source code obfuscator in order to protect your code from being stolen, give AS3Obfuscator a try!

For more information on protecting your source code, check out this previous Activetuts+ tutorial: Protect Your Flash Files From Decompilers by Using Encryption.

Tags: Tips
• JeremyC

First to comment! Woot!

Awesome article, very in-depth and well explained!

• http://gotomultimedia.com goTo!

Well, it really doesn’t matter or at least for Activedeners who have to deliver all source code :(

• http://jaredivory.com IamFace

Yes, for our ActiveDen files, but personal projects and even client project it would work great for.

• http://nvmind.com Paco

I actually didn’t know a tool like this existed. Nice, I like the idea.
I was actually a bit worried about that aspect.
Thanks.

• http://active.tutsplus.com/author/konstantin-serov/ Konstantin Serov

There’s actually many tools like this. I prefer SWF encrypt, which also turns the code into something human-unreadable.

• Luke

My browser is giving me a malware warning on the as3obfuscator site.

• kober

I have used for flash games “Flash Secure Optimizer” from eramsoft.com