How to generate an SWF file from an actionscript file?

codeLover picture codeLover · Apr 20, 2011 · Viewed 18k times · Source

Hi I have an actionscript file which is displaying a button. I want to remove the button from my display. So i need to make changes to the actionscript code and generate a new SWF file after doin the changes.

Can anyone kindly help me regarding how to generate an SWF file from an actionscript file.

Thanks In Advance.

Answer

prototypical picture prototypical · Apr 23, 2011

I think you are asking what you use to compile as3 to a .swf file.

Is your source file a .fla or a .as file ? Keep in mind that a .swf is not a source file, it is the compiled file. So if you wanted to modify that on the fly, you could use the method suggested by anemgyenge above.

Otherwise, if "on the fly" is not your intention you'd need to decompile it - which doesn't really result in quality source as the decompiled symbols can be hard to work with.

Flash CS5 can compile to a .swf, and your main source file is a .fla and .as for code files.

Flex SDK can compile AS3 to a .swf, and you can use either Flex Builder or Flash Develop as an IDE for editing your as3 code.

FlashDevelop is free and you can get it here :

FlashDevelop Download Page

You need the Flex SDK to compile with FlashDevelop, so you'll need to get that here :

Flex SDK - you can use either 3 or 4

If you are looking to tinker with it, why not try out wonderfl.net. It is a little sloppy in terms of the layout of the site, but there is tons of code to learn from and you don't need to install anything!