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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MouseOut

Status
Not open for further replies.

WandaLL

Programmer
Jun 20, 2002
5
US
I created a expandable menu consisting of an image and one sub level. When you mouse over the image, the sub menu expands and when you mouse over the image again, the sub menu collapses. What I would really like to have happen is when you MouseOut/Off of the sub menu, it collapses.

Is the possible? I am a complete newbie to Flash and created the above Flash menu using a wizard in Dreamweaver...

Thanks...
 
It could probably be done with an invisible button covering the sub menu area, and it might envolve moving the main movie on another frame. Seems possible, although I wouldn't know where to start this, using Dreamweaver, be it with a wizard! Regards,

new.gif
 
You created a Flash movie using Dreamweaver?! Didn't know you could do that ...

Well, I hope you don't mind if I step in, oldnewbie, but there is a better way to do this than with invisible buttons, which are glitchy at the best of times. It involves making a movieClip of the outward motion of the menu (i.e. from closed to open), and then putting some script on the movieClip which plays it forward one frame at a time if the mouse pointer is over the clip, and backwards if not.

It's a pretty neat trick - drop-down menus have been so much more stable since someone figured that out. ANyways, if you want to have a look, there's a sample on:


and if you want the source file:


I'd be happy to explain anything you don't understand, or give you further help if you get stuck.
 
Stable? I tripped it on my first relatively fast move out! Regards,

new.gif
 
Well aren't you just the thorn in my side? The reason you tripped it, which incidentally will trip ANY drop-down movie, is that you have moved beyond the bounds of the SWF file.

If you use the old "invisible button" ploy, not only does it involve finger cursors in places where there are no visible buttons (bad usability), it is VERY easy to trip, purely because the "on (rollover)" and "on (rollout)" event handlers are so easy to evade. The method I described above will ONLY fail if you move outside the bounds of the SWF, and uses the finger cursor only where you can see and use a button.
 
Well, guess you're the expert! From now on I'll leave it all up to you. Regards,

new.gif
 
Thank you so very much rgstewart. I am definitely going to give this a try. Your example is perfect...

My next question is how do I add a URL?
 
<b>WandaLL</b> ... all you have to do is assign a getURL() command to the buttons in the menu. If you need help with how to do that, have a look in the Flash HELP menu, or just post here again and I'll see if I can sort you out.

<b>oldnewbie</> ... who rattled your cage? I don't claim to be an expert. I just try to help people with whatever knowledge I have picked up over the last couple of years using Flash. I don't want to challenge your position as &quot;Tek-Tips Macromedia Flash deity&quot; (with 424 stars, you obviously don't rub EVERYONE up the wrong way!), I just want to help out where I can. If I think you've provided an unsatisfactory answer, or just plain don't agree with what you've said, I (or anyone else) should be perfectly entitled to add my/their own thoughts without having it seen as trying to better you. You can't &quot;beat&quot; someone at being helpful. Please don't make me out to be the bad guy.
 
Thanks so very much rgstewart, I'll look at the Flash help and will get back with you if I can't figure it out. I suppose it's not something you would add to a parameter huh.

Sorry it took so long for me to get back with you but I've been slammed with work...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top