RE: [Flashcoders] [AS3] Problem with For loop

2008-05-02 Thread Keith Reinfeld
var summaryClick = function (ev:Event) { trace(i); // Outputs incorrectly (Outputs 5 on each MovieClip click) ??? } Outputs correctly: 5 *is* the value of i when clicked. Regards, -Keith http://keithreinfeld.home.comcast.net

Re: [Flashcoders] [AS3] Problem with For loop

2008-05-02 Thread Charles Parcell
var summaryClick = function (ev:Event) { trace(i); // Outputs incorrectly (Outputs 5 on each MovieClip click) ??? } i does not exist within your loaded MovieClip. You need to trace a variable that is specific to the MovieClip. Charles P. On Fri, May 2, 2008 at 10:58 AM, SJM -

Re: [Flashcoders] [AS3] Problem with For loop

2008-05-02 Thread Rob Romanek
Try the change I've added below and see if it works for you. On 2-May-08, at 10:58 AM, SJM - Flash wrote: This function should loop through 5 times creating 5 different MovieClips, each one with a mouse click event attached, which should trace the value of i either 1, 2, 3, 4 or 5. So the

Re: [Flashcoders] [AS3] Problem with For loop

2008-05-02 Thread SJM - Flash
{ _mcName.addChild(ev.target.content); // This should add the loaded image into the placeholder movieclip for each of the 5 MovieClips } SJM - Original Message - From: Rob Romanek To: Flash Coders List Sent: Friday, May 02, 2008 4:23 PM Subject: Re: [Flashcoders] [AS3