Tony Alves
Flex, .Net, and Fluorine

Creating AS3 code with Flex Builder compiler command

Tuesday, 21 August 2007 16:45 by talves


If you are like me, you have read a lot of information on Flex, and Flex Builder. When you create your projects, you use a lot of mxml. You should also be aware that every time you create a mxml file, it will be converted to an actionscript class.

So, where is the code for these classes? They are created somewhere you can't see and are used to compile your swf files by the compiler. Wouldn't it be great to be able to see this code, to see how the compiler creates a class or extends a class when you use it? Well, it is easy to do this with a compiler switch (-keep-generated-actionscript).

Just add the -keep-generated-actionscript switch to your compiler arguments by going to properties in your project. Click on "Flex Compiler". Add the -keep-generated-actionscript argument to the compiler arguments input field. I was also able to use the abbreviated -keep argument to save typing. Apply the change and go build your project. A directory will show up at the root of your project called "generated" and you will be able to see the .as files created by the compiler.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:  
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

October 6. 2008 08:05