Getting Started

Download your copy of AssetsProtector and extract the ZIP archive.
Inside the archive you will find the following files and folders:


Develop your project as usual with non-protected assets. The only thing you have to consider at this stage is to use the provided AssetsLoader Class for the assets loading and handling.
Once you want to deploy your project and protect your resources run the ProtectorMachine tool, select the according resources you want to protect and set the main SWF which will be preloaded first. Then select an output folder, a HTML template and choose a password.
All assets will be copied to the given target folder and also the ProtectorAgent.swf and an index.html will be created in the root of the targer folder.
The AssetsLoader Class will auto-detect wheter the loaded resources are protected or not.


After installing the ProtectorMachine Air tool you have two options to protect your assets, use the GUI Mode or use the
Command Line Mode .

GUI Mode
The following image shows the main parts of the ProtectorMachine tool.

Menu (1)
File Menu - Create a new project, save and load a project (not avaible in the free version), show the HTML templates folder.
Help Menu - Get help, register free version, check for updates

Assets List (2)
Shows all resources which shall be protected.

Select Root Folder (3)
All files within this folder will be added to the Assets List. By default all files in subfolders will also be added. In the "Exclude Dialog" you have the possibility to define file filters or disable the scanning of subfolders.
You can also drag'n'drop the root folder on to the interface.

Exclude (4)
You can define file filters to explicit prevent those files from being added to the Assets List e.g. "expressInstall.swf".
Additionally you can exclude file types e.g. fla,html etc. and subfolders.

Set As Main SWF (5)
Select your project's main SWF file in the Assets List which will be preloaded first by the ProtectorAgent.

Select Output Folder (7/8)
Defines the target folder to which all assets and the ProtectorAgent will be copied after the protection process.

HTMLTemplate (9)
Choose a HTML template to embed your project. By default two templates are provided. The "standard" <object> and the SWFObject method. You can use your own templates - just add a your custom template to a new folder in the HTML templates directory .
Further reading...

Preloader (10)
Customize the appereance of the built-in preloader or define a custom preloader SWF.

Password (11)
Set the password for your project.

Protect! (12)
Press this button to launch the protecting process.

Command Line Mode (not avaible in the free version)
ProtectorMachine provides you a command-line interface that can be used for batch execution and build process integration.

The general syntax is
ProtectorMachine option value

By default the ProtectorMachine executable could be found at

C:\Program Files (x86)\ProtectorMachine\ProtectorMachine.exe



These options are available:

-pf Loads a project file
-pf myProtectedProject.aprot
The following options will overwrite the settings stored in a project file
-rf Defines the root folder
-rf C:\Projects\MyProject\bin
-of Sets the output folder
-of C:\Projects\MyProject\bin-protected
-m Sets the project's main SWF file
-m C:\Projects\MyProject\bin\main.swf
-pw Password
-pw 12345abc
-t Defines the HTML template. The value has to be the name of template folder.
-t Standard
-ef Exclude files filter - files have to be separated with a comma
-ef decompileMe.swf,ripMe.png,useMe.xml
-eft Exclude file types - file extensions have to be separated with a comma
-eft fla,js,php,html
-es Exclude subfolders (0 or 1)
-es 1
-pfc Preloader font color
-pfc FF0000
-pfs Preloader font size
-pfs 28
-ps Preloader Source / Custom Preloader
-ps C:\Projects\MyProject\preloader\CustomPreloader.swf
-log Define a log file where the ProtectorMachine can log its status. Unfortunately Air currently doesn't support prompting to the console.
-log C:\Projects\MyProject\logs\protect.log

ProtectorMachine.exe -pf myProtectedProject.aprot -es 1 -pw newPassword

AssetsLoader SWC

Include the AssetLoader SWC in your project to smoothly load and management your resources - protected or not.
The AS3 documention for the AssetLoader Class could be found here.
To include the SWC please see the following instructions:

Flash CS4 or higher
1. Open your FLA.
2. Select File > Publish Settings or Press Ctrl + Shift + F12, Publish Settings window will Popup.
3. Click on Settingsā€¦ and Select Library path

4. Click the + Button and add the AssetsLoader SWC path.

1. In Project View locate the AssetsLoader.swc

2. Right-Click on it and select "Add To Library"


The ProtectorAgent is the project's initial preloader and loads the specified main SWF. Everytime you protect your resources a new and unique version of the ProtectorAgent is created and saved.

Adding Custom HTML Templates

You can add your own custom HTML templates or modify the default ones to fit them to your needs.
The templates are structured in subfolders. When protecting all files and folders in this template folder will be copied to the target location.
The base template folder could be found under



Or in the ProtectorMachine tool select "File/Open Templates Folder..."

There are three important placeholders you have to add to your template. These placeholders are then replaced when protecting your assets: