ラベル SyntaxHighlighter の投稿を表示しています。 すべての投稿を表示
ラベル SyntaxHighlighter の投稿を表示しています。 すべての投稿を表示

2014年6月3日火曜日

SyntaxHighlighterのテストとas3hxのテスト

haxe:3.1.3
openfl:2.0.0
package {
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFormat;


    public class TextFieldExample extends Sprite {
        private var label:TextField;
        private var labelText:String = "Hello world and welcome to the show.";

        public function TextFieldExample() {
            configureLabel();
            setLabel(labelText);
        }

        public function setLabel(str:String):void {
            label.text = str;
        }

        private function configureLabel():void {
            label = new TextField();
            label.autoSize = TextFieldAutoSize.LEFT;
            label.background = true;
            label.border = true;

            var format:TextFormat = new TextFormat();
            format.font = "Verdana";
            format.color = 0xFF0000;
            format.size = 10;
            format.underline = true;

            label.defaultTextFormat = format;
            addChild(label);
        }
    }
}

as3hxで変換した
package;

import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;


class Main extends Sprite
{
    private var label : TextField;
    private var labelText : String = "Hello world and welcome to the show.";

    public function new()
    {
        super();
        configureLabel();
        setLabel(labelText);
    }

    public function setLabel(str : String) : Void{
        label.text = str;
    }

    private function configureLabel() : Void{
        label = new TextField();
        label.autoSize = TextFieldAutoSize.LEFT;
        label.background = true;
        label.border = true;

        var format : TextFormat = new TextFormat();
        format.font = "Verdana";
        format.color = 0xFF0000;
        format.size = 10;
        format.underline = true;

        label.defaultTextFormat = format;
        addChild(label);
    }
}


Flash書き出し
Link
HTML5書き出し
Link

中古のthinkpad手に入れたらwin10だった

 win10久しぶりに使ってみたらwin11よりかは使い心地がよい、、、win11,msほんとどーなってんの?