This is exactly as it should be. Try googling for Closures. Cheers Ralf. On Fri, Feb 29, 2008 at 4:30 PM, Kevin Aebig <[EMAIL PROTECTED]> wrote: > > > > > > > > > > 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://effectgenerator.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 > >
-- Ralf Bokelberg <[EMAIL PROTECTED]> Flex & Flash Consultant based in Cologne/Germany

