flash on 2012-5-29

by tepe
♥0 | Line 24 | Modified 2012-05-29 18:10:06 | MIT License
play

ActionScript3 source code

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

package {
    import flash.text.TextField;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        private var tf:TextField = new TextField();
        public function FlashTest() {
            // write as3 code here..
            addChild(tf);
            var s:Sprite = new Sprite();
            var x1:Number = 50;
            var y1:Number = 50;
            var angle:Number = 0.12;
            addChild(s);
            s.graphics.lineStyle(1,0x000000);
            s.graphics.moveTo(x1,y1);
            s.graphics.lineTo(x1+Math.sin(angle)*100,y1+Math.cos(angle)*100);
            s.graphics.lineStyle(1,0xff0000);
            s.graphics.lineTo(x1+Math.sin(angle)*200,y1+Math.cos(angle)*200);
            //s.graphics.lineTo(x1+100,y1+50);
            tf.text = "aaa";
            tf.text = Math.atan(0.1).toString();
        }
        private function aaa():void{
            //角度と長さ、幅
            
            
        }

    }//class
}//package