# How do you make the animation restart?

**URL:** https://forum.kirupa.com/t/how-do-you-make-the-animation-restart/281576
**Category:** flash
**Created:** [February 10, 2009, 9:52pm UTC](https://forum.kirupa.com/t/how-do-you-make-the-animation-restart/281576 "2009-02-10T21:52:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sdendenden](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@sdendenden](https://forum.kirupa.com/u/sdendenden)
#### Post date: [February 10, 2009, 9:52pm UTC](https://forum.kirupa.com/t/how-do-you-make-the-animation-restart/281576/1 "2009-02-10T21:52:00Z")

</div>

I want to make a button (text saying “back to menu”) make it so that when you click it, it restarts the animation. I tried but it gives me this error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at navysealstest\_fla::MainTimeline/frame1()

This is the code I used to get that error:

```auto
menu_mc.menu_btn.addEventListener(MouseEvent.CLICK, launchAnimationAgain);
function launchAnimationAgain(event:MouseEvent):void {
	MovieClip(root).gotoAndPlay(1);
}

```

What’s wrong? Thank you.
