flash on 2012-11-20

by ifree
♥0 | Line 20 | Modified 2012-11-20 16:08:45 | MIT License
play

ActionScript3 source code

/**
 * Copyright ifree ( http://wonderfl.net/user/ifree )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/4nkW
 */

package {
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var radius:Number=113.2;

            

            graphics.lineStyle(5,0xff0000);
            //shape.graphics.beginFill(0xf0f00f);

            for(var i:int=0;i<=5;i++){

                var ang:Number=(30+60*i)/180*Math.PI;

                var _x:Number=Math.cos(ang)*radius+300;

                var _y:Number=Math.sin(ang)*radius+300;

                if(i==0){
                    graphics.moveTo(_x,_y);
                }
                graphics.lineTo(_x,_y);
                graphics.moveTo(_x,_y);

            }
            //graphics.lineTo(_x,_y);
            graphics.moveTo(_x,_y);
        }
    }
}