1 msgFlash Remoting Error
3 msgUndefined property in one fla, but not in the o...
1 msgSetting an AIR applications file types to default
1 msgAS3- Word Wrap for Dynamic DataGrid Cell Content
1 msg[ANN] haXe Website
3 msgBest AS3 MenuBar component for Flash CS3
7 msgRetrieve The Web Link
2 msgSet FLVPlayback source property via html queryp...
4 msgPlayer 8 and the Alert component
10 msgWhy isn't my TextField multiline? AS2
16 msgFPS limit of flash player inside browser?

AS3 For loop proplem
\ flash (6 May 2008)
. \ Glen Pike (6 May 2008)
. \ Robert Leisle (6 May 2008)
. \ Cor (6 May 2008)
. \ John McCormack (7 May 2008)

5 msgWhy is good to extend an Event Class
2 msgKilobyte Size of AS Classes
7 msgFlash Unicode issue (Latin extended Romanian ch...
8 msgas3 sound and swf overriding one another
1 msgOT: Need help finding a List or good book on ho...
2 msgAligning images and text in textfield / textarea
1 msgWatch your debug output
1 msgUnderscore in class file path name: no-no?
Subject:Re: AS3 For loop proplem
Group:Flashcoders
From:John McCormack
Date:7 May 2008


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

John

----- Original Message -----
From: <flash>
To: <flashcoders>
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:MovieClip):void
{
_mcName = mcName; // Contains MovieClip object
(object 1 through 5)
var imageLoader:Loader = new Loader();
var imageURL:URLRequest = new
URLRequest(filename);
imageLoader.load (imageURL);

imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
imgLoadComplete);
}
function imgLoadComplete(ev:Event):void
{
_mcName.addChild(ev.target.content); // This
should add the loaded image into the placeholder movieclip for each
of the 5 MovieClips
}
SJM
_______________________________________________
Flashcoders mailing list
Flashcoders
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


© 2004-2008 readlist.com