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

Drop Down Menu Triggering 1

Status
Not open for further replies.

Rhiannon

Technical User
Feb 8, 2002
55
US
Hi oldnewbie,

48 hours is up! Now won't you PLEASE let me see the fla?

Rhiannon
 
Doubt it would really interest you anyways, now that you've joined the onClipEvent crowd!
I've ony used your original coding, streamlining it, changing the invisible button to the size of the whole stage except for the actual menu area, and used reverse play to close the menu.

Maybe Nukoi can break his teeth on it if you can give him a link to your present .fla.

Regards,
new.gif
 
Nevermind then. At the moment I don't have time to sit down and figure out what you mean by "reverse play" and the rest of it. I'm NEW at Flash, remember? And I don't appreciate you just coming back and giving me the url to your correct version. That's not helping me at all. I know it can be done. I hope someday I'LL be able to spit out code the way you guys do, but right now, I'm not able to.

If Nukoi or anyone else wants to look at the fla, have at it.
 
Ok! To show you I'm not such a bad sport afterall, and to make your Friday afternoon, here's a quick fix for your stuttering drop-downs.
Just add the bold to all your onClipEvent actions:
Code:
onClipEvent (load) {
    var origFoo = _parent.menu._y;
    var foo = _parent.menu._y;
    var bar = 0;
    var blockHeight = _height;
    var dropSpeed = 3;
    var alphaSpeed = 7;
    _parent.menu._alpha = 40;
}
onClipEvent (enterFrame) {
    // if (hitTest(_root._xmouse, _root._ymouse, true)) {
    // foo = origFoo+_parent.menu._height-blockHeight;
    // bar = 100;
    // } else
    if (_parent.menu.hitTest(_root._xmouse, _root._ymouse, true)
&& _root._ymouse >= 66)
Code:
 {
        foo = origFoo+_parent.menu._height-blockHeight;
        bar = 100;
    } else {
        foo = origFoo;
        bar = 0;
    }
    _parent.menu._y += (foo-_parent.menu._y)/dropSpeed;
    _parent.menu._alpha += (bar-_parent.menu._alpha)/alphaSpeed;
}

You can also get rid or your first hittest (commented out in the above), it's useless!

If you care to send me your "web sites" .fla, could allways have a look at that problem, over the weekend!

Regards,
And might I finally be blessed with your vote!
new.gif
 
Thank you for your help, and yes, you've been blessed with my vote. Don't worry about the web sites fla. I've got it working somewhat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top