# Button problem

**URL:** <https://forum.kirupa.com/t/button-problem/296549>\
**Category:** Uncategorized\
**Created:** [September 16, 2009, 12:44pm UTC](https://forum.kirupa.com/t/button-problem/296549 "2009-09-16T12:44:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tenspeedtodd](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@tenspeedtodd](https://forum.kirupa.com/u/tenspeedtodd)\
**Post date:** [September 16, 2009, 12:44pm UTC](https://forum.kirupa.com/t/button-problem/296549/1 "2009-09-16T12:44:19Z")

</div>

Hey all,  
AS3 is doing my head in, it is so much more complex trying to do the most basic stuff.  
I have a button with and instance name of “a” so I can’t possibly get the instance name wrong in the script. I’m just trying to make it gotoAndPlay frame 46 when the button is clicked but I’m getting a 1120 error.  
Here is my code:

* * *

stop();

function playMovie(evt:MouseEvent):void {  
gotoAndPlay(46);  
}

## a.addEventListener(MouseEvent.CLICK, playMovie);

have I done something wrong?

Cheers.
