Getting the height of a dynamically loaded movie
Posted on 2007-07-26
I have a flash movie that loads images from an xml document into a movie clip. I am placing the images at a specified interval but I want their to be able to have different sized images with the same spacing between them.
I was going to do this by dynamically figuring out (starting at 0) where to place the next clip with something like:
var interval = 20;
var currentheight = 0;
var currentThumb_mc = scroller.createEmptyMovieClip("thumbnail_mc"+i,i);
currentThumb_mc._y = currentheight;
currentheight = currentheight + currentThumb_mc._height + interval;
However currentThumb_mc._height is always zero. After loading the image in the movie should have a size shouldn't it?
So I guess what I am looking for is how to get the height of a loaded movie.