Trouble aligning dynamic HTML text in flash
Are you having trouble setting the alignment (e.g. right align) of a dynamic HTML textfield in Flash? The paragraph align settings — even if you specify them through a TextFormat object — don’t work when the html text has been set dynamically. Why?
The text inside the html text field is being rendered into an HTML block element, even if you don’t specify any HTML tags in the text, and the contents of that block are, by default, aligned left. So even if the text field is aligning the contents to the right, all that is accomplishing is aligning a 100%-width block to the right. The alignment of a 100% block doesn’t matter, since it takes up the entire width anyway. And it doesn’t touch the left-aligned text inside!
So don’t forget to wrap any text you want aligned to the right in an HTML text field with the proper HTML alignment techniques — such as <p align="right">(text)</p>.
