[AS]
public function loadPic (m:MovieClip, s:String, i:String)
{
var url:String = “images/”+s+"/"+i+".jpg";
trace (url);
//
var loader:Loader = new Loader();
configureListeners (loader.contentLoaderInfo);
var request:URLRequest = new URLRequest(url);
loader.load (request);
loader.x=loader.y=13;
m.addChild (loader);
}
private function configureListeners (dispatcher:IEventDispatcher):void
{
dispatcher.addEventListener (Event.INIT, initHandler);
}
private function initHandler (event:Event):void
{
//trace ("initHandler: " + event);
}
[/AS]
in the above code. i am trying to access the m variable from the loadPic function in the initHandler function. The loader is the child of the m mc.
This class is being called in a loop in which im loading a list of thumbnail jpegs. This loader is attacehd to each one of the movieclips that the jpegs are getting loaded into.
once the jpg is loaded (initHanlder) i need to remove the loading graphic that is in each of the container movie clips. i can't access anything from that initHandler.
ie event.target.parent. it doesn't work.
--
how can i remove that loader graphic on init?
--
movie clip
- loader graphic named lg_mc
- loader class with listeners