for文で円を描画
♥0 |
Line 19 |
Modified 2010-05-30 15:44:27 |
MIT License
archived:2017-03-20 13:27:18
ActionScript3 source code
/**
* Copyright hacker_szoe51ih ( http://wonderfl.net/user/hacker_szoe51ih )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/d2DU
*/
// forked from hacker_szoe51ih's forked from: flash on 2010-5-2
// forked from hacker_szoe51ih's flash on 2010-5-2
package {
import flash.display.*;
[SWF(width = "465", height = "465", frameRate = "30", backgroundColor = "#000000")]
public class DrawCircle2 extends Sprite {
public var hankei:Number=100;
public function DrawCircle2() {
graphics.beginFill(0x2222dd);
graphics.lineStyle(2,0x00ff22);
graphics.moveTo(200+hankei,200);
//for文で円を描画
for(var i:int=0; i<360; i++){
var radian:Number=i*Math.PI/180;
graphics.lineTo(
200+hankei*Math.cos(radian),200+hankei*Math.sin(radian)
)
}
graphics.endFill();
}
}
}