actionscript 3 - Alternative for getDefinitionByName -


in past, there simple trick, include mxmlc module adding following line 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 . 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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -