Flex Tip of the Day: -keep-generated-actionscript

Continuing my series of Flex tips for beginners ….

-keep-generated-actionscript

When you compile an mxml application, all your mxml is first converted to actionscript and then this actionscript is further compiled into a SWF. You can see this generated actionscript to learn the flex framework in depth using the flex compiler flag -keep-generated-actionscript.

To set this flag in Flex Builder right click to open the project Properties, select Flex Compiler, and add -keep-generated-actionscript to the Additional compiler arguments …. now rebuild the project and you will see a new folder called ‘generated’ that appears and has all the generated code.

You could also use just the short form -keep in place of the long -keep-generated-actionscript.

Keep Generated AS

UPDATE: I had earlier posted a screen shot without the -keep-generated-actionscript flag showing. (how silly am I) … anyways, I’ve corrected that now.


About this entry