2 Replies Latest reply on Sep 14, 2013 12:48 PM by ladobeugm

    Issues animating symbol from another nested symbol instance

    ladobeugm Level 1

      Got quite the weird issue here regarding animating a symbol when mousing over and/or out of a symbol nested inside a symbol. You can see the example here. Rollover the word VISION. What happens is another symbol animates downward using JQuery's animate feature. Mousing out brings it back up.

       

      What's actually happening? The symbol at times animates up and down uncontrolably. It eventually stops, but not necessarily in the correct spot. Is it because of all the nesting? I'm trying to keep this as clean as possible which is why I'm nesting symbols. Much like I would a Flash comp way back when.

       

      Here's the mouseover code for btnVision:

       

       

      var myBtnVision = sym.getSymbol("btnVision");

      myBtnVision.play();

      try {

          var stage = sym.getComposition().getStage()

          stage.$("secVision").animate({top: 100}, { duration: 1000 });

      } catch (error) {

          if (console && console.error) console.error("An error occured: "+error.toString(), error);

      }

       

      and here's the mouseout:

       

       

      var myBtnVision = sym.getSymbol("btnVision");

      myBtnVision.playReverse(500, false);

      try {

          var stage = sym.getComposition().getStage()

          stage.$("secVision").animate({top: 70}, { duration: 1000 });

      } catch (error) {

          if (console && console.error) console.error("An error occured: "+error.toString(), error);

      }

      I have a dropbox file with the examples at the following:

       

      https://www.dropbox.com/s/ccgapo20p233h7z/rollover.zip