title: Adobe Animate gotoAndStop for Movie clip
body: <p>I created HTML5-canvas and added Rectangle like Movie (Movie1)
  Then I created Animate for Movie1
  But I don't know how works JS, when I try to stop Animate.</p>
  
  <p>AS3 Action:Frame1</p>
  
  <pre><code>trace (this.Movie1);
  this.Movie1.gotoAndStop(1);
  </code></pre>
  
  <p>How I need to write it on JS ?  </p>
  
  <p>I check different way but all of them doesn't work. </p>
  
  <pre><code>this.Movie1.gotoAndStop(1);
  Movie1.gotoAndStop(1);
  </code></pre>
  
  <p>I opened console IE and saw</p>
  
  <p>SCRIPT5007: Unable to get property 'gotoAndStop' of undefined or null reference</p>
  
  <p>also I wrote second Example</p>
  
  <pre><code>this.stop();
  alert(this.Movie1);// output: MovieClip (name=null) 
  //this.Movie1.gotoAndStop(1);
  
  this.addEventListener('click', alertpopup);
  
  function alertpopup(){
  
      //this.Movie1.gotoAndStop(1);
      alert(this.Movie1); // output:  undefined ???
  }
  </code></pre>
  
  <p>So, I decided this task only when I inserted code in generated HTML file at the end Function Init(). Something like this</p>
  
  <pre><code>var canvas, stage, exportRoot;
  function init() {
      // --- write your JS code here ---
  
      canvas = document.getElementById("canvas");
      exportRoot = new lib.ExAS3_Canvas();
  
      stage = new createjs.Stage(canvas);
      stage.addChild(exportRoot);
      stage.update();
  
      createjs.Ticker.setFPS(lib.properties.fps);
      createjs.Ticker.addEventListener("tick", stage);
  
      Update(exportRoot);
  }
  
  function Update(root){
    &lt;!-- write your code here --&gt;
    root.stop();
    //this.Movie1.name = 'Movie1';
    console.log("m=" + root.Movie1);
     root.Movie1.stop();
  
     root.Movie1.addEventListener('click', alertpopup);
  
     function alertpopup(){  
          root.Movie1.gotoAndStop(1);
          console.log("r=" + root.Movie1);
      }
  }
  </code></pre>
  
  <p>Why the code is not working from the IDE ?  </p>
  
  <p>I try to change <code>this</code> on my first frame on <code>exportRoot</code> and it works partially </p>
  
  <pre><code>//this.Movie1.stop(); // it doesn't work 
  //exportRoot.Movie1.stop(); // it doesn't work 
  this.Movie1.addEventListener('click', alertpopup);
  var i = 0;
  function alertpopup(){
      i++;
      if(i==2) i = 0;
      exportRoot.Movie1.gotoAndStop(i);                       
  }
  </code></pre>