条件编译

如 项目名称 为test

在项目的src目录添加个test-config.xml

<flex-config>

<compiler>
  <define>
    <name>n::d</name>
    <value>true</value>
  </define>
</compiler>

</flex-config>

这样 在代码里添加:

var g=3;

n::d{

  g=4;

}

当把config.xml里的value值改为false后 编译器在编译代码时就不会编译 n::d{ }这代码码。

原文地址:https://www.cnblogs.com/mattins/p/2424004.html