Can anyone tell me why the following isn't displaying any text?
No Compiler errors, all traces show objects existing?
If I remove the textformat all together it appears on stage in times.
______________________________________________________________
package com.instantbusiness.client.project.display.map{
import flash.display.Sprite;
import flash.text.*;
import flash.events.MouseEvent;
import ClientRegular;
public class Label extends Sprite{
private var labelText:TextField;
private var labelFormat:TextFormat;
private var clientRegular:Font = new ClientRegular();
public function Label(){
trace("Label: " + this + " \n");
clientRegular = new ClientRegular();
trace("clientRegular: "+clientRegular);
}
public function setText(labelStr:String){
labelFormat = new TextFormat();
labelFormat.color = 0xFF0000;
labelFormat.size = 20;
labelFormat.font = clientRegular.fontName;
trace("clientRegular.fontName
"+clientRegular.fontName);
trace(labelFormat);
labelText = new TextField();
labelText.embedFonts = true;
labelText.autoSize = TextFieldAutoSize.LEFT;
labelText.antiAliasType =
AntiAliasType.ADVANCED;
labelText.selectable = false;
labelText.mouseEnabled = true;
labelText.setTextFormat(labelFormat);
trace(labelText);
trace(labelText.getTextFormat());
labelText.text = labelStr;
addChild(labelText);
}
}
}
__________________________________________________________
Thanks, Michael.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com