Hi!
I need some help can some one tell my why this code don’t work:
onClipEvent (enterFrame) {
if (Key.isDown(Key.DOWN)) {
_y += 1;
}
if (Key.isDown(Key.UP)) {
_y -= 1;
}
if (Key.isDown(Key.LEFT)) {
_x -= 1;
}
if (Key.isDown(Key.RIGHT)) {
_x += 1;
}
if (walls.hitTest(getBounds(_root).xMax, _y, true)) {
_x -= 1;
}
if (walls.hitTest(getBounds(_root).xMin, _y, true)) {
_x += 1;
}
if (walls.hitTest(_x, getBounds(_root).yMax, true)) {
_y -= 1;
}
if (walls.hitTest(_x, getBounds(_root).yMin, true)) {
_y += 1;
}
}
I got one object caled walls and one caled ball(there is there I put the code).
Thanks
Albert:cubs: