# Event.INIT, accessing parent variables from loader?

**URL:** <https://forum.kirupa.com/t/event-init-accessing-parent-variables-from-loader/269363>\
**Category:** flash\
**Created:** [August 26, 2008, 5:19pm UTC](https://forum.kirupa.com/t/event-init-accessing-parent-variables-from-loader/269363 "2008-08-26T17:19:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xohol](https://avatars.discourse-cdn.com/v4/letter/x/59ef9b/32.png) [@xohol](https://forum.kirupa.com/u/xohol)\
**Post date:** [August 26, 2008, 5:19pm UTC](https://forum.kirupa.com/t/event-init-accessing-parent-variables-from-loader/269363/1 "2008-08-26T17:19:46Z")

</div>

[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
```
