Since you have not set x,y for the MovieClips, might the others be underneath the top one (last loaded)?


----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <>
Sent: Tuesday, May 06, 2008 5:54 PM
Subject: [Flashcoders] AS3 For loop proplem

This code should load a MovieClip from the library 5 times, place
each on the stage and then load a different image into each one
Instead it loads the 5 MovieClips from the library, places them on
the stage and then only loads the image into the last (5th)
MovieClip, whats going wrong?
!!!! this code will not run as its stripped !!!!
                    var itemList:XMLList  = locationInfo.item;
                    for (var i = 0; i < itemList.length(); i++) //
Loops through 5 times
                    _summaryElement[i] =
loadLibrary(summaryContainer); // Load our MovieClip from the library
                    loadImage("images/" + i + ".jpg",
_summaryElement[i].sumImg); // Should load image into
_summaryElement[i].sumImg which is a blank placeholder movieclip
                    function loadImage(filename:String,
                    _mcName = mcName; // Contains MovieClip object
(object 1 through 5)
                    var imageLoader:Loader = new Loader();
                    var imageURL:URLRequest = new
                    imageLoader.load (imageURL);

                    function imgLoadComplete(ev:Event):void
                    _mcName.addChild(; // This
should add the loaded image into the placeholder movieclip for each
of the 5 MovieClips
Flashcoders mailing list

Flashcoders mailing list

Reply via email to