I need to access MovieClips from an SWC created in Flash using getDefinitionByName() in Flash Builder. I know I have to add in the full package name whilst doing this, like so, with the package name being '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 that I don't seem to have any control of the package name in the SWC exported from Flash. In the Referenced Libraries directory the MovieClips are under Assets.swc/default package/Asset_1.abc - If I were able to add it to a named package the problem would be solved.