Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

expand menu

Status
Not open for further replies.

MichelleButler

IS-IT--Management
Apr 5, 2002
73
GB
I would like to be able to expand a menu that shows a series of options when you roll your mouse over one option. For example you have the word "Menu" and when you click on menu this then expands showing the options beneath it (or above it). I would also like to be able to highlight the words when you scroll over the options and when you have the option on MenuDown this will then allow you to go to the desired frame. I hope somebody can help.

This is what I mean:

MENU (when you roll over it with a mouse it then expands to:)

MENU
OPTION1
OPTION2
OPTION3

When your mouse leaves the menu it then decreases back to:

MENU

Your advise will be much appreciated.

Michelle
 
First, make your button for the menu. Then go to the Paint editor in Director. Do not do anything in it, just write "blank" in the naming field and press enter. Now you have a blank cast member to reference. Now put both the button(s) and the blank cast member on the stage. Then on the behavoir for the menu button, put:

on mouseWithin
sprite X.member=member "filmloop"
end
on mouseLeave
sprite X.member=member "filmloop2"
X being the sprite for blank sprite.
and "filmloop" being the name of the filmloop you are going to make. Filmloop2 being the other filmloop for the submenu

Now in your post, you said on mouseDown the submenu would show up, but you want on mouseLeave for the submenu to animate back into and upward the menu. So I have instead on mouseWithin as the triggering of the submenu. And for the filmLoop2 animation put a blank sprite at the very end of it, so it will stop on that instead of the last frame of the submenu animating.

This filmloop will be the animating submenu, and on the sprites that are the sub-buttons you can put scripts for hilite color or foreColor change; Someting like:

on mouseWithin
sprite(1).member=member "filmloop"
foreColor=rgb(X,Y,Z)
end

on mouseDown
go to frame C
end

X, Y, and Z the rgb values and C the corresponding frame for the button.

And the first line in the mouseWithin handler will keep the submenu filmloop in the sprite.

Hope this helps and makes some sense.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top