A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [RESOLVED] Double Rollover in a menu

  1. #1
    Junior Member
    Join Date
    Jul 2008
    Posts
    3

    resolved [RESOLVED] Double Rollover in a menu

    Hi,

    I am creating a menu. You can see what it looks like so far:

    http://rogerioboccato.com/menu/menu.swf
    http://rogerioboccato.com/menu/menu.fla

    and this is the script:

    AG_logo.stop();

    hover.addEventListener(MouseEvent.ROLL_OVER,startC lip);
    function startClip(e:MouseEvent):void {
    AG_logo.gotoAndPlay(1);
    }
    hover.addEventListener(MouseEvent.ROLL_OUT,finishC lip);
    function finishClip(e:MouseEvent):void {
    AG_logo.gotoAndPlay(7);
    }


    my problem is that I want to add rollover actions on the menu items and make them clickable. This has been impossible because there is a giant invisible button (called "hover") that I have used to make the menu fade in when you rollover it and fade out when rollout...... This giant button overrides any kind of button action inside the menu. Any suggestions??

    Is there a way to make the menu fade in when you rollover it without using a button (I don't the cursor to be changed into that little hand if it is not on top of a menu item, understand?)


    I tried to be as clear as I can... If you have any questions, please let me know! I appreciate your help very much!!!

    thanks

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Remove hover, and put those listeners on stage instead...remember to make an opaque background though if you're using a transparent wmode.

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Posts
    3
    thanks for the reply... but I am not sure if i solves it...
    what if i need the background to be transparent?
    any solutions?

    thank you very much

  4. #4
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    It should still work if you put in a background fill with 0% alpha, just so long as there's an object for the mouse to register...it can't be blank stage.

  5. #5
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Hey if this still isn't working, try putting a 'gotoAndStop(1)' in the end of your AG_logo MC instead of the stop(), and put this into your first frame:

    PHP Code:
    AG_logo.stop();
    stage.addEventListener(MouseEvent.MOUSE_MOVEstartClip);

    function 
    startClip(e:MouseEvent):void{
        if(
    AG_logo.currentFrame 6AG_logo.play();
    }

    stage.addEventListener(Event.MOUSE_LEAVEfinishClip);
    stage.addEventListener(Event.DEACTIVATEfinishClip);

    function 
    finishClip(e:Event):void{
        if(
    AG_logo.currentFrame == 6){
            
    AG_logo.play();
        } else {
            
    AG_logo.gotoAndPlay(12 AG_logo.currentFrame);
        }

    Also, delete the hover object.

  6. #6
    Junior Member
    Join Date
    Jul 2008
    Posts
    3
    this might seem rather stupid....
    but how do I make the background opaque?
    sorry to bother you with these newbie questions.
    but thanks very much for the help anyway

  7. #7
    Junior Member
    Join Date
    Jul 2008
    Posts
    3
    It Worked!!!! Thank You Very Much

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