In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: flash on 2010-3-1

Get Adobe Flash player
by yaha 02 Mar 2010
    Embed
/**
 * Copyright yaha ( http://wonderfl.net/user/yaha )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/bvQB
 */

// forked from foo9's flash on 2010-3-1
package 
{
    import flash.display.Sprite;    
    import flash.text.TextField;
    	import flash.text.TextFormat;  
	import flash.text.AntiAliasType;
	import flash.text.TextFieldAutoSize; 
	import flash.text.TextFieldType;		
    
    public class FlashTest extends Sprite 
    {
		private var textField:TextField;		
		
        public function FlashTest() 
        {
        		textField = new TextField();
        		textField.width = 465;
        		textField.height = 465;
        		textField.background = true;
        		textField.backgroundColor = 0xFFFFFF;
        		textField.antiAliasType = AntiAliasType.ADVANCED;
        		textField.multiline = true; 
        		textField.wordWrap = true; 
        		//textField.autoSize = TextFieldAutoSize.CENTER; 
        		textField.type = TextFieldType.DYNAMIC;     		
        		var textFormat:TextFormat = new TextFormat(); 
			textFormat.font = "MS ゴシック";			
			
			/**
			 * ある程度大きい数字入れても変わらない。
			 */
      		textFormat.size = 100;      		
      		
      		//nankaifactory.com - TextField の setTextFormat() と defaultTextFormat 
      		//[http://www.nankaifactory.com/blog/2008/09/textfield-settextformat-defaul.html]
        		textField.defaultTextFormat = textFormat; 
        		textField.text = "ぽ。";        		       				   		
        		addChild(textField);
        }
    }
}