Open a new AS2 document and add this on frame 1:
var ar:Array =[3,2,4,5]
for (var mop in ar)
{
trace(ar[mop]);
}
//ar.push(3); If you wanted to make ar different.
for (var mop in ar)
{
trace(ar[mop]);
}
Works fine. Now open an AS3 document, and do the same. You get an error. Shouldn’t ‘mop’ have gone out of scope? And why comes the error? Is it because mop is trying to be defined twice because it didn’t go out of scope? If so, what’s a solution for that, without defining two different variables, since delete mop does not work?