# MouseEvent (extreme newbie)

**URL:** https://forum.kirupa.com/t/mouseevent-extreme-newbie/293250
**Category:** Uncategorized
**Created:** [July 26, 2009, 12:57am UTC](https://forum.kirupa.com/t/mouseevent-extreme-newbie/293250 "2009-07-26T00:57:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tdq](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@tdq](https://forum.kirupa.com/u/tdq)
#### Post date: [July 26, 2009, 12:57am UTC](https://forum.kirupa.com/t/mouseevent-extreme-newbie/293250/1 "2009-07-26T00:57:48Z")

</div>

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;
    }    
}
```
