title: How to convert a Shape to MovieClip using ActionScript 3.0 only
body: <pre><code>import flash.display.Shape;
  import flash.display.Graphics;
  
  
  stage.addEventListener(Event.ENTER_FRAME, startAnim);
  
  function startAnim(e:Event):void
  {
      var shape1:Shape = new Shape();
      shape1.graphics.beginFill(0x333333,1);
      shape1.graphics.drawRect(40,50,250,125);
      shape1.graphics.endFill();
  
      addChild(shape1); // this will add a shape of rectangle to stage
  
  }
  </code></pre>
  
  <p>This is a very simple function creating a rectangle shape on stage. Ok but the problem is how can I convert this <strong>SHAPE</strong> to <strong>MOVIECLIP</strong> using ActionScript only so I can add Events to the same (<strong>shape1</strong>).</p>