So im quite new to AS3 but have worked with AS2 a lot before.
I have created a button and placed it on my stage then inside my class i have added this:

```
    test.addEventListener(MouseEvent.CLICK, buttonClicked);
    function buttonClicked(ev:MouseEvent):void
    {
        trace("Clicked");
    }

```

Now this does not work as it can't find the stage, the only way i can get this to work is if i put the listener on the same frame as the button & not in the class.

But there must be away around this.

Thank you.
Eli

**Update - adding Error messages**

If I keep the above code all in the external class these are the errors i get.

> 
> Line 22 1120: Access of undefined property test. Line 22 1120: Access
>  of undefined property myButtonClick.
> 
> 
>