Listen I need help with hthis collsion code. What's wrong?
There are no errors, it just wont collide with the walls.Code:onClipEvent (load) { moveSpeed = 3; } onClipEvent (enterFrame) { if (Key.isDown(Key.RIGHT)) { this._x += moveSpeed; } else if (Key.isDown(Key.UP)) { this._y -= moveSpeed; } else if (Key.isDown(Key.DOWN)) { this._y += moveSpeed; } else if (Key.isDown(Key.LEFT)) { this._x -= moveSpeed; } } onClipEvent (enterFrame) { if (this.hitTest(this._parent.left)) { _x = _x+10; } } onClipEvent (enterFrame) { if (this.hitTest(this._parent.up)) { _y = _y+10; } } onClipEvent (enterFrame) { if (this.hitTest(this._parent.down)) { _y = _y-10; } } onClipEvent (enterFrame) { if (this.hitTest(this._parent.right)) { _x = _x-10; } }
I'll send the flash over AIM as well. My sn is Gamerkd14. Feel free to IM me. I need help.





Bookmarks