Hey everyone. I’m running into a little snag with this project I’m working on, and need higher powers to help me work it out.
I’m loading in external images through XML, and am trying to get the width of these images after they load, so that I can place them end to end, using the width as the spacing.
Here is what I have so far:
for(i=0; i<main.length; i++){
var loadImageListener:Object = new Object();
var imageLoader = _root.createEmptyMovieClip("loader"+i, this.getNextHighestDepth());
imageLoader.addListener(loadImageListener);
imageLoader.loadMovie(main*.attributes.url);
loadImageListener.onLoadInit = function(){
trace(["loader"+i]._width);
};
imageLoader._y = 225;
imageLoader._x = this["loader"+(i-1)]._x + 490;
};
Any help would be very much appreciated. If you notice in the last line of code I’m using the number 490. I’m wanting to replace that with the width so that the pictures can be any width and they will still line up end to end.
Thanks for all your help.