Note: This article was created based on Flex 2. Minor changes in the description and code may be necessary before it can be applied to Flex 3.
Learn about the Flash Player architecture and ActionScript Virtual Machine 2 (AVM2), and improve performance through typing and data binding in your Flex and Flash application development.
This presentation, given at the FlexManiacs conference in June 2007, gives tips for performance-tuning your ActionScript 3.0 code. While the presentation was given to a predominantly Flex audience, Flash developers can also benefit from these tips.
To get the most out of this presentation, you will need the following software and files:
Download the ZIP file to watch the demo mentioned in the presentation. The demo code is a single application that demonstrates the use of flash.utils.Timer to measure performance in certain scenarios. Each test executes in a for loop many times to bring the execution time up to a point where comparisons are meaningful. This means you must keep in mind that a single execution of something considered "slower" may not be so bad in the scheme of things.
Learn more about ActionScript 3.0 in the MXML and ActionScript area of the Flex Developer Center, as well as in these areas of the ActionScript Technology Center: