flash on 2009-12-31

by hacker_yk666qry
♥0 | Line 18 | Modified 2009-12-31 17:18:42 | MIT License
play

ActionScript3 source code

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

package {
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	
	public class MouseClick extends Sprite {
		
		private var _tf:TextField;
		
		//コンストラクタ
		public function MouseClick() {
			_tf = new TextField();
			//_tf.autoSize = TextFieldAutoSize.LEFT;
			_tf.wordWrap = true;
			_tf.height = 645;
			addChild(_tf);
			
			stage.addEventListener(MouseEvent.CLICK, onClick);
		}
		
		private function onClick(event:MouseEvent):void {
			_tf.text = event.toString();
		}
	}
}