Hi folks, [sOLVED SEE LAST POST]
I hope one of you GreenSock warrirors will be able to help me out, I'm new to LoaderMax?
I've got an XMLLoader which, in turn, auto creates SWFLoaders...
The SWFs that are being loaded are very simple. Just a bunch of bitmaps on the root timeline, flickbook style animations.
I can't seem to cast the SWFLoader's ContentDisplay objects as MovieClip objects, as I want to do some timeline manipulation on the loaded SWFs. I've had a good look through the various forum threads... but to no avail ;-( Is my concept wrong? What am I missing?
This has consumed so much of my brain, that I've actually just walked out of a supermarket without paying, I fear I'll end up in the slammer if I don't suss this out!
(PS Jack, keep up the good work.... "Lord GreenSock for President!")
Regards
Here's my xml...
<?xml version="1.0" encoding="iso-8859-1"?>
Here's my init method...
public function build(mc:MovieClip):void {
container = mc; // class instance var
LoaderMax.activate([sWFLoader]);
xmlLdr = new XMLLoader("config.xml", {name:"xmlLdr", noCache:true, onComplete:completeHandler});
xmlLdr.load();
}
Here's my completeHandler...
private function completeHandler(event:LoaderEvent):void {
var thumbnail:ContentDisplay;
var mc:MovieClip;
var swfs:XMLList = (xmlLdr.content as XML).SWFLoader;
for each (var swf:XML in swfs) {
thumbnail = LoaderMax.getContent(swf.@name); // ContentDisplay
//mc = thumbnail as MovieClip; <<???
container.addChild(thumbnail); // be good to pass in mc?
thumbnail.x = swf.@SwfXPos;
thumbnail.y = swf.@SwfYPos;
}
}