An extremely basic question I’m sure but I can’t figure out why this is so.
Why does this only work when I click on the ball, and not when I click anywhere on the stage?
public class Main extends MovieClip {
public function Main()
{
addEventListener(MouseEvent.MOUSE_DOWN, click);
}
private function click(e:Event):void
{
ball.x = mouseX; // ball is an instance
ball.y = mouseY;
}
}