XMLからテキストを取得するテキストフィールドがあります。選択したテキストのフォント サイズを変更する機能を追加しました。テキストを再度読み込むまで問題なく動作します。次に、最初のサイズ以外のすべてのサイズを無視します。
これは、tekst の html テキストです。
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="PresentationOnline_text" SIZE="63" COLOR="#FF9999" LETTERSPACING="0" KERNING="0">a<FONT SIZE="33">b</FONT></FONT></P></TEXTFORMAT>
And I just set txtText.htmlText to that. Is it not possible to have several font sizes in one textfield?
When I change the size I do this:
textFormat = txtText.getTextFormat(start, end);
textFormat.size = Number(textFormat.size) - 1;
txtText.setTextFormat(textFormat, start, end);
Anything I'm missing?
Thanks!
Edit:
Works when I do it in this order:
txtText.defaultTextFormat = textFormat;
txtText.setTextFormat(textFormat);
txtText.htmlText = text;
But I know I did it the other way around for some good reason I can't remeber..