Question

HTMLText is displaying really strangely. I'm displaying a textField with htmlText provided through XML, and in this bulleted list it'll display the first line all on one line, keep going off the end of the textareas size (ie. not do multiline) until the last word of the bullet, then put that word at the start of the next line. And it'll put the last word on the next line no matter how long your bullet item is.

eg.

myField.htmlText = "<li>Seek the input of experts</li>;

Would output

'seek the input of

experts'

I've checked and this thread was similar however I've removed all my tweens to test and it hasn't had any effect.

Any ideas on what to do about this? I've tried these to no avail:

myField.htmlText = myString;
myField.autoSize = TextFieldAutoSize.LEFT;
myField.wordWrap = true;

Surely more people have had this problem - any ideas? Thanks heaps.

Était-ce utile?

La solution 2

Solved this, in Flash CS4. Must be a Flash bug! Did a couple of things and it sorted it, not sure which did the trick.

  1. Saved a new version of my file
  2. Made the text field 'use device fonts' instead of the 'anti-alias for readability' with embedding.
  3. Published the file, the bullets displayed fine.
  4. Changed the anti-alias back to anti-alias for readability, flash then busted a prompt saying 'you need to embed these fonts' (just like they were before...) - so I re-embedded them through the field (and they were already exported for actionscript in the library)

Whatever it was, seems to have fixed it.

Autres conseils

autoSize seems to only "shrink" your textbox boundary, so try making your text box bigger than it needs to be, then applying the autoSize.

To test if it is an issue with the textbox boundary, try applying the border to it.

myField.border = true;
myField.borderColor = 0xFF0000;
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top