3 Replies Latest reply on Mar 31, 2013 7:00 AM by kglad

    I'm stuck with making drop down menu.

    solish12

      Hello everyone.

      I'm making drop down menu follwing these tutorials https://www.youtube.com/watch?v=xE7hPe8KFVw

      But after typing code it doesn't work. (The tutorial is AS3 but I have to use AS2 due to my uni project.)

       

      The code I typed is ;

       

      import fl.transitions.Tween;

      import fl.transitions.easing.Regular;

      import fl.transitions.easing.Elastic;

       

      stop();

       

      menu_con.korea_rect.visible = false;

       

      menu_con.korea_btn.addEventListener(MouseEvent.MOUSE_OVER, koreaMouseOver);

      menu_con.korea_rect.addEventListener(MouseEvent.MOUSE_OUT, koreaMouseOut);

       

      function koreaMouseOver(event:MouseEvent):Void{

          var koreaSubTween:Tween = new Tween(menu_con.korea_sub, "y", Regular.easeOut, menu_con.korea_sub.x, 175, .5, true);

      }

       

      function koreaMouseOut(event:MouseEvent):Void{

              var koreaSubTween2:Tween = new Tween(menu_con.korea_sub, "y", Regular.easeOut, menu_con.korea_sub.x, 24.5, .5, true);

      }

       

      ---

      But 'stop' didn't work so it's still visible, and the code doesn't work at all.

      Does anyone know any solutions including making drop down menu different way.

       

      Thanks

        • 1. Re: I'm stuck with making drop down menu.
          kglad Adobe Community Professional & MVP

          except for your Void x2, that's not as2 code so, if you're publishing for as2, it's not going to work.

           

          as2 would look like:

           

           

           

          import fl.transitions.Tween;

          import fl.transitions.easing.Regular;

          import fl.transitions.easing.Elastic;

           

          stop();

           

          menu_con.korea_rect._visible = false;

           

          menu_con.korea_btn.onMouseOver=koreaMouseOver;

          menu_con.korea_rect.onMouseOut=koreaMouseOut);

           

          function koreaMouseOver():Void{

              var koreaSubTween:Tween = new Tween(menu_con.korea_sub, "_y", Regular.easeOut, menu_con.korea_sub._x, 175, .5, true);

          }

           

          function koreaMouseOut():Void{

                  var koreaSubTween2:Tween = new Tween(menu_con.korea_sub, "_y", Regular.easeOut, menu_con.korea_sub._x, 24.5, .5, true);

          }

           

          • 2. Re: I'm stuck with making drop down menu.
            solish12 Level 1

            It's still not working....

            I even don't know what I've done wrong.

            Thanks for the reply though.

            • 3. Re: I'm stuck with making drop down menu.
              kglad Adobe Community Professional & MVP

              oops, use:

               

               

              import fl.transitions.Tween;

              import fl.transitions.easing.Regular;

              import fl.transitions.easing.Elastic;

               

              stop();

               

              menu_con.korea_rect._visible = false;

               

              menu_con.korea_btn.onRollOver=koreaMouseOver;

              menu_con.korea_rect.onRollOut=koreaMouseOut;

               

              function koreaMouseOver():Void{

                  var koreaSubTween:Tween = new Tween(menu_con.korea_sub, "_y", Regular.easeOut, menu_con.korea_sub._x, 175, .5, true);

              }

               

              function koreaMouseOut():Void{

                      var koreaSubTween2:Tween = new Tween(menu_con.korea_sub, "_y", Regular.easeOut, menu_con.korea_sub._x, 24.5, .5, true);

              }