Scope in Action Script – not what you might think
I have previously coded in Java which has very strict scope for variables and this states that if a variable say ‘i’ is declared within a for loop eg:
i
only has scope within the for loop. This is not the case in action script where i
has scope within the parent of the for loop.
This stumped me a little bit when I got a few warnings but it could have some really odd effects if you don’t know about it.