3 Replies Latest reply on Nov 3, 2016 5:27 PM by kglad

    JS broke when i publish it, only works after few publishing and code comments change

    Lucasschirm

      Hello everyone,

       

      i'm new at animate cc and i hv been in this trobble for a while, when i publish my project everthing went right, but when i try to access the HTML the error is showing in the console:

       

      index.js:2646 Uncaught TypeError: lib.Interpolar2 is not a constructor(…)

       

      But, i have no problem in my code, when i change any comment in the code our code and try again, the error changes like:

       

      index.js:2749 Uncaught TypeError: lib.solo is not a constructor(…)

       

       

      if i keep changing only the comments and publishing it will eventualy work, thats my code:

       

      this.stop();

       

      this.btn.addEventListener("click", fl_ClickToGoToWebPage_3);

      var counter = 0;

      function fl_ClickToGoToWebPage_3() {

        //Create a stage by getting a reference to the canvas

          stage = new createjs.Stage("canvas");

          //Create a Shape DisplayObject.

          circle = new createjs.Shape();

       

        //set circle to red

          circle.graphics.beginFill("blue").drawCircle(0, 0, 40);

       

          //Set position of Shape instance.

          circle.x = circle.y = 50;

       

          //Add Shape instance to stage display list.

        console.log("Teste "+counter);

        counter++;

       

        //Add Child

          stage.addChild(circle);

          //Update stage will render next frame

          stage.update();

      }