PDA

View Full Version : drawRoundRect help



Navarone
January 12th, 2010, 02:54 PM
In drawing a rounded rectangle using the drawRoundRect method is there anyway to smooth out the corner. In my example the corners look like crap.



var rect:MovieClip = new MovieClip();
var color:Number = Number("0x"+listColor);
rect.graphics.beginFill(color);
rect.graphics.lineStyle(1, 0x000000);
rect.graphics.drawRoundRect(0,0,w,h,5);
rect.graphics.endFill();

Shaedo
January 12th, 2010, 03:37 PM
This might be what you are after:

http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Graphics.html#lineStyle()

Ziggwies
January 12th, 2010, 03:37 PM
Try this...



var rect:MovieClip = new MovieClip();
var color:Number = Number("0x"+listColor);
rect.graphics.beginFill(color);
rect.graphics.lineStyle(1, 0x000000, 1, true);
// rect.graphics.lineStyle(1, 0x000000);
rect.graphics.drawRoundRect(0,0,w,h,5);
rect.graphics.endFill();