A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Annoying dropdown menu problems

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Location
    Chester
    Posts
    23

    Annoying dropdown menu problems

    Hi all,

    I always seem to have problems building drop down menus. The one im currently doing is driving me nuts. The rollover effects keep sticking to the on position meaning that 2 or more of the rollover states are on at the same time. Can anyone tell me where im going wrong?

    onClipEvent (load)
    {
    this.ready = true;
    }


    onClipEvent (enterFrame)
    {
    if (this.hitTest(_root._xmouse, _root._ymouse, false)){
    this.over = true;
    }else{
    this.over = false;
    }

    if (this.over && this.ready){
    play();
    this.ready = false;}
    if (!this.over && !this.ready){
    play();
    this.ready = true;
    }
    }

    The above is the code attached to the dropdown menu buttons. Just doesnt seem to close them properly tough. Ive also attached the .fla. Really hope someone can help im going nuts!

    Cheers
    LK
    Attached Files Attached Files
    Not witty enough to think of anything witty enough.

  2. #2
    Smile
    Join Date
    May 2006
    Location
    Sydney, Australia
    Posts
    91
    Code:
    onClipEvent (enterFrame) {
    	if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
    		if (this._currentframe<this._totalframes) {
    			this.nextFrame();
    		}
    	} else {
    		if (this._currentframe>1) {
    			this.prevFrame();
    		}
    	}
    }
    This is the code I prefer to use for any movieclip rollovers. I took the liberty of attaching it to your movie and adding some extra hit area to your sub-buttons so the user wont lose the menu when he tries to select your links.

    But you will have to fix some things, I dont have the font you were using so its been reset to default again, and I increased the fps to 20 (im addicted to smooth animation its not my fault!).

    Best of luck mate.
    Attached Files Attached Files

  3. #3
    Junior Member
    Join Date
    Aug 2004
    Location
    Chester
    Posts
    23
    Nice one mate, much appreciated.
    Not witty enough to think of anything witty enough.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center