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

Problem with fast rollout of a pop-up menu? 2

Status
Not open for further replies.

mustang50

Technical User
Apr 2, 2001
22
US
I am Having a problem with a drop down menu. one button that drops into five buttons. On rollout it is suppose to go back to one button, it works if you rollout slowly, but if you rollout fast it stays open as five buttons
 
In fact, this tutorial might not quite answer your question! Read your post a bit quickly!
What's your code? On both the rollover & rollout?
What's the size of your hit area on the main button? Does it cover the space occupied by the other buttons?

;-)
 
I do not have to click on it, it is a mouse over, but when I rollout of the buttons to fast it stays open as five buttons instead of going back to one button.

Thanks for your help
 
Downloaded! Will have a quick look at it... But it's getting late here and I'm sort of tired! So... Maybe only in the mornin'!

;-)
 
that is fine i will see you tomorrow.

Thanks again
 
Ok! 4:00am! I've been at it for a while! Changed a few things... but although it seems a little better (it doesn't seem to stick as much!)... It still does!

While testing this with a copy of your html... I tried the movie on it's own:
as your's:

...And that seems to work much better! So maybe your html is part of the problem!

Best I can do... Maybe Dave can have a look at it!
I'm am going to bed!

;-)
 

Looks like you're only using a button for this (ie: the menu options are contained on the OVER frame). Drop-down menus work much better if you use mc's. See HELP>SAMPLES>TRACK-AS-MENU. If you have teid this, just send me the zipped up version of you're file.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
Problem solved.

Create a movie-clip. In the first frame insert the following actions:


if (_root._xmouse >120) {
with (_root) {
prevFrame ();
}
}
if (_root._ymouse >135) {
with (_root) {
prevFrame ();
}
}


Right click on the first frame and select 'insert frame'. Now just drag a copy of this onto the main stage.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
better add the extra 'or' statement just to be 100%:


if ((_root._xmouse >120) or (_root._xmouse < 0)) {
with (_root) {
prevFrame ();
}
}
if ((_root._ymouse >135) or (_root._ymouse < 0)) {
with (_root) {
prevFrame ();
}
}


dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
did I say solved? LOL OK, now committed to this one! back in a tick.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
LOL, OK, lets explain this. The whole problem is caused because an embedded flash movie detects mouse movement (without jscript) only when the cursor is over the movie. Combine this with the fact that the flash movie detects the mouse on a per-frame basis then you get scenarios where the mouse 'jumps' out of the movie, fooling Flash into thinking the mouse is still there. Hence the 'stuck' menu. I couldn't think of a way to to this without javascript integration (and you'd have to ask someone else about that), but what I could come up with was a timer function.

The timer function is held within a constantly looping movie-clip. In the first frame of the movie-clip the y-position of the mouse is detected. 36-ish (ie: 3 seconds later in a 12fps movie) frames later the y-position of the mouse is detected again and compared with the original value. If they're the same then '_root' is told to go back to frame 1 (ie: the menu goes up again). This means that if the mouse does jump out of the embedded movie, the y-position remains the same from that point onwards, thus the menu closes itself.

It isn't an ideal solution, but all I can come up with for now.

What I've added: a movie-clip (timer control); actions on each of the buttons in the drop-down menu.

davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
Hi Dave!
No offense... But this still seems to stick a lot!
Must be some way to do this without javascript integration!
Maybe changing the concept a little...

;-)

PS: There was some actions on the menu's buttons... Symbol 23.
 
hi old, isn't it closing after a pause on your side? dang, tested it to death here too!

Seems like there's an obvious answer to this one doesn't there, maybe we're thinking too hard.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top