Menu
I have a MC named ball, and another one named wall. I am able to navigate the ball with the arrows. I also won’t it to stop when it touches the wall. What’s wrong with this code? ?
onEnterFrame=function()
{speed=5;
if (Key.isDown(Key.DOWN)) {ball._y+=speed;
}
{if (Key.isDown(Key.UP)) {ball.
}
{if (Key.isDown(Key.RIGHT)) {ball._x+=speed;
}
{if (Key.isDown(Key.LEFT)) {ball.
if (ball.hitTest(wall)==true) {
speed=0;
}
}
}
}
}
}