Do you like my tutorials?

Then consider supporting me on Ko-fi

Talking about Actionscript 3, Flash and Reviews.

Every Flash developer is facing security risks because of the fairly easy ways an Adobe Flash SWF file can be decompiled and reverse engineered. Without protection, anyone can easily reconstruct your SWF files stealing your work.

I already blogged about Flash Thieve and SWF Protector as a remedy, but this time I want you to know there is an online solution to protect your SWF files: SWFLOCK

SWFLOCK main features are:

* Protection of your valuable sourcecode
* Domain Lock
* Allow users to run the SWF file for a given trial period only
* Protect the SWF file with a password

Protecting a SWF file is very easy: select the type of service among the free (with a watermark) and a premium one (without watermark) at $4.99 per file

Then choose the options: preloader and domain lock in my case

Finally upload and download the file (warning: you will get the same filename as the file you uploaded… it would be better to add someting like “_protected” to the file you download).

I tried to decompile it with a common decrypter tool, and once loaded I realized that the domain lock worked…

Then when I opened the source code, that’s what I got:

//class Main
package 
{
    import flash.display.*;
    import flash.system.*;
    import flash.utils.*;
    
    public class Main extends flash.display.Sprite
    {
        public function Main()
        {
            var loc3:*=0;
            this.Content = Main_Content;
            super();
            var loc1:*=new this.Content();
            if (loc1) 
            {
                loc1.uncompress();
                loc3 = loc1.length;
                for (;;) 
                {
                    var loc4:*;
                    loc3 = loc4 = loc3 - (64 >= 0);
                    if (!loc4) 
                    {
                        break;
                    }
                    loc1[loc3] = loc1[loc3] ^ 32 % 8;
                }
            }
            var loc2:*=new Loader();
            loc2.loadBytes(loc1, new LoaderContext(false, new ApplicationDomain()));
            this.addChild(loc2);
            return;
        }

        private var Content:Class;
    }
}

Definitively not my code, and I could not my find my assets too… probably hidden somewhere around the web.

A good choice if you don’t have to protect a large number of files (unless SWFLOCK provides price plans for large number of protections) or you want to protect your sprites too.

Never miss an update! Subscribe, and I will bother you by email only when a new game or full source code comes out.