Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Drop down close on rollover

1 view
Skip to first unread message

Stubob100

unread,
Jul 4, 2005, 10:47:17 AM7/4/05
to
Spent all day getting to this point and hit two problems that I need expert
help with.

I am building a vertical menu where each menu item opens a drop down on
rollover.

http://www.juicyfroot.co.uk/verticalmenu.htm

The two problems are:

1. I am using an invisible button beneath each drop down to close it on
rollout. As a consequence, when you rollover the area around the menu bar
(without actually touching the menu), the invisible buttons are triggering the
?close? animations.

I suspect this is a major flaw of my design and will not be able to fix this
without starting again. Just need a fresh pair of eyes to check I?m not missing
an obvious solution.

2. This one takes a little explaining. Within each drop down, I have buttons
which will eventually call scenes/pages within my website. I can rollover and
rollout of them successfully, but then when I rollover them for a second time,
it triggers the ?close? action causing the drop down to close. Hope that makes
sense ? best to try it and see what I mean.

I suspect this part will be easier to solve, but again I need a fresh look to
spot what is causing this.

Many thanks.

urami_

unread,
Jul 4, 2005, 7:20:56 PM7/4/05
to

Stubob100 wrote:
> Spent all day getting to this point and hit two problems that I need expert
> help with.
>
> I am building a vertical menu where each menu item opens a drop down on
> rollover.
>
> http://www.juicyfroot.co.uk/verticalmenu.htm
>
> The two problems are:
>
> 1. I am using an invisible button beneath each drop down to close it on
> rollout. As a consequence, when you rollover the area around the menu bar
> (without actually touching the menu), the invisible buttons are triggering the
> ?close? animations.

the button should be cut out to be ONLY outside of the roll down content not right beneath it.
Flash maintain interaction across multiple layers so the button is basically active
all the time. The idea is to make a frame out of it, so it is only trigger when you move out of the
drop down content.

> I suspect this is a major flaw of my design and will not be able to fix this
> without starting again. Just need a fresh pair of eyes to check I?m not missing
> an obvious solution.
>
> 2. This one takes a little explaining. Within each drop down, I have buttons
> which will eventually call scenes/pages within my website. I can rollover and
> rollout of them successfully, but then when I rollover them for a second time,
> it triggers the ?close? action causing the drop down to close. Hope that makes
> sense ? best to try it and see what I mean.

There is many things you did not to say incorrectly but not properly for the purpose it serves.
I suggest to jump to
http://www.macromedia.com/support/flash/showme.html
and download the Track As Menu to see how to make drop down.


--
Regards

Urami

--


<urami>
http://www.Flashfugitive.com
</urami>

<web junk free>
http://www.firefox.com
</web junk free>

Stubob100

unread,
Jul 5, 2005, 5:15:31 AM7/5/05
to
Many thanks for your reply. I tried downloading the file you suggested but
Flash reported an Unknown Error.

However I have already looked into using the Track as Menu Item option and, as
far as I am aware, it will not achieve the rollOver drop down effect. In
examples I have seen, you need to click and hold the button to activate the
menu. To me that does not seem intuitive - there is a risk that some people
might miss the menu without adding text to say Click and hold here!

Please let me know if I am wrong and the Track as Menu Item option will help
with what I am trying to achieve.

Since posting yesterday I have realised that the two problems I raised are
actually being caused by the same thing. When I rollOver the drop down buttons
for the second time, I am triggering the rollOut action on the underlying
invisible button.

I have reduced the hit area on large invisible button to a 2px frame, as you
suggest. This has helped, but the dropdowns still flicker when I move the mouse
around the menu (without touching it). I know that removing the close animation
will solve this but I am reluctant to sacrifice this.

I am on the verge of giving up, but just wondered if anyone could write me an
Actionscript to say:

if menu1 is open {
button1.onRollout {
menu1.gotoAndPlay (?close?);
}
}

I know a bit of Actionscript but can?t figure out how I can determine whether
the menu is open? Perhaps setting a variable?

Any help greatly appreciated! Or should I give up on this one?


urami_

unread,
Jul 5, 2005, 5:56:51 AM7/5/05
to

Stubob100 wrote:
> Many thanks for your reply. I tried downloading the file you suggested but
> Flash reported an Unknown Error.
>
> However I have already looked into using the Track as Menu Item option and, as
> far as I am aware, it will not achieve the rollOver drop down effect. In
> examples I have seen, you need to click and hold the button to activate the
> menu. To me that does not seem intuitive - there is a risk that some people
> might miss the menu without adding text to say Click and hold here!

IT's not the action I had in mind but the way they arrange drop down menu.
Plus the Track as Menu option itself is to allow to go across multiple
buttons while press w/o executing actions, it does not do anything else.
I wanted you to see how they demosnrate the roll out even only, your idea
is just not right for this particualr sample.

> Please let me know if I am wrong and the Track as Menu Item option will help
> with what I am trying to achieve.
>
> Since posting yesterday I have realised that the two problems I raised are
> actually being caused by the same thing. When I rollOver the drop down buttons
> for the second time, I am triggering the rollOut action on the underlying
> invisible button.
>
> I have reduced the hit area on large invisible button to a 2px frame, as you
> suggest. This has helped, but the dropdowns still flicker when I move the mouse
> around the menu (without touching it). I know that removing the close animation
> will solve this but I am reluctant to sacrifice this.
>
> I am on the verge of giving up, but just wondered if anyone could write me an
> Actionscript to say:
>
> if menu1 is open {
> button1.onRollout {
> menu1.gotoAndPlay (?close?);
> }
> }
>
> I know a bit of Actionscript but can?t figure out how I can determine whether
> the menu is open? Perhaps setting a variable?
>
> Any help greatly appreciated! Or should I give up on this one?


I would perhaps suggest different approach.
Using Hittest instead of button, hit test is more accurate and way less problematic.
Sample :
http://www.flashfugitive.com/ang-zhang/drop_down/

d/l

http://www.flashfugitive.com/ang-zhang/drop_down/drop_down.zip

Stubob100

unread,
Jul 5, 2005, 10:20:25 AM7/5/05
to
You have been a fantastic help Urami. The hitTest method has achieved exactly
what I have been searching for.

It did mean starting from scratch but it has proven worthwhile.

Please click here to see it working perfectly.

I have played with the hitTest method in the past but only to detect
collisions between movie clips. I had no idea it could be used in this context.

Just shows the power of these forums.

Thanks again.

urami_

unread,
Jul 5, 2005, 8:39:04 PM7/5/05
to

glad you work it out :)

0 new messages