<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[BIWEB开源PHP WMS系统创始人ArthurXF肖飞的blog]]></title> 
<link>http://www.bizeway.net/index.php</link> 
<description><![CDATA[网务通 - 网务公司发展之路]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[BIWEB开源PHP WMS系统创始人ArthurXF肖飞的blog]]></copyright>
<item>
<link>http://www.bizeway.net/read.php?</link>
<title><![CDATA[FLASH AS3 画扇形函数]]></title> 
<author>ArthurXF &lt;arthurxf@gmail.com&gt;</author>
<category><![CDATA[Flash]]></category>
<pubDate>Wed, 23 Jul 2008 03:55:57 +0000</pubDate> 
<guid>http://www.bizeway.net/read.php?</guid> 
<description>
<![CDATA[ 
	<div>/*<br />*Create by Geordi 14th Feb 2008<br />*function DrawSector is drawing a sector in the flash by actionscript 3 <br />*/<br />import flash.display.MovieClip;<br />import flash.display.Sprite;<br />var stag:Sprite=new Sprite();<br />addChild(stag);<br />var moviec:MovieClip=new MovieClip;<br />stag.addChild(moviec);<br />var S_angle:int=60; </div><div>/* S_angle is expressed as a number between 0 and 360 degrees. it will draw a 60 <br />* degree sector in this example, but you could change it to what ever you want </div><div>*/<br />DrawSector(moviec,200,200,100,S_angle,270,0xffcc00);</div><div>function DrawSector(mc:MovieClip,x:Number=200,y:Number=200,r:Number=100,</div><div>angle:Number=27,startFrom:Number=270,color:Number=0xff0000):void</div><div>/*<br />* mc the movieclip: the container of the sector.<br />* x,y the center position of the sector<br />* r the radius of the sector<br />* angle the angle of the sector<br />* startFrom the start degree counting point : 270 top, 180 left, 0 right, 90 bottom , </div><div>* it is counting from top in this example. <br />* color the fil lin color of the sector<br />*/<br />{</div><div><br />/* start to fill the sector with the variable &quot;color&quot; if you want a sector without filling color ,</div><div>* please remove next line below.</div><div>*/<br />mc.graphics.beginFill(color,50); //remove this line to unfill the sector</div><div>/* the border of the secetor with color 0xff0000 (red) , you could replace it with any color </div><div>* you want like 0x00ff00(green) or 0x0000ff (blue).<br />*/</div><div>mc.graphics.lineStyle(0,0xff0000); </div><div>mc.graphics.moveTo(x,y);<br />angle=(Math.abs(angle)&gt;360)?360:angle;<br />var n:Number=Math.ceil(Math.abs(angle)/45);<br />var angleA:Number=angle/n;<br />angleA=angleA*Math.PI/180;<br />startFrom=startFrom*Math.PI/180;<br />mc.graphics.lineTo(x+r*Math.cos(startFrom),y+r*Math.sin(startFrom));<br />for(var i=1;i&lt;=n;i++)<br />{<br />startFrom+=angleA;<br />var angleMid=startFrom-angleA/2;<br />var bx=x+r/Math.cos(angleA/2)*Math.cos(angleMid);<br />var by=y+r/Math.cos(angleA/2)*Math.sin(angleMid);<br />var cx=x+r*Math.cos(startFrom);<br />var cy=y+r*Math.sin(startFrom);<br />mc.graphics.curveTo(bx,by,cx,cy);<br />}<br />if(angle!=360)<br />mc.graphics.lineTo(x,y);</div><div><br />mc.graphics.endFill(); // if you want a sector without filling color , please remove this line.<br />}</div><div>////////////////////////////////////////runing result////////////////////////////////////////////////////////</div><div>sector with fill in color: sector without fill in color:<br /><a href="http://tkfiles.storage.live.com/y1p80y4Vm7ztWq3PxweGF40XBFYKLJxICgdfYfsJpVBiQhZhhK97EPfhJD9r_Zxld9prEWNV0XvNWc" target="_blank"><img style="width: 218px; height: 210px" src="http://tkfiles.storage.live.com/y1p80y4Vm7ztWq3PxweGF40XBFYKLJxICgdfYfsJpVBiQhZhhK97EPfhJD9r_Zxld9prEWNV0XvNWc" border="0" alt="withFill" width="218" height="210" /></a> <a href="http://tkfiles.storage.live.com/y1p80y4Vm7ztWoaHR8yTnQYBbnqNUjjfzEdPtu1ZfwHF7vuEcxYoxLLsbUuWvxUw_dVkRdhkrSYVcM" target="_blank"><img src="http://tkfiles.storage.live.com/y1p80y4Vm7ztWoaHR8yTnQYBbnqNUjjfzEdPtu1ZfwHF7vuEcxYoxLLsbUuWvxUw_dVkRdhkrSYVcM" border="0" alt="withoutFill" width="252" height="214" /></a><a href="http://tkfiles.storage.live.com/y1p80y4Vm7ztWrulEcdnhfB1zRZGRZvB9XJ7n_6OXgO9WP1EEwk2iiAo5C6snaeGWS_vlOJlsf1XqQ" target="_blank"></a></div><br/>Tags - <a href="tag.php?tag=flash" rel="tag">flash</a> , <a href="tag.php?tag=as3" rel="tag">as3</a> , <a href="tag.php?tag=%E6%89%87%E5%BD%A2" rel="tag">扇形</a>
]]>
</description>
</item><item>
<link>http://www.bizeway.net/read.php?&amp;guid=0#topreply</link>
<title><![CDATA[[评论] FLASH AS3 画扇形函数]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.bizeway.net/read.php?&amp;guid=0#topreply</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>