Dynamic image gallery

hello folks!

i need to create a dynamic image gallery. the files are defined in an array like imgs = [‘img1.jpg’,‘img2.jpg’]; then i loop through the array. the images should be arranged horizontally…

how i do this?

thanks for any answer!

 this.imgs = ['test.jpg','bla.jpg'];
 var x = 0;
 var y = 0;
 var i;
 for (i in imgs) {
 	var t = this.createEmptyMovieClip ("thumbnail" + i, i);
 	var c = t.createEmptyMovieClip ("picHolder", 0);
 	var thumb = imgs*;
 	c.loadMovie (thumb);
 	c._x = x + i * c._width;
 	c._y = y;

it’s working now - it was a currupt image problem… websaved it in photoshop and it worked…

another question… why c._width is 0?

Because it’s an empty movieclip?
It will get its properties as soon as the image is fully loaded;)


so i can’t do any as fade in of the image - right?

Off course you can, but after the image is full loaded.
Have a look here:


hm and how i know if the image is fully loaded? sorry for this silly question but i’m really new to as…

thanks in advance