mouse over effect

Posted on 2004-11-04
Medium Priority
Last Modified: 2012-05-05
i am trying acheive the following navigation effect in flash mx 2004

i have a trigger button
when the mouse is placed on the button
the items on a menu are highlight one by one

what i am trying to do is when the trigger button is pressed i want the last highlighted button to remain hightlighted then the new scene will be loaded

does anyone know the action script that will cause this effect
i have tried a few things

currently i have the trigger button as a movie clip
when the mouse is over the button
the movie hightlights all the menu options in turn

i have tried to put a
on (press)
on the individual keyframes in the movie
but to no effect

any ideas would be gratefully appreciated

Question by:liseperu
  • 3
  • 2
LVL 16

Expert Comment

ID: 12500542

Hope I don't misunderstand your meaning

Please download the sample file here

The logic is like this

The menu is a movieclip which continuously highlight a certain item
I name this movieclip menu_set

And then make another circle movieclip called trigger_button

Attach the following code

_root.trigger_button.onRelease = function () // when the trigger button is click and release
      _root.menu_set.stop(); // the menu set's movie stops

Hope I got your meaning
Vicker :)

Author Comment

ID: 12517647
that worked a treat
do you have any idea how i could assign a scene to the buttons
so when you press the button it will goto that scene after a 2 second pause?

thanks in advance

Author Comment

ID: 12517664
perhaps i should clarify

i am trying to assign different  scenes to all the individual sections of the menu in the menu_set
the scenes are acessed by pressing  trigger_button
and when it rolls over trigger_button is just cycles through the options as before (which is complete)

LVL 16

Accepted Solution

vickerleung earned 800 total points
ID: 12517946

The method to do can be this way

Assuming you have a scene in frame 100 called scene_2, another scene in frame 110 called scene_3, etc

You can add the following code to the trigger button like this

_root.trigger_button.onRelease = function () // when the trigger button is click and release
     _root.menu_set.stop(); // the menu set's movie stops
     if (_root.menu_set._currentframe < 10) _root.target_frame = "scene_2";
     else if (_root.menu_set._currentframe < 20) _root.target_frame = "scene_3";
     .......... // This section is use to detect where the menu set stoped, and then set the corresponding scene to jump to

     _root.gotoAndPlay ("delay_frame"); // Jump to the delay frame

On frame 50, make a keyframe (actually anywhere is okay) name it delay_frame
On frame 75, make a keyframe add the following code

gotoAndPlay (_root.target_frame);

The logic behind is that between frame 50 and 75, there is a 2 seconds gap,
after the gap, it will jump to the target frame.

If samples needed, I can provide tomorrow~
Cheer :)

Author Comment

ID: 12558004
thanks for all your help
i have sorted it

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question