Flash CS4 to Flex Builder 3 migration for ActionScript 3.0 (AS3)
Thursday, June 18th, 2009We have been working for five months on a medium-scale app for a large multi-national company. As we approached the beta phase, requests for new functionality started coming, but with 25,000 lines of ActionScript, it was already taking over 45 seconds for the app to compile from the Flash IDE. I made the call to migrate the project over to Flex, and this will be the basis of the discussion as to why every ActionScripter still using Flash as their compiler and IDE should move to Flex Builder.
Over a short series of articles, I hope to shed some light on the reasons. To sum them up:
- Every time you save a class, your app compiles in the background – meaning you NEVER need to wait for that “Exporting SWF Movie” dialogue box ever again. This alone is enough once you get into a big app…
- SVN support – in layman’s terms, great version control. You work on a class, and when you are happy, you save (”commit”) a new revised version with comments as to what you’ve done. When your app reaches a stable state, you can save it all as a safe working version and press on. You can always compare old versions and retrieve them if need be.
- Profiling your apps – if you’ve been used to relying on “trace” statements to debug your apps, you will not believe the precision with which you can dig into the performance of your apps. As well as realtime memory graphs, there are many excellent tools available. For example – loitering objects – take two snapshots of your app’s memory usage over time as it runs, and you can compare the two, seeing not only what objects are still hanging around, but where they came from in the first place – astonishing!
- Testing in the browser – you get a much better feel for how things will really work
- Creating Flex libraries – for many Flash devs, this is a bit of a nightmare at the beginning, as we’ve been used to setting one preference to give all projects access to whatever classes we like. Its a bit more complex in Flex, but once you’ve compiled your most useful classes, its a breeze to export and use them, and all makes sense
The aforementioned app is built in PureMVC, and is due pretty soon, so I don’t imagine I’ll have a chance to publish anything before then… but I do hope it will help people through the “banging head off wall” phase that I went through on the early days of trying to make the app work in Flex Builder.


