AdobeStock_455007340

Viewing Flex Generated ActionScript

When Flex compiles MXML it generates ActionScript which is then compiled to generate the final SWF. At the seminar in Boston yesterday, one attendee asked if he could see the MXML generated ActionScript. The answer is yes, there is a compiler flag that does this, and I promised that I’d post it here for him. The flag in question is -keep-generated-actionscript, just add that (one long word with the three hyphens). To use it open your Flex Builder project, right click to open the project Properties, select Flex Compiler, and add -keep-generated-actionscript to the Additional compiler arguments. You’ll then see a new project folder named “generated” which will contain the generated .as files.

3 responses to “Viewing Flex Generated ActionScript”

  1. Precia Avatar
    Precia

    Ok, I did what you said and didn’t see anything new. Checked in all the subfolders and such, but no luck.
    Then I RIGHT-CLICKED on the project I had updated the compiler and REFRESHED the projects. Ta Da…the GENERATED folder appeared.
    🙂 All are happy in Atlanta.
    Precia

  2. Bing Avatar
    Bing

    You need -keep-generated-actionscript=true 😉

  3. Steve Avatar
    Steve

    …actually, you don’t.
    -keep-generated-actionscript is all you actually need(like Ben said).

Leave a Reply