Sharing the Code

Programming stuff that might be useful to others

Tag: Actionscript

Packaging a class library into a SWC in Flash

You can package Actionscript classes into a SWC files – they are equivalent to JAR files in Java. You then reference the SWC file from your FLA. You might want to do this if you come up against the memory limit in the Flash compiler, or you might want to distribute libraries without distributing the source code. It also speeds up compiling because you are including pre-compiled code. The following instructions are for CS4 but it works in CS3 also.

Read more

Compiling Flash files in Ant

If you have FDT (an actionscript Eclipse plugin) you can compile your FLAs using Ant. But you first need to set the location of Flash in FDT settings by going to Window > Preferences > FDT > Tools > Flash in Eclipse and entering the location of flash.exe in the Flash IDE text box (it will probably be something like C:\Program Files\Adobe\Adobe Flash CS3\Flash.exe). This will compile the FLAs in Flash – it would probably be faster if it used a command-line compiler like the one that comes with the Flex SDK but I haven’t looked into integrating this yet.

Read more