Excuse my ignorance - I've never touched AS in my life - I don't really understand this bit:
while (_root.wall.hitTest(_x, _y+radius, true)) { _y--; }
It's a while loop - but what exactly is it doing? If the y co-ordinate of the object + the radius is returns true then decrement the y co-ordinate? What does _root.wall.hitTest do and why are you adding the x co-ordinate into the condition?
Secondly, supposedly you don't need anything to notate variables like the one you defined, radius, so how comes the x co-ordinate and y co-ordinate require notation (an underscore)? Are they just special, pre-defined variables that require notation, or are there other cases where variables need to be notated using an underscore?
If you want to learn AS then learn as3. AS for the loop, I don't get the hitTest, in AS3 you got 2 types, making it easier: hitTestObject() and hitTestPoint(). I don't know how the old one works