21 Replies Latest reply on May 16, 2016 8:04 AM by joel_pau

    How can I randomly play labels on timeline?

    Rightside Level 1

      Hi,

       

      I'm trying to randomly play a label on the timeline in Edge Animate (CC2015), but I can't get it to work.

      The animation starts and calls a function that should randomly play a label (0,1,2,3,4,5,6,7,8,9 or 10) on the main stage.

      Below is the code I'm using. Does anybody know what I'm doing wrong?

       

      ---

       

      var randomNumber;

       

      function pickRandom(){

      randomNumber = Math.floor(Math.random()*10);

      }

      pickRandom();

       

      sym.play("randN");

       

      ---

       

      Help is very welcome!

       

      Thanks in advance.