views:

100

answers:

2

Hey,

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.

A: 

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;
TandemAdam
Cheers - no luck unfortunately. The text that SHOULD be wrapped to the 2nd line does begin to overflow beyond the edge of the borders when we draw them on, by about 3 or so pixels - otherwise it's the same deal. I thought it might be due to having bold text in too, but even removed it is still there. Shall keep trying!
LogFish
A: 

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.

LogFish
This solution is hit and miss mind you - the whole problem has to do with anti-alias for readability not displaying correctly. Changing back and forth from animation, bitmap text, and readability eventually gets readability working but not ideally. I'm just going to roll bitmap text for my instance.
LogFish
How dumb. I had the same problem (embedded font, everything in working order, blindly copying and pasting showed the text WAS there, just not displaying. I took off "Anti-alias" as per LogFish's suggestion and the text shows up fine now.
Cyprus106