2 Replies Latest reply on Sep 4, 2015 10:03 AM by Pixones

    Variable + Loop = "undefined"

    Pixones Level 1



      I want to make only one loop in my animation and then continue.

      To this I added a trigger on my timeline and added this code:


      if (typeof oneLoop == 'undefined') {
        var oneLoop = true;
      if (oneLoop) {
        oneLoop = false;


      But the loop is infinite because the variable resets.

      How to do ?