# as3 menu navigation class

**URL:** <https://forum.kirupa.com/t/as3-menu-navigation-class/281991>\
**Category:** flash\
**Created:** [February 16, 2009, 2:06pm UTC](https://forum.kirupa.com/t/as3-menu-navigation-class/281991 "2009-02-16T14:06:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![legalizeit](https://avatars.discourse-cdn.com/v4/letter/l/e9c0ed/32.png) [@legalizeit](https://forum.kirupa.com/u/legalizeit)\
**Post date:** [February 16, 2009, 2:06pm UTC](https://forum.kirupa.com/t/as3-menu-navigation-class/281991/1 "2009-02-16T14:06:06Z")

</div>

There is a problem that drives me crazy, but I’m sure there is an easy way to solve this.  
So… I want to build a flash based website and place there 4 button MovieClip instances. Once the user clicks a button, all the EventListeners the button attached to (Mouse\_OVER, Mouse\_OUT, CLICK) are removed until you click another one. Then the previous button gets these listeners back again. One button is always active at a time, so you can’t turn on/off buttons.  
I thought it would be easier to write a ButtonClass and link the button MovieClip to it. But I had to realize that I can’t listen that previous button from that class, because it only listens itself obviously. I’m trying to use “dispatchEvent” but I can’t get it to work.  
In the flash movie I have only one frame, 'cause I’m trying to do this without the timeline. I want to use Classes and this and that to practice but I’m stuck with this problem.  
I hope I was clear about this and if you have any idea or something, I’d be happy…

Bless
