This has been the case with Actionscript since the beginning. A variable is always passed as a reference and not a copy. So each time you're looping over and creating the function, you're only passing a reference to the variable, and not the value itself.
!k _____ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Ed Smith Sent: Thursday, February 28, 2008 7:20 PM To: [email protected] Subject: [flexcoders] A Hole in ActionScript 3.0, and a Way Around It I've just written an article about what I consider to be a rather ugly behavior in ActionScript 3.0: http://effectgenera <http://effectgenerator.com/blog/?p=8> tor.com/blog/?p=8 I appreciate that other coders may not see this as a bug per se, but if there is sufficient agreement then maybe a change to the compiler could be made (or at least a warning added?). It's certainly bitten me several times during coding. I'd appreciate your comments. Many Thanks, Ed

