# Calculate \_height of a generated movieclip

**URL:** <https://forum.kirupa.com/t/calculate--height-of-a-generated-movieclip/149873>\
**Category:** flash\
**Created:** [June 1, 2005, 11:30pm UTC](https://forum.kirupa.com/t/calculate--height-of-a-generated-movieclip/149873 "2005-06-01T23:30:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FSan](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@FSan](https://forum.kirupa.com/u/FSan)\
**Post date:** [June 1, 2005, 11:30pm UTC](https://forum.kirupa.com/t/calculate--height-of-a-generated-movieclip/149873/1 "2005-06-01T23:30:50Z")

</div>

Hi and thanks for your attention.

Goal: load a bunch of .jpg and create a strip that scrolls endlessly up or down according to \_ymouse.

I’m succesfully creating a moviclip with the loaded files like this:

stop();  
////////////////  
var Imgs = new Array(‘mercado.jpg’, ‘lugares.jpg’, ‘apn.jpg’, ‘paihuen.jpg’);  
////////////////////////////////  
var loaderObj:MovieClipLoader = new MovieClipLoader();  
loaderObj.addListener({onLoadProgress:function () {  
// \*\*\* do preloading things \*\*\*  
error = “loading…”;  
}, onLoadInit:function () {  
// \*\*\* do resizing \*\*\*  
error = “loaded”;  
for (var i = 0; i\<Imgs.length; i++) {  
separacion = 10;  
eval(“loadImg”+i).\_y = eval(“loadImg”+(i-1)).\_y+eval(“loadImg”+(i-1)).\_height+separacion;  
////////  
}  
delete loaderObj;  
}});  
///////////////////////  
for (i=0; i\<Imgs.length; i++) {  
createEmptyMovieClip(‘loadImg’+i, this.getNextHighestDepth());  
loaderObj.loadClip(Imgs\*, ‘loadImg’+i);  
}  
//////////////////////////

This goes in frame 1 of “loader” movieclip.

Now the problem is that in order to duplicate and position the generated moviclip I need to get its \_height and I can’t figure out how…

\_root.(…)instanceName.\_height returns 0

Any ideas?  
Thanks
