package {
import flash.display.MovieClip;
public class abc extends MovieClip{
public
function abc(w:Number=40,h:Number=40,color:Number=0xff0000) {
// constructor code
graphics.beginFill(color);
graphics.drawEllipse(0,0,w,h);
graphics.endFill();
}
}
}
import flash.sampler.NewObjectSample;
import flash.events.MouseEvent;
stage.addEventListener(MouseEvent.MOUSE_MOVE,makeshape);
function makeshape(e:MouseEvent):void{
var ellipse:abc=new abc();
addChild(ellipse);
ellipse.x=mouseX;
ellipse.y=mouseY;
}