<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Drawing a Closed Arc Shape</title>
	<atom:link href="http://www.pixelwit.com/blog/2008/12/drawing-closed-arc-shape/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pixelwit.com/blog/2008/12/drawing-closed-arc-shape/</link>
	<description>Making Flash Go</description>
	<lastBuildDate>Fri, 03 Feb 2012 01:38:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: carl</title>
		<link>http://www.pixelwit.com/blog/2008/12/drawing-closed-arc-shape/comment-page-1/#comment-126243</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Mon, 21 Mar 2011 01:10:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=748#comment-126243</guid>
		<description>Modified Jeff T&#039;s As3 version to put the angle conversions inside the function rather than in the constructor
Also added a check for angles larger than 360 
&lt;code lang=&quot;actionscript&quot;&gt;//FROM PIXELWIT.COM (MODIFIED TO USE AS3 by Jeff T)
//FROM PIXELWIT.COM (MODIFIED Jeff T Version by Carl L)
//checks for proper angles and angle coversion inside functin 
// The DrawSolidArc function takes standard arc drawing
// arguments but the &quot;radius&quot; has been split into 2 different
// variables, &quot;innerRadius&quot; and &quot;outerRadius&quot;. drawObj is the object you have created to draw into (Shape, MovieClip, etc...)
function drawSolidArc (drawObj:Object, centerX:Number,centerY:Number,innerRadius:Number,outerRadius:Number,startAngle:Number,arcAngle:Number,steps:int=20):void {
    //
	//make sure angles are proper
	if (Math.abs(startAngle)&gt;360)startAngle%=360
	if (Math.abs(arcAngle)&gt;360)arcAngle%=360
	//convert angles to percentages
	startAngle/=360,arcAngle/=360
	
    // Used to convert angles [ratio] to radians.
    var twoPI:Number = 2 * Math.PI;
    //
    // How much to rotate for each point along the arc.
    var angleStep:Number = arcAngle/steps;
    //
    // Variables set later.
    var angle:Number, i:int, endAngle:Number;
    //
    // Find the coordinates of the first point on the inner arc.
    var xx:Number = centerX + Math.cos(startAngle * twoPI) * innerRadius;
    var yy:Number = centerY + Math.sin(startAngle * twoPI) * innerRadius;
    //
    //Store the coordinates.
    var xxInit:Number=xx;
    var yyInit:Number=yy;
    //
    // Move to the first point on the inner arc.
    drawObj.graphics.moveTo(xx,yy);
    //
    // Draw all of the other points along the inner arc.
    for(i=1; i&lt;=steps; i++) {
        angle = (startAngle + i * angleStep) * twoPI;
        xx = centerX + Math.cos(angle) * innerRadius;
        yy = centerY + Math.sin(angle) * innerRadius;
        drawObj.graphics.lineTo(xx,yy);
    }
    //
    // Determine the ending angle of the arc so you can
    // rotate around the outer arc in the opposite direction.
    endAngle = startAngle + arcAngle;
    //
    // Start drawing all points on the outer arc.
    for(i=0;i&lt;=steps;i++) {
        //
        // To go the opposite direction, we subtract rather than add.
        angle = (endAngle - i * angleStep) * twoPI;
        xx = centerX + Math.cos(angle) * outerRadius;
        yy = centerY + Math.sin(angle) * outerRadius;
        drawObj.graphics.lineTo(xx,yy);
    }
    //
    // Close the shape by drawing a straight
    // line back to the inner arc.
    drawObj.graphics.lineTo(xxInit,yyInit);
};

//
//And, to call this function and do the fill, and //show the object, you need to use:

//import flash.display.graphics;
var myArc:Shape = new Shape(); //or another DisplayObject
myArc.graphics.lineStyle(3);
myArc.graphics.beginFill(0x000000, 0.50);
drawSolidArc (myArc,250, 250, 180, 200, -90, 504, 100);
myArc.graphics.endFill();
this.addChild(myArc);
//
//&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Modified Jeff T&#8217;s As3 version to put the angle conversions inside the function rather than in the constructor<br />
Also added a check for angles larger than 360</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:700px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">//FROM PIXELWIT.COM (MODIFIED TO USE AS3 by Jeff T)</span><br />
<span style="color: #808080; font-style: italic;">//FROM PIXELWIT.COM (MODIFIED Jeff T Version by Carl L)</span><br />
<span style="color: #808080; font-style: italic;">//checks for proper angles and angle coversion inside functin </span><br />
<span style="color: #808080; font-style: italic;">// The DrawSolidArc function takes standard arc drawing</span><br />
<span style="color: #808080; font-style: italic;">// arguments but the &quot;radius&quot; has been split into 2 different</span><br />
<span style="color: #808080; font-style: italic;">// variables, &quot;innerRadius&quot; and &quot;outerRadius&quot;. drawObj is the object you have created to draw into (Shape, MovieClip, etc...)</span><br />
<span style="color: #000000; font-weight: bold;">function</span> drawSolidArc <span style="color: #66cc66;">&#40;</span>drawObj:<span style="color: #0066CC;">Object</span>, centerX:<span style="color: #0066CC;">Number</span>,centerY:<span style="color: #0066CC;">Number</span>,innerRadius:<span style="color: #0066CC;">Number</span>,outerRadius:<span style="color: #0066CC;">Number</span>,startAngle:<span style="color: #0066CC;">Number</span>,arcAngle:<span style="color: #0066CC;">Number</span>,steps:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//make sure angles are proper</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">abs</span><span style="color: #66cc66;">&#40;</span>startAngle<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&gt;</span><span style="color: #cc66cc;">360</span><span style="color: #66cc66;">&#41;</span>startAngle<span style="color: #66cc66;">%</span>=<span style="color: #cc66cc;">360</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">abs</span><span style="color: #66cc66;">&#40;</span>arcAngle<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&gt;</span><span style="color: #cc66cc;">360</span><span style="color: #66cc66;">&#41;</span>arcAngle<span style="color: #66cc66;">%</span>=<span style="color: #cc66cc;">360</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//convert angles to percentages</span><br />
&nbsp; &nbsp; startAngle<span style="color: #66cc66;">/</span>=<span style="color: #cc66cc;">360</span>,arcAngle<span style="color: #66cc66;">/</span>=<span style="color: #cc66cc;">360</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Used to convert angles [ratio] to radians.</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> twoPI:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">*</span> <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">PI</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// How much to rotate for each point along the arc.</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> angleStep:<span style="color: #0066CC;">Number</span> = arcAngle<span style="color: #66cc66;">/</span>steps;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Variables set later.</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> angle:<span style="color: #0066CC;">Number</span>, i:<span style="color: #0066CC;">int</span>, endAngle:<span style="color: #0066CC;">Number</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Find the coordinates of the first point on the inner arc.</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> xx:<span style="color: #0066CC;">Number</span> = centerX + <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">cos</span><span style="color: #66cc66;">&#40;</span>startAngle <span style="color: #66cc66;">*</span> twoPI<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> innerRadius;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> yy:<span style="color: #0066CC;">Number</span> = centerY + <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">sin</span><span style="color: #66cc66;">&#40;</span>startAngle <span style="color: #66cc66;">*</span> twoPI<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> innerRadius;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Store the coordinates.</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> xxInit:<span style="color: #0066CC;">Number</span>=xx;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> yyInit:<span style="color: #0066CC;">Number</span>=yy;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Move to the first point on the inner arc.</span><br />
&nbsp; &nbsp; drawObj.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">moveTo</span><span style="color: #66cc66;">&#40;</span>xx,yy<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Draw all of the other points along the inner arc.</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>i=<span style="color: #cc66cc;">1</span>; i<span style="color: #66cc66;">&lt;</span>=steps; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; angle = <span style="color: #66cc66;">&#40;</span>startAngle + i <span style="color: #66cc66;">*</span> angleStep<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> twoPI;<br />
&nbsp; &nbsp; &nbsp; &nbsp; xx = centerX + <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">cos</span><span style="color: #66cc66;">&#40;</span>angle<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> innerRadius;<br />
&nbsp; &nbsp; &nbsp; &nbsp; yy = centerY + <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">sin</span><span style="color: #66cc66;">&#40;</span>angle<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> innerRadius;<br />
&nbsp; &nbsp; &nbsp; &nbsp; drawObj.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>xx,yy<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Determine the ending angle of the arc so you can</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// rotate around the outer arc in the opposite direction.</span><br />
&nbsp; &nbsp; endAngle = startAngle + arcAngle;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Start drawing all points on the outer arc.</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>i=<span style="color: #cc66cc;">0</span>;i<span style="color: #66cc66;">&lt;</span>=steps;i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// To go the opposite direction, we subtract rather than add.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; angle = <span style="color: #66cc66;">&#40;</span>endAngle - i <span style="color: #66cc66;">*</span> angleStep<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> twoPI;<br />
&nbsp; &nbsp; &nbsp; &nbsp; xx = centerX + <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">cos</span><span style="color: #66cc66;">&#40;</span>angle<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> outerRadius;<br />
&nbsp; &nbsp; &nbsp; &nbsp; yy = centerY + <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">sin</span><span style="color: #66cc66;">&#40;</span>angle<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> outerRadius;<br />
&nbsp; &nbsp; &nbsp; &nbsp; drawObj.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>xx,yy<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Close the shape by drawing a straight</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// line back to the inner arc.</span><br />
&nbsp; &nbsp; drawObj.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>xxInit,yyInit<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">//</span><br />
<span style="color: #808080; font-style: italic;">//And, to call this function and do the fill, and //show the object, you need to use:</span><br />
<br />
<span style="color: #808080; font-style: italic;">//import flash.display.graphics;</span><br />
<span style="color: #000000; font-weight: bold;">var</span> myArc:Shape = <span style="color: #000000; font-weight: bold;">new</span> Shape<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//or another DisplayObject</span><br />
myArc.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>;<br />
myArc.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0x000000, <span style="color: #cc66cc;">0.50</span><span style="color: #66cc66;">&#41;</span>;<br />
drawSolidArc <span style="color: #66cc66;">&#40;</span>myArc,<span style="color: #cc66cc;">250</span>, <span style="color: #cc66cc;">250</span>, <span style="color: #cc66cc;">180</span>, <span style="color: #cc66cc;">200</span>, -<span style="color: #cc66cc;">90</span>, <span style="color: #cc66cc;">504</span>, <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;<br />
myArc.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>myArc<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">//</span><br />
<span style="color: #808080; font-style: italic;">//</span></div></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://www.pixelwit.com/blog/2008/12/drawing-closed-arc-shape/comment-page-1/#comment-126230</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Mon, 21 Mar 2011 00:22:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=748#comment-126230</guid>
		<description>does anyone know how to round the corners??</description>
		<content:encoded><![CDATA[<p>does anyone know how to round the corners??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grandmaof4</title>
		<link>http://www.pixelwit.com/blog/2008/12/drawing-closed-arc-shape/comment-page-1/#comment-66719</link>
		<dc:creator>Grandmaof4</dc:creator>
		<pubDate>Sat, 31 Jul 2010 16:46:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=748#comment-66719</guid>
		<description>I haven&#039;t a clue what any of you are talking about. What&#039;s the matter with using an old fashioned maths compass and just drawing two circles (or semi-circles as required) using the same central point, one inside the other? 
P.S. Tyler and Jeff. What are doing up at stupid o-clock in the morning. I thought it was only old fogeys like me that were awake at ridiculous times of night.</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t a clue what any of you are talking about. What&#8217;s the matter with using an old fashioned maths compass and just drawing two circles (or semi-circles as required) using the same central point, one inside the other?<br />
P.S. Tyler and Jeff. What are doing up at stupid o-clock in the morning. I thought it was only old fogeys like me that were awake at ridiculous times of night.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JLM</title>
		<link>http://www.pixelwit.com/blog/2008/12/drawing-closed-arc-shape/comment-page-1/#comment-36927</link>
		<dc:creator>JLM</dc:creator>
		<pubDate>Sat, 23 May 2009 23:23:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=748#comment-36927</guid>
		<description>Here is another approach sorry too lazy to update my prototype to AS3 (but just put an onLoad round it and it will work in swish as well)

&lt;code lang=&quot;actionscript&quot;&gt;
MovieClip.prototype.drawElipse=function(x,y,w,h,t,c,a,s,f,fa){
//Justin Mills, JLM at justinfront dot net, 10 October 2003
if (f==undefined) {f=c; fa=0;}else if (fa==undefined) {af=100};
if (s==undefined) {s=5;}  //smoothness
this.beginGradientFill(&#039;radial&#039;, [f,c,c,c], [fa,a,a,0], [255-s*2-t,255-s-t,255-s,255], {matrixType:&#039;box&#039;, x:x, y:y, w:w, h:h,  r:0});
this.moveTo(x,y);
this.lineStyle(1,0,0);
this.lineTo(x,y+h);
this.lineTo(x+w,y+h);
this.lineTo(x+w,y);
this.lineTo(x,y);
this.endFill();
};
depth=100;
this.createEmptyMovieClip(&quot;elipse&quot;,depth++);
elipse._x=100;
elipse._y=100;
elipse.drawElipse(0,0,100,100,100,0xff0000,100,5,0xFF0000,0); //x,y,w,h,t=4 thickness,c=red,a=100%,s=5 smoothness,f=fill, fa=fill alpha
this.createEmptyMovieClip(&quot;triMask&quot;, depth++);
triMask._x=100;
triMask._y=100;
triMask.beginFill(0x0000ff,100);
triMask.lineTo(100,0);
triMask.lineTo(50,50);
triMask.lineTo(0,0);
triMask.endFill();
elipse.setMask(triMask);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Here is another approach sorry too lazy to update my prototype to AS3 (but just put an onLoad round it and it will work in swish as well)</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0066CC;">MovieClip</span>.<span style="color: #0066CC;">prototype</span>.<span style="color: #006600;">drawElipse</span>=<span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>x,y,w,h,t,c,a,s,f,fa<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">//Justin Mills, JLM at justinfront dot net, 10 October 2003</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>f==<span style="color: #0066CC;">undefined</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>f=c; fa=<span style="color: #cc66cc;">0</span>;<span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>fa==<span style="color: #0066CC;">undefined</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>af=<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#125;</span>;<br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>s==<span style="color: #0066CC;">undefined</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>s=<span style="color: #cc66cc;">5</span>;<span style="color: #66cc66;">&#125;</span> &nbsp;<span style="color: #808080; font-style: italic;">//smoothness</span><br />
<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">beginGradientFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'radial'</span>, <span style="color: #66cc66;">&#91;</span>f,c,c,c<span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#91;</span>fa,a,a,<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">255</span>-s<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">2</span>-t,<span style="color: #cc66cc;">255</span>-s-t,<span style="color: #cc66cc;">255</span>-s,<span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>matrixType:<span style="color: #ff0000;">'box'</span>, x:x, y:y, w:w, h:h, &nbsp;r:<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">moveTo</span><span style="color: #66cc66;">&#40;</span>x,y<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>x,y+h<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>x+w,y+h<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>x+w,y<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>x,y<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span>;<br />
depth=<span style="color: #cc66cc;">100</span>;<br />
<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">createEmptyMovieClip</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;elipse&quot;</span>,depth++<span style="color: #66cc66;">&#41;</span>;<br />
elipse.<span style="color: #0066CC;">_x</span>=<span style="color: #cc66cc;">100</span>;<br />
elipse.<span style="color: #0066CC;">_y</span>=<span style="color: #cc66cc;">100</span>;<br />
elipse.<span style="color: #006600;">drawElipse</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">100</span>,0xff0000,<span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">5</span>,0xFF0000,<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//x,y,w,h,t=4 thickness,c=red,a=100%,s=5 smoothness,f=fill, fa=fill alpha</span><br />
<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">createEmptyMovieClip</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;triMask&quot;</span>, depth++<span style="color: #66cc66;">&#41;</span>;<br />
triMask.<span style="color: #0066CC;">_x</span>=<span style="color: #cc66cc;">100</span>;<br />
triMask.<span style="color: #0066CC;">_y</span>=<span style="color: #cc66cc;">100</span>;<br />
triMask.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0x0000ff,<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;<br />
triMask.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;<br />
triMask.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">50</span>,<span style="color: #cc66cc;">50</span><span style="color: #66cc66;">&#41;</span>;<br />
triMask.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;<br />
triMask.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
elipse.<span style="color: #0066CC;">setMask</span><span style="color: #66cc66;">&#40;</span>triMask<span style="color: #66cc66;">&#41;</span>;</div></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: marije</title>
		<link>http://www.pixelwit.com/blog/2008/12/drawing-closed-arc-shape/comment-page-1/#comment-36364</link>
		<dc:creator>marije</dc:creator>
		<pubDate>Thu, 14 May 2009 20:27:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=748#comment-36364</guid>
		<description>I was wondering how i can trace the coordinates of the arcs individually. I work in as3 and the strange thing is that he traces now for every item the x position as 0... how is this possible? And how can i fix it?</description>
		<content:encoded><![CDATA[<p>I was wondering how i can trace the coordinates of the arcs individually. I work in as3 and the strange thing is that he traces now for every item the x position as 0&#8230; how is this possible? And how can i fix it?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

