I must load photos from a database at runtime. I thought to create empty movie clips then load them with the photos. I create the empty movie clips in a loop with:
var maxSize:Number = 50;
var indexPhotoArray:Array;
for (var i:Number = 0; i<maxSize; i++) {
var photoMC = this.createEmptyMovieClip("plane_index_photo_"+i+"_mc", i);
indexPhotoArray.push(photoMC);
When I look in the debugger, all 50 empty movie clips show up fine.
When I try to populate them in a second loop, it does not seem to work
The second loop goes:
_root.business_mc.business_ds.first();
for (var i:Number = 0; i < indexPhotoArray.length; i++) {
var z:String =_root.business_mc.business_ds.currentItem.Picture;
indexPhotoArray.loadMovie("http://www.tonybarre.com/directory/images/" + z);
_root.business_mc.business_ds.next();
}
If I replace this second loop with:
_root.business_mc.business_ds.first();
var z:String =_root.business_mc.business_ds.currentItem.Picture;
plane_index_photo_1_mc.loadMovie("http://www.tonybarre.com/directory/images/" + z);
I get the one photo. But, of course, I need the whole array.
I have tried to replace what I believe is the problem line with the following, but none work:
this[indexPhotoArray.pop()].loadMovie("http://www.tonybarre.com/directory/images/" + z);
indexPhotoArray[i].loadMovie("http://www.tonybarre.com/directory/images/" + z);
this["plane_index_photo_"+i+"_mc"].loadMovie("http://www.tonybarre.com/directory/images/" + z);
Thanks for any help you can provide.
Tony Barre

New Topic/Question
Reply



MultiQuote




|