Hi!
I'm creating library swfs in as3 this way, works like a charm (except for the slow mxmlc compiler):
package {
import flash.display.Sprite;
public class Library extends Sprite {
[Embed(source="assets/test.png")]
public var TestBitmap:Class;
}
}
I would like to create the same kind of libary using swfmill. I've tried the following swmfill simple xml:
<movie version="10">
Examining the libraries in FlashDeveloper's explorer reveals that the as3 library exports BOTH classes and symbols, but the swfmill library exports ONLY symbols. My host application is accessing the as3 library assets this way:
private var loader:Loader = new Loader();
private function onCreationComplete():void {
this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
}
private function onComplete(e:Event):void {
var resourceClass:Class = loader.contentLoaderInfo.applicationDomain.getDefinition("Library") as Class;
var resources:Object=new resourceClass();
var testBitmapClass:Class = resources['TestBitmap'] as Class;
var testBitmap:Bitmap = new testPngClass();
this.addChild(testBitmap);
}
But with no exported swfmill classes, there's obviously nothing to instatiate...
Is swfmill expected to export classes this way? If not, is there a way of accessing the symbols without instantiating them as classes?
Jonas