With Flash MX 2004 we can create and use Compiled components so source need not be distributed. It is good for many component developers because they need not worry about exposing their code. But when you produce your swf with the component, everything is byte code and can be translated back to Actionscript by the tools like ActionScript Viewer.

Compiled components has the extension “swc” and the same extension is used for the Flash Elements in Dreamweaver MX 2004. While trying to open one such file with Burak’s ActionScript Viewer, I got a prompt which says, “Select SWF file. Following swf candidates are found in the file ” It showed the swf file inside and I could see all the actionscript there. (Great Job Burak! Also I recommend you to use the style I use for displaying objects in my latest ActionScript tracing function it is more readable.) From that I got a clue that .swc contains an .swf file embedded inside. Then I did a funny thing! I just renamed the file to have .zip instead of .swc then……

Wow! I could see all the files inside, there is an “catalog.xml” which has the info about all the files included and then an .swf and a .png file for the icon in the library and many files with the extension “asi”. I opened those files in notepad and found them to be actionscript files with class definition.

to conclude, now compiled components made it a bit tough to see the source code; that’s all. Now burak started with decompiling the swf to FLA using the JavaScript API provided by the Flash 2004 IDE. Even though it is in the preliminary stage now, it may be improved and perfected in the days to come. We developers have to wait for some obfuscator to come to protect our code to some extent. I’m waiting for Robin Debreuil to come up with one.