# \[CS3/AS2\] Access to loadClip properties right away?

**URL:** <https://forum.kirupa.com/t/cs3-as2-access-to-loadclip-properties-right-away/249372>\
**Category:** flash\
**Created:** [January 18, 2008, 12:54am UTC](https://forum.kirupa.com/t/cs3-as2-access-to-loadclip-properties-right-away/249372 "2008-01-18T00:54:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmo](https://avatars.discourse-cdn.com/v4/letter/b/9de0a6/32.png) [@bmo](https://forum.kirupa.com/u/bmo)\
**Post date:** [January 18, 2008, 12:54am UTC](https://forum.kirupa.com/t/cs3-as2-access-to-loadclip-properties-right-away/249372/1 "2008-01-18T00:54:20Z")

</div>

I need access to the properties of a file I load on the next line. Specifically, trying to pull the \_height and \_width off of it.

I think it’s being bungled up because it’s inside a function running two (nested) for statements. Let me post up the code for you geniuses:

```auto
 
function(){
  for(i=0; i<someNumber; i++){
    for(r=0; r<anotherNumber; r++){
      //tn the temp var/identifier for a movieclip which
      //gets created here
      mcLoader.loadClip(this["gallery"+i].filenames_tn[r], tn);
      tn._x = tnb._x = tnm._x = spacingHolder;
      spacingHolder += tn._width + spacing;
    }
  }
}
 
//elsewhere
var loader:Object = new Object();
mcLoader.addListener(loader);
 
loader.onLoadInit = function (mc){
  trace(mc._width) //this works fine
}

```

The width traces fine in the onLoadInit, but only AFTER the function that is creating and positioning the movieclips is finished running. They are nested in something of a complicated heirarchy so to save the widths in another array and then try to move them all later would be bonkers.

Again, I need the \_width property off the images just loaded so that I can space them properly.

Anybody?
