I’m sure there’s a simple solution here, but ■■■■■■ if I can find it. I cannot get the textFieldHeight to work!
//create text format object
msgFormat = new TextFormat();
msgFormat.size = 8;
msgFormat.align = "left";
msgFormat.color = "0xFFFFFF";
msgFormat.font = "Uni554";
//variable set with string to measure, in order to set dynamically created textField to size
babQuote = "There is a greater darkness than the one we fight. it is the darkness of the soul that has lost its way. The war we fight is not against powers and principalities; it is against chaos and dispair.";
//text extent object to return lengths of the string
babLength = msgFormat.getTextExtent(babQuote);
//can't get textFieldHeight to work!!
this.createTextField("box", 2, 10, 10, Stage.width-20, babLength.textFieldHeight);
with (box) {
border = true;
embedFonts = true;
multiline=true;
wordWrap = true;
text = babQuote;
}
box.setTextFormat(msgFormat);
Please, somebody point out the obvious mistake.