clip1.onEnterFrame = function(){ if (Key.isDown(83)){ this._y -= 3; } if (clip2.hitTest(this)){ this._y += 4; } }