I just fixed a lurking bug in my code today that was related to ActionScript's scoping rules. The bug wasn't obvious to me when I first wrote it, and took some head-scratching when I fixed it. So I thought I'd post in in case this behavior isn't obvious to anyone else eading this (say, coming from a Java background like I do, where this behavior doesn't exist). I'll boil it down to a simpler 'puzzler' question: What do you think this prints out? var i:int; for (i = 0; i < 2; ++i) { var blah:Object; trace("blah = " + blah); blah = i; } Or how about this? for (i = 0; i < 2; ++i) { var blarg:Object = null; trace("blarg = " + blarg); blarg = i; } (I'll put the answer at the end of this post, so that I don't blow the surprise for anyone wanting to figure it ou...