MovieClip SWC resources from Flash are not available in Flash Builder using getDefinitionByName
I need to access MovieClips from a SWC created in Flash using getDefinitionByName () in Flash Builder. I know that I have to add the full package name during this, for example with the package name "com.fusepump":
var className:String,
assetName:String,
obj:Class,
i:uint;
for (i = 0; i < Config.ASSETS.length; i ++)
{
className = String('com.fusepump.' + Config.ASSETS[i]);
assetName = String(Config.ASSETS[i]).charAt(0).toLowerCase() + String(Config.ASSETS[i]).substr(1, String(Config.ASSETS[i]).length);
obj = getDefinitionByName(className) as Class;
_assets[assetName] = new obj();
}
The problem is I don't seem to be in control of the package name in the SWC exported from Flash. In the directory of referenced libraries MovieClips are located in Assets.swc / default package / Asset_1.abc. If I could add it to the named package, the problem would be solved.
+1
source to share
1 answer
I also had such problems. Try this Flash Builder solution - how to create or include SWC , you can create SWC in flashBuilder. In FlashBuilder you can use those from flash ide.
0
source to share