Jonathon: In any other language, the scope would be as you describe. AS3 doesn't have block-level scoping -- the most local scope is always the function. Declaring a variable anywhere but the first line of a function is a lie -- the VM declares all variables as the first set of operations after pushing the function call on the stack.
On Mon, Mar 24, 2008 at 7:36 AM, Andrew Sinning <[EMAIL PROTECTED]> wrote: > You are correct Jonathan, but loop blocks are delimited by brackets, so > the "for ( ... )" declaration is outside of the loop block. > > > jonathan howe wrote: > > I had always thought that the scope of variables declared in the > > initialization part of the for loop were local to the loop block > > > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- Cory Petosky : Lead Developer : PUNY 1618 Central Ave NE Suite 130 Minneapolis, MN 55413 Office: 612.216.3924 Mobile: 240.422.9652 Fax: 612.605.9216 http://www.punyentertainment.com _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders