flash on 2010-5-31

by dudenose
♥0 | Line 21 | Modified 2010-05-31 12:55:41 | MIT License
play

ActionScript3 source code

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

package {
    import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.geom.Matrix;
	
	[SWF(width = "465", height = "465", frameRate = "30")]
   public class FlashTest extends Sprite {
	private static const HEIGHT:Number = 465;
		private static const WIDTH:Number = 465;
	        public function FlashTest() {
            // write as3 code here..
		 var _canvas:BitmapData;
            		var clearTF:TextField = new TextField();
			clearTF.text = "CLEAR!\nおめでと";
		clearTF.textColor = 0x665544;
		clearTF.autoSize = TextFieldAutoSize.LEFT;
  		_canvas.draw(clearTF,new Matrix(5,0,0,5,WIDTH/2-clearTF.width*5/2,HEIGHT/2-clearTF.height*5/2));
	    }
    }
}