[ActionScript 3.0] 自定义顶级类
为了结合FlashBuilder编译参数,达到发布项目时不编译trace代码方便,写一个顶级类:
package { public function tracing(...args):void { CONFIG::DEBUG { trace(args); } } }
编译参数设置:属性→ActionScript编译器,在弹出窗口中的附加的编译器参数(I)里面填写:-define=CONFIG::DEBUG,true
(详情:http://www.cnblogs.com/frost-yen/p/5302511.html)
用法:tracing("和trace的用法相同");
------------------------------------------------------------------
Always put yourself in the other's shoes.If you feel that it hurts you,it probably hurts others,too.------------------------------------------------------------------