# Simple: Close Button (Change Movie Clip to 1st Keyframe)

**URL:** <https://forum.kirupa.com/t/simple-close-button-change-movie-clip-to-1st-keyframe/307767>\
**Category:** flash\
**Created:** [April 9, 2010, 7:29pm UTC](https://forum.kirupa.com/t/simple-close-button-change-movie-clip-to-1st-keyframe/307767 "2010-04-09T19:29:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thepatjohnson](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@thepatjohnson](https://forum.kirupa.com/u/thepatjohnson)\
**Post date:** [April 9, 2010, 7:29pm UTC](https://forum.kirupa.com/t/simple-close-button-change-movie-clip-to-1st-keyframe/307767/1 "2010-04-09T19:29:31Z")

</div>

Hey Guys,

This actionscript 3 stuff is giving me trouble with the easiest functions. I was able to get a movie clip to play by clicking on a button, but now I am having trouble with the close button.

Basically, I just need the movie clip (box1) to go back to frame number one when the user clicks on the “X”.

I set up the button the same way as I did the pop-up box:

```auto
box1.close_btn.addEventListener(MouseEvent.CLICK, onClick);

function onClick(event:MouseEvent):void
{ box1.gotoAndStop(1); } 

```

That doesn’t work though and I have removed it for the examples below

**Example:** (Click “Office Products”)  
[http://www.thepatjohnson.com/misc/test-movement-3.html](http://www.thepatjohnson.com/misc/test-movement-3.html)

**FLA:**  
[http://www.thepatjohnson.com/misc/test-fla.zip](http://www.thepatjohnson.com/misc/test-fla.zip)

Any help would be greatly appreciated.Thank you!
