flash developで編集できるかテスト

by terra1119
♥0 | Line 21 | Modified 2009-11-09 18:45:03 | MIT License
play

ActionScript3 source code

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

package {
    import flash.display.Sprite;
	import flash.events.Event;
    public class FlashTest extends Sprite {
		[SWF(width="465", height="465", frameRate="60", backgroundColor="0x000000")]
        public function FlashTest() {
            var sp:Sprite = new Sprite();
			sp.graphics.beginFill(0x0000ff);
			sp.graphics.drawCircle(100, 100, 100);
			sp.x = stage.stageWidth / 2 - sp.width / 2;
			sp.y = stage.stageHeight / 2 - sp.height / 2;
			addChild(sp);
			sp.addEventListener(Event.ENTER_FRAME, efHandler);
            
        }
		
		private function efHandler(e:Event):void 
		{
			e.target.rotationY += 1;
			e.target.rotationX += 2;
		}
    }
}