Hello Flashkit, the code work, but dont perfectly, when the player hillside on the diagonals of a other object, he is pushed in a weird way, is a bug. The code is this:

PHP Code:
         while (_root.object.hitTest(this._x this._width 2this._ytrue))
        {
            
this._x += 5;
        }
        while (
_root.object.hitTest(this._x this._width 2this._ytrue))
        {
            
this._x -= 5;
        }
        while (
_root.object.hitTest(this._xthis._y this._height 2true))
        {
            
this._y += 5;
        }
        while (
_root.object.hitTest(this._xthis._y this._height 2true))
        {
            
this._y -= 5;
        }