Moving on: just as with the line tools tracker, once the mouse button is released were going to want to use clear() to clear the oval tools tracker and draw the final shape using the user-specified color and opacity, this time with a stroke of 0:
if(_root.isactive=="circle"){
_root.ellipsetracker.moveTo(_root.linex,(_root.liney+_root._ymouse)/2) ;
_root.layer.lineStyle(0,_root.currentcolor,0) ;
_root.layer.moveTo(_root.linex,(_root._ymouse+_root.liney)/2) ;
_root.layer.beginFill(_root.currentcolor,_root.base.opac) ;
_root.layer.curveTo(_root.linex, _root.liney,(_root._xmouse+_root.linex)/2,_root.liney ) ;
_root.layer.curveTo(_root._xmouse, _root.liney,_root._xmouse,
(_root._ymouse+_root.liney)/2 ) ;
_root.layer.curveTo(_root._xmouse,_root._ymouse,(_root._xmouse+_root.linex)/2,_root.
_ymouse) ;
_root.layer.curveTo(_root.linex, _root._ymouse,
_root.linex,(_root.liney+_root._ymouse)/2 ) ;
_root.layer.endFill() ;
_root.ellipsetracker.clear() ;
}
This uses the exact same coordinate as the tracker when the mouse is released, drawing the oval at exact size and shape specified by the user but using only a solid fill. Youll notice two new commands in bold: beginFill and endFill. The first tells Flash that it needs to fill a closed shape that will be defined by the API commands following the beginFill command, with the fill set at the color and opacity defined inside (either by variable or hex and numeric values). The latter tells Flash when it should stop filling, and nothing else. Both must be included or it wont work.


