# Navigation buttons won't stop looping

**URL:** https://forum.kirupa.com/t/navigation-buttons-wont-stop-looping/284575
**Category:** flash
**Created:** [March 20, 2009, 1:19pm UTC](https://forum.kirupa.com/t/navigation-buttons-wont-stop-looping/284575 "2009-03-20T13:19:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![HlizDesigner](https://avatars.discourse-cdn.com/v4/letter/h/7993a0/32.png) [@HlizDesigner](https://forum.kirupa.com/u/HlizDesigner)
#### Post date: [March 20, 2009, 1:19pm UTC](https://forum.kirupa.com/t/navigation-buttons-wont-stop-looping/284575/1 "2009-03-20T13:19:17Z")

</div>

I am building a site for some people that want a menu of links to pop out at the side of 3 main buttons. I thought I figured it out by using a tutorial in a book but it is definitely not working. The navigation shows when it shouldn’t and loops. Here is the link to my page:

[http://www.gobrowncow.com/hannah/engulf/engulf.html](http://www.gobrowncow.com/hannah/engulf/engulf.html)

the swf:  
[http://www.gobrowncow.com/hannah/engulf/engulf.swf](http://www.gobrowncow.com/hannah/engulf/engulf.swf)

the code the book told me to use for each movie which contains the nav menu  
:  
stop();  
function buttonClick(event:MouseEvent):void  
{  
gotoAndStop(event.target.name);

```
project.enabled = true;
gear.enabled = true;

event.target.enabled = false;

```

}  
project.addEventListener(MouseEvent.CLICK, buttonClick);  
gear.addEventListener(MouseEvent.CLICK, buttonClick);

error message: function buttonClick(event:MouseEvent):void

Please help me out, I don’t know that much about flash but this is one feature my client insists upon and it would be good to know how to do it. Thanks!
