actionscript 3 - Alternative for getDefinitionByName -
in past, there simple trick, include flex mxmlc
module adding following line flash-cs4 makefile:
-include-libraries “/absolute/path/to/my/assets/assets.swc”
this gave ability use getdefinitionbyname
, helper function access embedded swc
asset-library (instead of creating hand-written classes assets).
unfortunately, has stopped working since flash-cs4. know solution?
unfortunately, workaround have found explicitly refer each of asset classes somewhere in code. may create dummy class this:
public class assetsexporter extends sprite { public static function export() { assetclass1; assetclass2; //etc trace( "debug assetsexporter.export()" ); } }
specify class document class in flash ide, compiled resulting swc. in main code of application call
assetsexporter.export();
after doing able use getdefinitionbyname().
Comments
Post a Comment