# Circle drawing problem

**URL:** https://forum.kirupa.com/t/circle-drawing-problem/288735
**Category:** flash
**Created:** [May 20, 2009, 10:05am UTC](https://forum.kirupa.com/t/circle-drawing-problem/288735 "2009-05-20T10:05:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![probphp](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@probphp](https://forum.kirupa.com/u/probphp)
#### Post date: [May 20, 2009, 10:05am UTC](https://forum.kirupa.com/t/circle-drawing-problem/288735/1 "2009-05-20T10:05:52Z")

</div>

hi mates,  
Please visit this link.

[http://proto-bazar.com/sample/sample\_flash/editor\_ver0.html](http://proto-bazar.com/sample/sample_flash/editor_ver0.html)

here i can draw rectangle and line tool smoothly there are no problem.  
but i can not draw the circle smoothly as like rectangle.  
i have written the following square function to draw the rectangle which is going well.

public function square(e:Event):void  
{  
GL.mcRef.graphics.clear();  
GL.mcRef.graphics.lineStyle(3, 0x000000, 1.0);  
GL.mcRef.graphics.beginFill(0xff9900, 1.0);  
GL.mcRef.graphics.drawRect(0, 0, mouseX - GL.mouseIniX, mouseY - GL.mouseIniY);  
GL.mcRef.x = GL.mouseIniX;  
GL.mcRef.y = GL.mouseIniY;  
GL.mcRef.graphics.endFill();  
}

i have written the following drawCircle function to draw circle which is not drawing a circle as i expected like rectangle.

public function drawCircle(e:Event):void  
{  
GL.mcRef.graphics.clear();  
GL.mcRef.graphics.lineStyle(3, 0x000000, 1.0);  
GL.mcRef.graphics.beginFill(0xff9900, 1);  
GL.mcRef.graphics.drawCircle( 0, 0, mouseX-GL.mouseIniX);  
GL.mcRef.x = GL.mouseIniX;  
GL.mcRef.y = GL.mouseIniY;  
GL.mcRef.graphics.endFill();  
}

can any body help me to solve it.  
thanks a lot,  
PROB
