AS3 - TextField: Eingebettete schriftart

Dieser code wird nicht die Darstellung von text auf dem Bildschirm. Ändern,

drawText.embedFonts = false;

Text macht, aber die Schriftgröße nicht ändern, oder die Farbe.

package {

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

public class DrawText extends Sprite {

    private var drawText:TextField;
    private var myFormat:TextFormat;

    [Embed(source="c:/windows/fonts/verdana.ttf", fontFamily="Verdana", embedAsCFF="false")]
    private var verdana:Class;
    public function DrawText(mX:int,mY:int){

        myFormat = new TextFormat("Verdana");
        myFormat.size = 32;
        myFormat.color = 0x00FFFF;

        drawText = new TextField();
        drawText.embedFonts = true;
        drawText.autoSize = TextFieldAutoSize.LEFT;
        drawText.selectable = false;
        drawText.type = "dynamic";
        drawText.multiline=true;
        drawText.wordWrap=true;
        drawText.x = 128;
        drawText.y = 128;
        drawText.text = "TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST";
        drawText.defaultTextFormat = myFormat;
        addChild(drawText);

    }//END constructor

}//END class

}//END package

Es ist wirklich frustrierend, jede mögliche Hilfe würde sehr geschätzt werden. Ich bin mit Flash Builder 4.6.

Schreibe einen Kommentar