Valid where? If that's in a class function and i is not a class
variable, then the compiler will complain that you're using an
undeclared variable.
Cory Petosky wrote:
I guess I should have provided an example when I mentioned no block
level scoping. Try this on for size:
for (i = 0; i < 10; ++i); // Do nothing but increment i
var i:int;
trace(i);
This is totally valid code and will trace 10! ALL variable
declarations in a function, regardless of the block the variable is
declared in, are performed as the function is pushed on the stack.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders