2 Replies Latest reply on Nov 8, 2017 7:17 AM by t.tenz

    mouseout goto and play movieclip (nr).

    t.tenz

      Hello There

       

      since 8 years I never touched flash/animate again. Now I have want to make a simple button animation with a movie clip.

       

      in my scene I have a button-object and when I hover over it the movie clip inside begins to play.

       

      here is the fla-file: WeTransfer

       

      It looks good but I want to have a smoother look when I hover-out with my mouse.

      Because I have "stop" code in the middle of the animated movieclip. and I have following script on that button:

       

      stage.enableMouseOver(3);

      _this.archi.on('mouseout', function(){

       

      _archi.archi_mov.gotoAndPlay(41);

      });

       

       

      Sadly the mouseout doesn't work. Did I select the right movieclip?

       

      Can you look at the .fla file and tell me what I did wrong?

       

      Thank you guys!

       

      -tenzin

        • 1. Re: mouseout goto and play movieclip (nr).
          Nipun Asthana Adobe Employee

          Yes you should be able to do that easily.

          FIrstly, you need to use the same symbol for both the states inside your button (archi_mov). You don't even need a button in the first place. Just using the inner movieclip should do.

           

          Next, you should correct how you access your symbols in the code ('this.instanceName')

           

          You can try the below code:

           

          stage.enableMouseOver(3);

          _this.archi.on('mouseover', function(){

           

          this.archi_mov.gotoAndPlay(1);

          });

          _this.archi.on('mouseout', function(){

           

          this.archi_mov.gotoAndPlay(40);

          });

          • 2. Re: mouseout goto and play movieclip (nr).
            t.tenz Level 1

            Hi Nipun,

             

            Thank you for your answer.

             

            Ok, great. So I don't need the button and can do it only with the movieclip.

            I did tried you code but it seams that it wound play correctly.

             

            Please look at the new .fla file: WeTransfer

            (I did only the archi_mov clip)

             

            thank you.