0 Replies Latest reply on Mar 9, 2011 12:21 AM by name:)

    ROLL_OVER in 3.0 action script

    name:)

      Hy everyone!

       

      I have a little problem with drop down menu in Flash CS5 with 3.0 action script (I'm new in flash so..). I'll try to explain, and I hope that someone will help me.

       

      I have 2 main buttons, and both have drop down menu. I use invisible movie clip behind main menu and submenu.. It suppose to work like.. when I'm with the mouse above the main button, drop down menu show up, and when I move my mouse out of main button, drop down menu suppose to be invisible. Well, in my case, drop down menu show up when I'm above, but when I even try to go with mouse on submenu (when I crosse the line of main button) sub menu disappear. So, what I'm doing wrong?

       

       

      I put this is action script: (*invisClip is invisible movie clip behind everything and btn3 and btn5 are 2 main buttons)

       

       

       

       

      //ROLL_OVER fuctions for all main buttons .. and this works, submenu is jumping every time

       

      function main1Over(event:MouseEvent):void

      {

      gotoAndPlay("down1");

      }

      function main2Over(event:MouseEvent):void

      {

      gotoAndPlay("down2");

      }

       


       

      btn3.addEventListener(MouseEvent.ROLL_OVER, main1Over);

      btn5.addEventListener(MouseEvent.ROLL_OVER, main2Over);

       

       

       


      //Action Script for invisible btn3

       

       

       

       

      function invisClipOver(event:MouseEvent):void

      {

      gotoAndStop(1);

      }

       

      invisClip.addEventListener(MouseEvent.ROLL_OVER, invisClipOver);

       

       

       

      //Action Script for invisible btn5

       

      function invisClip2Over(event:MouseEvent):void

      {

      gotoAndStop(1);

      }

      invisClip.addEventListener(MouseEvent.ROLL_OVER, invisClip2Over);

       

       

       

       

      If this can help, I try to do the same effect like in this tutorial: http://www.youtube.com/watch?v=ZetBttJ3V7I , but I probable miss something.