4 Replies Latest reply on Dec 12, 2014 3:00 PM by Ottographix

    click event for specific timeline label?

    Ottographix Level 1

      Hello,

       

      I am creating an interactive map: San Diego Gaslamp Interactive Walking Map

      ...it is still in progress at the moment, so only a few things work.

       

      This question is in regards to the "LODGING/ACCOMMODATIONS" menu on the right hand side.

      I am trying to create 2 click events. Click to open and click to close, so I'm wondering if it's possible to do something like this:

       

      if at label 2 sym.stop("label1");

      if at label 1 sym.stop("label2");

       

      I'm not sure how to code the "if at label 2" part...or if it's even possible.

       

      Any help would be greatly appreciated!

        • 1. Re: click event for specific timeline label?
          resdesign Adobe Community Professional & MVP

          Try:

           

          var MyStop=0;

          sym.$('btn').bind("click",function(){if (MyStop==0){

          sym.stop("label1");

           

          MyStop=1;

           

          } else {

           

          sym.stop("label2");

           

          MyStop=0;

           

          }

           

          On Thu, Dec 11, 2014 at 2:28 PM, Ottographix <forums_noreply@adobe.com>

          • 2. Re: click event for specific timeline label?
            Ottographix Level 1

            Hi Redesign,

             

            Thanks for the response!

            I adjusted your code to my document and added the following to the "lodgingindexbutton", but it doesn't appear to be working:

             

            ---------------------------------------------------------------------------

             

            var MyStop=0;

             

            sym.$('lodgingindexbutton').bind("click",function(){if (MyStop==0){

            sym.stop("lodgingstart");

            MyStop=1;

             

            } else {

             

            sym.stop("lodgingover");

            MyStop=0;

            }

             

            ---------------------------------------------------------------------------

             

            Not sure if I did something wrong?...

             

            If you are up for it, I have attached the original files here:

            http://adobe.ly/1vZTtqf

             

            I am trying to add the "2 clicks" code to the "lodgingindexbutton".

            You can get to it by double-clicking the Index in the upper right corner.

            Then you will see the "lodgingindexbutton" at the top of the index.

             

            As you can see, I currently have it set to just open, then you can close it by clicking the triangle.

            This is working and will be fine, but I thought it would be nice to click open and click closed as it seems that what a user would want to do.

             

            Any help would be appreciated. Thanks so much!!

             

            Jason

            • 3. Re: click event for specific timeline label?
              resdesign Adobe Community Professional & MVP

              Something is missing, Please add this to compositionReady:

               

              var MyStop=0;

              sym.$('lodgingindexbutton').bind("click",function(){

                if (MyStop==0){

                sym.stop("lodgingstart");

                MyStop=1;

                } else {

                sym.stop("lodgingover");

                MyStop=0;

                }

              });

              • 4. Re: click event for specific timeline label?
                Ottographix Level 1

                hmm...still no worky.

                 

                I copied and pasted the code from your post directly into compositionReady and previewed it locally.

                Not sure if I'm doing something wrong?

                 

                I really appreciate your help...but please don't kill yourself trying to figure this out!

                I found a work-around that will suffice.

                 

                Thanks redesign!