flash on 2010-1-12
♥0 |
Line 36 |
Modified 2010-01-13 00:43:50 |
MIT License
archived:2017-03-20 04:00:49
ActionScript3 source code
/**
* Copyright uepon24 ( http://wonderfl.net/user/uepon24 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/7Djx
*/
package
{
import flash.display.Sprite;
public class Index extends Sprite
{
public function Index()
{
var myCircle1:DrawCircle2 = new DrawCircle2();
var myCircle2:DrawCircle2 = new DrawCircle2();
myCircle1.x = 50;
myCircle2.y = 200;
addChild(myCircle1);
addChild(myCircle2);
}
}
}
import flash.display.Sprite;
class DrawCircle2 extends Sprite
{
public function DrawCircle2()
{
graphics.beginFill(0x00FFFF);
graphics.lineStyle(2, 0x0000FF);
graphics.moveTo(20+10, 30);
//描画
var d:int = 0;
while( d < 360 )
{
var radian:Number = d * Math.PI / 180;
graphics.lineTo(
20 + 10 * Math.cos( radian ),
30 + 10 * Math.sin( radian ) );
d++;
}
graphics.endFill();
}
}