Flex Builder Tip: Saving the generated AS3 code
The 360 Flex conference has been terrific, I’ve been learning a ton and meeting some really nice people. I really wanted to blog more during the conference but the wireless at Ebay Town Hall has been hammered with use (go figure!) and evenings have been full to say the least. I’ll try and get some posts done while sitting in the airports this evening. Anyways, on to the tip.
Yesterday I sat in on a session by Ted Patrick, he covered MXML vs. AS3. It was a very informative session and I learned a lot about MXML under the covers. Ted showed a compiler argument that directs Flex Builder to save the generated AS3 code to a folder in your project root.
Try this; Open your project properties, select Flex Compiler, then in the Additional Compiler Arguments add “-keep” (no quotes). When you recompile your project you’ll see a new “generated” folder in the project root, all of the generated AS3 code for the project is in there. So if you have a main.mxml file in your project the generated code would be in main-generated.as.
I wanted to share just in case I’m not the last one to learn about this
You can learn a lot by looking at the generated code.
Enjoy!
P.S. My favorite session so far has been Flex Builder Secrets, I pulled numerous productivity tips out of that one. More on that later.