[swfmill] Accessing swfmlill library assets (png, mp3) from Flex/as3

Jonas Nyström jonasnys at gmail.com
Thu Nov 5 09:27:33 PST 2009


Hi again, Armencho!

Still no success here... :-(
I get a ReferenceError 1065: Variable TestBitmap is not defined...

This is my xml for creating a test.swf, using swfmill 0.2.12.6:

<?xml version="1.0" encoding="UTF-8"?>
<movie version="10">
    <frame>
        <library>
            <bitmap id="mypackage.TestBitmap" import="src/assets/test.png"/>
        </library>
    </frame>
</movie>

...and this is my flex code:

private var loader:Loader = new Loader();
private function onCreationComplete():void {
this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
this.loader.load(new URLRequest('test.swf'));
}
private function onComplete(e:Event):void {
var testBitmapClass:Class =
loader.contentLoaderInfo.applicationDomain.getDefinition("mypackage.TestBitmap")
as Class;
}

Would it be possible to link to or post a working as3/flex example?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/swfmill_osflash.org/attachments/20091105/40adee48/attachment.html>


More information about the swfmill mailing list