forked from: TLFTextFieldのバグ?

by Fumio forked from TLFTextFieldのバグ? (diff: 2)
import fl.text.TLFTextField;

...
@author umhr
♥0 | Line 19 | Modified 2012-03-10 05:25:25 | MIT License
play

ActionScript3 source code

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

// forked from umhr's TLFTextFieldのバグ?
package
{
    //import fl.text.TLFTextField;
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFormat;
    
    /**
     * ...
     * @author umhr
     */
    public class FontMix extends Sprite 
    {
        
        public function FontMix() 
        {
            /*
            var tlfTextField:TLFTextField = new TLFTextField();
            tlfTextField.defaultTextFormat = new TextFormat("_sans", 24, 0x000FF0);
            tlfTextField.width = 400;
            tlfTextField.text = "TLFTextField";
            tlfTextField.setTextFormat(tlfTextField.getTextFormat(), 0, 0);
            tlfTextField.setTextFormat(new TextFormat("_sans", 24, 0x00FF00), 3, 7);
            tlfTextField.y = 0;
            addChild(tlfTextField);
            */
            
            var textField:TextField = new TextField();
            textField.defaultTextFormat = new TextFormat("_sans", 24, 0x000FF0);
            textField.width = 400;
            textField.text = "TextField";
            textField.setTextFormat(new TextFormat("_sans", 24, 0x00FF00), 3, 7);
            textField.y = 100;
            addChild(textField);
        }
    }
}