title: How to add symbols to a container using createJS in Flash (or Animate CC)
body: <p>I've done this in action script, but can't figure out how to do it in javascript for a html5 canvas project in Animate CC.</p>
  
  <p>Basically, I have two buttons on the stage that add a symbol instance to a container. The symbols added to the container contain action script that makes them drag and dropable. There is also a reset button that clears empties the container. I am trying to figure out how to do this same thing in javascript (specifically adding the symbol instances to a container). Here is my action script on the main timeline:</p>
  
  <pre><code>import flash.display.Sprite;
  
  
  //creates container that we'll add instances to
  var container:Sprite = new Sprite();
  addChild(container);
  container.x = 577;
  container.y = 500; 
  
  //*******Button Man 1******//
  slider.btn_man1.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
  function fl_MouseClickHandler(event:MouseEvent):void
  {
      //adds symbol instance of man1_Instance to the container
      var man1:man1_Instance = new man1_Instance();
      container.addChild(man1);
  }
  
  
  //*******Button Man 2******//
  slider.btn_man2.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler1);
  function fl_MouseClickHandler1(event:MouseEvent):void
  {
      //adds symbol instance of man2_Instance to the container
      var man2:man2_Instance = new man2_Instance();
      container.addChild(man2);
  }
  
  //****Reset button****//
  btn_reset.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_4);
  
  function fl_MouseClickHandler_4(event:MouseEvent):void
  {
      container.removeChildren();
  
  }
  </code></pre>