2 Replies Latest reply on Jul 20, 2015 11:49 AM by ryan_pu

    nesting click functions?

    ryan_pu Level 1

      so adding an event listener is easy but how would I go about creating a progressive script. I have a next button that gives directions and I am having the weirdest time finding how edge wants me to do things. In JS I just nest CLICK listeners.

       

      example:

      Click: "Hi!"

           Click: "let's learn about the sky"

                Click: "the sky is blue"

       

      I am trying to find how to do this with a single symbol.

        • 1. Re: nesting click functions?
          ryan_pu Level 1

          So I have learned about using the time line and just go to and stop. I learned about labels. I learned about testing for milliseconds  to find where you are and activate next animation based on current location.

           

          Labels would be much easier for the content developers to use than ms so how would I write

           

          var pos = sym.getPosition()

          switch(pos)

          {

            case 1000: alert(pos);

          }

           

          so that it didn't test for ms but tested for "one" (one is my first label)?

          • 2. Re: nesting click functions?
            ryan_pu Level 1

            Looks like my thinking out loud fixed my own issue.

             

            Added to timeline:

            Label = "One";

             

            Then added to click:

            var pos = sym.getPosition()

             

            switch(Label)

            {

              case "One": alert(pos);

            }