Public feed
#599675
onClipEvent (enterFrame) {
if (Key.isDown(key.UP)) {
this._y -=13;
}
if (Key.isDown(key.DOWN)) {
this._y +=13;
}
if (Key.isDown(key.LEFT)) {
this._x -=13;
}
if (Key.isDown(key.RIGHT)) {
this._x +=13;
}
//wall boundaries START
if (hitTest(_root.bottom_wall)==true)
{
_y=_root.bottom_wall._y - _root.joe._height
}
if (hitTest(_root.top_wall)==true)
{
_y=_root.top_wall._y + 16 // 16 is just the width of the wall
}
if (hitTest(_root.left_wall)==true)
{
_x=_root.left_wall._x + 20 // 20 is just the width of the wall
}
if (hitTest(_root.right_wall)==true)
{
_x=_root.right_wall._x - _root.joe._width
}
//wall boundareis END
}