Flex Conditional Compilation
From Birnam Designs Wiki
Flex, when compiled with mxmlc, allows for defining constants in the compile attributes, and to compile blocks of code conditionally based on these variables.
To define, add this to the compile command:
-define=CONFIG::debugging,true
To use this to define a region that is only included when CONFIG::debugging is true:
CONFIG::debugging { var msg:String = "in debug mode"; }
or to specify an entire function:
CONFIG::debugging public function test():void { trace("avoid test, in debug mode"); }