Hi All,
Is there something that I’m missing here? I created a new text field (btnTxt) and it’s just one line of text (a nav link) but for some reason, the height of it is tracing back as 100. I don’t think there is a multi/single line property for TextFormat, so is there some kind of way around this?? Hopefully I’m not the only person who’s run into this issue.
var format:TextFormat = new TextFormat();
format.font = "Gill Sans";
format.color = 0xFFFFFF;
format.size = 15;
var btnTxt:TextField = new TextField();
btnTxt.embedFonts = true;
btnTxt.antiAliasType = AntiAliasType.ADVANCED;
btnTxt.defaultTextFormat = format;
btnTxt.text = txt;
btnTxt.border = true;
btnTxt.width = btnTxt.textWidth + 5;
btnTxt.selectable = false;
trace(btnTxt.height) //returns 100
var btn:MovieClip = new MovieClip();
btn.mouseChildren = false;
btn.mouseEnabled = true;
btn.buttonMode = true;
btn.useHandCursor = true;
btn.addEventListener(MouseEvent.CLICK, subnav_clickHandler, false, 0, true);
btn.name = "sub_link" + *
btn.data = txt;
btn.addChild(btnTxt);
btn.x = tx - btn.width;
subContent.addChild(btn);
tx = btn.x - 10;
i++;