1 Reply Latest reply on Dec 17, 2012 10:28 AM by elainecc

    Timeline Trouble

    elmo1999

      Hi,  I am thinking this has to be an easy answer but after not being able to figure it out for the last several hours, it's time to post. How do I get the main time line and all of the symbol timelines to stop at say 500ms and then have them all start up again after a click event or mouseover event? Right now, the main timeline stops and then will continue on the click event. However all the symbol timelines contine on.

       

      Thank you in advance for shedding any light on this for me. -Matt

       

      Here is my code:

       

      (function($, Edge, compId){

      var Composition = Edge.Composition, Symbol = Edge.Symbol; // aliases for commonly used Edge classes

       

       

         //Edge symbol: 'stage'

         (function(symbolName) {

           

           

           

       

       

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 3500, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(3500);

               // insert code here

       

       

            });

            //Edge binding end

       

       

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 250, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(250);

               // insert code here

              

       

       

            });

            //Edge binding end

       

       

            Symbol.bindElementAction(compId, symbolName, "${_Advocate}", "click", function(sym, e) {

               // insert code for mouse click here

               sym.play(501);

       

       

            });

            //Edge binding end

       

       

            Symbol.bindElementAction(compId, symbolName, "${_transparent-div}", "click", function(sym, e) {

               // insert code for mouse click here

               // play the timeline from the given position (ms or label)

               sym.play(501);

       

       

            });

            //Edge binding end

       

       

           

       

       

           

       

       

           

       

       

         })("stage");

         //Edge symbol end:'stage'

        

         //=========================================================

        

         //Edge symbol: 'Symbol_1'

         (function(symbolName) {  

        

            Symbol.bindElementAction(compId, symbolName, "${_atom}", "mouseover", function(sym, e) {

               // insert code to be run when the mouse hovers over the object

               // play the timeline from the given position (ms or label)

               sym.play(5000);

       

       

            });

            //Edge binding end

       

       

            Symbol.bindElementAction(compId, symbolName, "${_atom}", "mouseout", function(sym, e) {

               // play the timeline from the given position (ms or label)

               sym.play(5250);

               // insert code to be run when the mouse is moved off the object

       

       

            });

            //Edge binding end

       

       

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 5250, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(5250);

               // insert code here

       

       

            });

            //Edge binding end

       

       

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 5500, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(5500);

               // insert code here

       

       

            });

            //Edge binding end

       

       

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 2000, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(2000);

               // insert code here

       

       

            });

            //Edge binding end

       

       

           

       

       

         })("Symbol_1");

         //Edge symbol end:'Symbol_1'

       

       

         //=========================================================

        

         //Edge symbol: 'connect'

         (function(symbolName) {  

        

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 2500, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(2500);

               // insert code here

       

       

            });

            //Edge binding end

       

       

            Symbol.bindElementAction(compId, symbolName, "${_connect}", "mouseover", function(sym, e) {

               // play the timeline from the given position (ms or label)

               sym.play(6000);

               // insert code to be run when the mouse hovers over the object

       

       

            });

            //Edge binding end

       

       

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 6250, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(6250);

               // insert code here

       

       

            });

            //Edge binding end

       

       

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 6500, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(6500);

               // insert code here

       

       

            });

            //Edge binding end

       

       

            Symbol.bindElementAction(compId, symbolName, "${_connect}", "mouseout", function(sym, e) {

               // play the timeline from the given position (ms or label)

               sym.play(6250);

               // insert code to be run when the mouse is moved off the object

       

       

            });

            //Edge binding end

       

       

           

       

       

         })("connect");

         //Edge symbol end:'connect'

       

       

         //=========================================================

        

         //Edge symbol: 'gears'

         (function(symbolName) {  

        

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 3000, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(3000);

               // insert code here

       

       

            });

            //Edge binding end

       

       

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 7250, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(7250);

               // insert code here

       

       

            });

            //Edge binding end

       

       

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 7500, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(7500);

               // insert code here

       

       

            });

            //Edge binding end

       

       

            Symbol.bindElementAction(compId, symbolName, "${_gears}", "mouseover", function(sym, e) {

               // play the timeline from the given position (ms or label)

               sym.play(7000);

               // insert code to be run when the mouse hovers over the object

       

       

            });

            //Edge binding end

       

       

            Symbol.bindElementAction(compId, symbolName, "${_gears}", "mouseout", function(sym, e) {

               // play the timeline from the given position (ms or label)

               sym.play(7250);

               // insert code to be run when the mouse is moved off the object

       

       

            });

            //Edge binding end

       

       

         })("gears");

         //Edge symbol end:'gears'

       

       

         //=========================================================

        

         //Edge symbol: 'light'

         (function(symbolName) {  

        

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 8250, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(8250);

               // insert code here

       

       

            });

            //Edge binding end

       

       

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 8500, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(8500);

               // insert code here

       

       

            });

            //Edge binding end

       

       

            Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 3500, function(sym, e) {

               // stop the timeline at the given position (ms or label)

               sym.stop(3500);

               // insert code here

       

       

            });

            //Edge binding end

       

       

            Symbol.bindElementAction(compId, symbolName, "${_light-bulb}", "mouseover", function(sym, e) {

               // play the timeline from the given position (ms or label)

               sym.play(8000);

               // insert code to be run when the mouse hovers over the object

       

       

            });

            //Edge binding end

       

       

            Symbol.bindElementAction(compId, symbolName, "${_light-bulb}", "mouseout", function(sym, e) {

               // play the timeline from the given position (ms or label)

               sym.play(8250);

               // insert code to be run when the mouse is moved off the object

       

       

            });

            //Edge binding end

       

       

         })("light");

         //Edge symbol end:'light'

       

       

      })(jQuery, AdobeEdge, "EDGE-375163220");

        • 1. Re: Timeline Trouble
          elainecc Adobe Employee

          Hi, Matt-

           

          You're going to have to manage your symbol instances separately; part of the power of independent timelines in symbols is that stopping one timeline does not stop the other.  So, if you have multiple symbols that you want to stop, you're going to have to do something like this:

           

          sym.getSymbol("mySymbolInstance1").stop();

           

          Cheers,

           

          -Elaine