# MovieClipLoader: Access variables of target MC

**URL:** <https://forum.kirupa.com/t/moviecliploader-access-variables-of-target-mc/291120>\
**Category:** flash\
**Created:** [June 24, 2009, 9:58pm UTC](https://forum.kirupa.com/t/moviecliploader-access-variables-of-target-mc/291120 "2009-06-24T21:58:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Poco](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@Poco](https://forum.kirupa.com/u/Poco)\
**Post date:** [June 24, 2009, 9:58pm UTC](https://forum.kirupa.com/t/moviecliploader-access-variables-of-target-mc/291120/1 "2009-06-24T21:58:14Z")

</div>

Hi guys,

Is there any way how to access variables of the container movieclip once I load content to it using MovieClipLoader?

```auto

System.security.allowDomain("http://www.helpexamples.com");

var _this = this;

var mc:MovieClip = this.createEmptyMovieClip("my_mc", 1);
mc.someVariable = "What the hell";
trace("Tracing outside MovieClipLoader: "+mc.someVariable);

var mcLoader:MovieClipLoader = new MovieClipLoader();
var mcListener:Object = new Object();
mcListener.onLoadStart = function(target_mc:MovieClip) {
    trace("Tracing inside MovieClipLoader (1): "+target_mc.someVariable);
    trace("Tracing inside MovieClipLoader (2): "+_this.mc.someVariable);
};
mcListener.onLoadInit = function(target_mc:MovieClip) {
    
};
mcLoader.addListener(mcListener);
mcLoader.loadClip("http://www.helpexamples.com/flash/images/image1.jpg", mc);

```

This of course doesn’t work, I guess the “someVariable” gets eliminated once the loading begins. Any workaround for this? Thanks!

Cheers,  
Poco
