There are some tools that try to help with this, but, general rule-of-thumb. If you put it out there and someone wants it, they can get it, and there is nothing you can do about it but put small roadblocks in their way. True, roadblocks will stop many people, but there is nothing that can stop everyone.
Why is it that you want to protect your SWFs from decompilation?
Actually it was a project assigned to me. So i am in research to know more about this topic. Are you sure that this is not possible? Can we protect atleast our code. What is the road block that you said in ur repy? Can you give me some more explanation about this. Then i can convince others that protecting swf is not possible.
Thanks and Regards,
For stand alone applications built with Flash mProjector from Screentime Media actually encrypts all your SWFs, AFAIK for web based projects the best you can do is run your SWFs through and obfuscator.
for more on mProjector visit
Yes, as mantissao states, the best you can do for a SWF is to run it through an Obfuscator.
Google: Actionscrip Obfuscation and you will find some products to do this.
What it does is change the Actionscript in the SWF to make it "unreadable" by decompilers. In practice, what happens is this: Decompilers update constantly to work around any problems arising from new obfuscation techniques, and then new obfuscation techniques are created to stop the new decompilers. In the end, a decompiled SWF that was obfuscated becomes difficult to parse through, as all variable names are random strings of text, but not impossible.
Otherwise, the only method you can use is a streaming server (Adobe FMS, Red5, Wowza, etc) and offload all important Actionscript to the server. This would be reliable in protecting that Actionscript, but may not be worth the time and effort of setting it up. Plus, this is overkill if the only goal is to protect some "proprietary" code.