```
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

}

```

This is a very simple function creating a rectangle shape on stage. Ok but the problem is how can I convert this **SHAPE** to **MOVIECLIP** using ActionScript only so I can add Events to the same (**shape1**).