Flash Navigation Menu Options
To make Flash sites more interesting, one should consider animating menus. There are several levels.
- Animating transitions
- Scrolling info between buttons
- Additional states
Each of these requires using Movie Clips instead of traditional Flash Buttons.
Animating Simple Button Transitions
You can create a Movie Clip which has animation within it. Rolling over the animation can cause the movie clip to start the animation.
You can reuse the same movie clip by only changing internal text. Do this by referencing a text instance within the movie clip during an initialization phase.
btn1.Text.text = "Home"; btn2.Text.text = "News"; btn3.Text.text = "About"; btn4.Text.text = "Contact";
You can reuse the event handlers by determining the current movie clip, and referencing it.
btn1.addEventListener(MouseEvent.MOUSE_OUT, btnOut); btn2.addEventListener(MouseEvent.MOUSE_OUT, btnOut); btn3.addEventListener(MouseEvent.MOUSE_OUT, btnOut); function btnOut (e:MouseEvent):void { var mc:MovieClip = e.currentTarget as MovieClip; mc.gotoAndStop(1); }
If you want to determine which button is active, you can store the mc variable into a global variable which has that information.