private var _square:Sprite;private var _angle:uint;public function flashtest(){_square = new Sprite();_square.graphics.lineStyle(0.5);_square.graphics.drawCircle(0,0,20);addChild(_square);_angle = 0;addEventListener(Event.ENTER_FRAME,move);}private function move(event:Event):void{var converter:Conve Read More
勾股定理 Pythagorean theorema² + b² = c²var c:Number = Math.sqrt(Math.pow(a,2) + Math.pow(b,2)); Read More
var _die:Sprite;var _value:uint;public function flashtest(){_die = new Sprite();addChild(_die);_die.addEventListener(MouseEvent.CLICK,rollDie);rollDie(null);}private function rollDie(event:MouseEvent):void{_value = NumberUtilities.random(1,6);_die.graphics.clear();_die.graphics.lineStyle();_die.grap Read More
private var _field:TextField;public function flashtest(){_field = new TextField();_field.autoSize = "left";addChild(_field);var circle:Sprite = new Sprite();circle.graphics.beginFill(0,100);circle.graphics.drawCircle(100,100,100);circle.graphics.endFill();circle.addEventListener(MouseEvent Read More