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

デバイスフォント

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

package
{
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.text.TextField;
    import flash.text.TextFormat;
    public class FlashTest extends Sprite
    {
        public function FlashTest()
        {
            if (stage) init();
            else addEventListener(Event.ADDED_TO_STAGE, init);
        }
        
        private function init(e:Event = null):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
            
            var textfield:TextField = new TextField();
            textfield.autoSize = "left";
            addChild(textfield);
            
            createText("_serif");
            createText("_sans");
            createText("_typewriter");
            createText("_明朝");
            createText("_ゴシック");
            createText("_等幅");
            
        }
        
        private function createText(font:String):void
        {
            var tf:TextField = new TextField();
            tf.autoSize = "left";
            tf.defaultTextFormat = new TextFormat(font, 20);
            tf.text = font + " / ABCabcあいうアイウ阿井宇\n123\\,.:;-+*()[]";
            addChild(tf);
            tf.y = height;
        }
        
    }
}