drawstarを3回使う

by UKI0809
3回星を描く

関数名をDRAWSTARにする。

それを3回繰り返すようにする
♥1 | Line 21 | Modified 2011-01-12 18:22:42 | MIT License
play

ActionScript3 source code

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

package {
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            graphics.lineStyle(20,0x00000);
            drawStar();
            graphics.lineStyle(10,0x0000ff);
            drawStar();
            graphics.lineStyle(2,0x00ff00);
            drawStar();
        }
        private function drawStar():void{
            graphics.moveTo(50,100);
            graphics.lineTo(250,100);
            graphics.lineTo(100,220);
            graphics.lineTo(150,50);
            graphics.lineTo(200,220);
            graphics.lineTo(50,100);
            
            
        }
    }
}