Because SWF is an open format, if someone wants to peek at your scripting and extract your resources, they can easily do so. It’s very interesting that on the header and sidebar of Ntt.cc, you can find two our sponsor banners: ActionScript Obfuscator and Flash Decompiler, the first one which can encrypt your swf files, stop Flash decompiler and protect your ActionScript. The second one which can decompile the flash file: convert SWF to FLA.
In fact, not only Flash, but also the other language like java, .Net even C++, decompilers are a real worry for developers in the software world.
Decompilers have a checkered reputation from an ethical standpoint. But some Flash developers believe that they encourage plagiarism, while others believe that Flash code should be viewed and shared freely, much like HTML source on a Web page.
We don’t plan to discuss which is RIGHT here, if you stand on it should be protected, if you’ve spent many hours creating some cool or innovative Flash contents, all resources include the images, sound, and Actionscript code can easily be “ripped”, it would not be a good news. So, how can you try your best to protect your Flash source code and resource?
Fortunately, protecting your Flash applications is easy today with a variety of tools available. Of course, most of them are paid tools. But there are also many other ways to protect your work. Following is some tutorials about how to protect your SWFs.
The answer to the question in the title of this article is: "no way". At least no way to me. By proper tools, I can decompile any SWF.
So, do not incorporate important information in the SWF. Do not include your personal account or password in the SWF.
I will briefly discuss the history of "protection" technique and how they failed. Then I would discuss how at best we can do. In Chinese old says: "A way able to protect from gentleman but not from professional theft".
This tutorials was writen 2004, it’s very old but I think you can learn many things from here. The author told you there was no way to protect your SWFs from decompilers, but told you how at best you can do.
Decompilers are a real worry for people who create Flash content. You can put a lot of effort into creating the best game out there, then someone can steal it, replace the logo and put it on their site without asking you. How? Using a Flash Decompiler. Unless you put some protection over your SWF it can be decompiled with a push of a button and the decompiler will output readable source code.
I think the author of this tutorial against decompiler strongly. In this tutorial you will learn how to protect code and assets from theft with a technique demonstrate.
Protect Flash files from being downloaded with this technique. It is not fool-proof, but this takes a completely different approach to stopping the average user trying to get at your SWF files than other tactics.
Different with above two tutorials, this tutorials explain how to protect your Flash files from being downloaded. If the SWF files only be published on your server, probably it will be a solution.
Flasm disassembles your entire SWF including all the timelines and events. Looking at disassembly, you learn how the Flash compiler works, which improves your ActionScript skills. You can also do some optimizations on the disassembled code by hand or adjust the code as you wish. Flasm then applies your changes to the original SWF, replacing original actions.
Flash is an open source Flash bytecode assembler. It can not protect your SWFs directly. But you can learn how the Flash compiler works with disassembles your entire SWF. So, just think, you have known how the Flash compiler works, will it far away to build the solution of yourself?!