Moin Leute,
ich versuche gerade die Textgröße eines TLFTextField zu ändern. In meiner Fla sind unterschiedliche Textfelder (tf.text und flash.text). Bei flash.text funktionert es einwandfrei. Bei tf.text bekomme ich bei
Code:
parent["text" + (i+1)].tf.setTextFormat(format);
folgende Fehlermeldung:
Code:
RangeError: Property lineHeight value -2147483648 is out of range
Der Text innerhalb des Textfeldes kommt aus FlashVars. Der gesamte Block sieht so aus:
Code:
var format:TextFormat = parent["text" + (i+1)].tf.getTextFormat();
while(parent["text" + (i+1)].tf.textHeight > (parent["text" + (i+1)].tf.height - 15))
{
formatSize = format.size;
formatSize = 10;
format.size = formatSize;
parent["text" + (i+1)].tf.setTextFormat(format);
} Hat jemand einen Tip für mich?