Jump to content
Search Community

pol

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by pol

  1. Hi, I have a very straight forward application of LoaderMax setup where I'm loading only 1 swf. (I will be adding more swf's to the queue and that's why I'm using LoaderMax and not just the individual SWFLoader). Problem: After a successful, complete load, LoaderMax.getContent("name"); returns null? (very frustrating) Weirdness: HOWEVER!, in the same instance, LoaderMax.getLoader("name").rawContent; returns exactly the swf root as expected (so this is how I got it to work). Question: What's going on? Any insight would be greatly appreciated! THANKS (and code below), Pol var illusionsPrint:MovieClip; function moduleLoader():void { var que:LoaderMax = new LoaderMax({name:"illusionsQue",onError:queError}); que.append(new SWFLoader("swf/illusions-print.swf",{name:"swfIllusionsPrint",estimatedBytes:725722,onProgress:printProgress,onComplete:printComplete})); LoaderMax.prioritize("swfIllusionsPrint",false); que.load(); function printProgress(e:LoaderEvent):void { trace("progress: " + e.target.progress); } function printComplete(e:LoaderEvent):void { illusionsPrint = LoaderMax.getLoader("swfIllusionsPrint").rawContent; // This works fine! // illusionsPrint = LoaderMax.getContent("swfIllusionsPrint") as MovieClip; // This doesn't work -> returns null ? illusionsPrint.x = 490; illusionsPrint.y = 100; illusionsPrintReady = true; dispatchEvent(new Event("illusions_print_ready")); trace(e.target + " is complete!"); } function queError(e:LoaderEvent):void { trace("error occured with " + e.target + ": " + e.text); } }
×
×
  • Create New...