Home » Software » Adobe Flex

Optimizing Your Flex Applications Topic:  Adobe Flex
Download (243) times
Last Download at Friday 03rd of September 2010 10:38:34 AM

Optimizing Your Flex Applications

As highly optimized as Flex is, you have the responsibility as an application developer to keep an eye on the performance, memory management, and size of your Flex application. This chapter covers common tips and tricks that you can use to make sure you're creating a lean and mean Flex application. You find out how to make the SWF file, the output of your Flex application, as small as possible for production purposes and how to make your application use the least amount of memory and run as fast as possible.

The SWF file that the Flex compiler creates when you launch your Flex appli- cation contains the Flex framework code, as well as your application-specific code and assets. For larger applications, you can end up with a quite large SWF file. Donâ t worry â Flex provides a way to modularize your Flex applica- tion so that the application pulls in certain chunks of code at runtime so that the SWF file is relatively small.

You can load and unload modules in two ways â by using a ModuleLoader or the ModuleManager. You can most easily load and unload modules by using a ModuleLoader, so this example uses that approach. You create a ModuleLoader by using the MXML tag. The main property that you need to set on the ModuleLoader tag is the url property, which specifies the location of the module SWF file. The module loads when the url attribute is set. So, if you want to load the checkout module when the user clicks the Submit button on the main shopping page, simply set the url property of the ModuleLoader:

Source: media.wiley.com

Incoming Search: , , , , , , , , , , , , , , , , , , ,

Related PDF Files