1 Reply Latest reply on Jan 2, 2014 6:06 AM by resdesign

    User to select one of six symbol animations?

    SJZuckie

      I would like the user to select any of six animations. I would like for a rollover to select the specific animation and with mouseout the animation resets to the beginning so that they can again select any of the six animations. Does anyone have any ideas how this should be done? Thanks for your help.

       

      Steve

        • 1. Re: User to select one of six symbol animations?
          resdesign Adobe Community Professional & MVP

          Hello,

          I suppose you have 6 symbols. I would use mouseenter and mouseleave and in mouseleave I would reset each symbol with sym.stop(0);

          you can add this code in compositionReady for each symbol:

           

          sym.$('yourSymbolName').mouseleave(function(){

              sym.getSymbol('yourSymbolName').stop(0);  // symbol

           

          });

           

          or you could group the symbols in a group in the elements panel (select symbols right-click -and choose group Elements in div) say named symAnimation and then use this:

           

          var symAnimation = sym.$("symAnimation ").children();    

           

           

          $.each(symAnimation ,function(i){

                    $(this).on("mouseenter", function(){

                   sym.getSymbol(i).play();

          });

           

            $(this).on("mouseleave", function(){   

                sym.getSymbol(i).stop(0);

          });

           

           

          })

           

           

          If you need to go back to some place on the main timeline you can also add in the mouseleave:

          sym.getComposition()getStage().stop(0);

          1 person found this helpful