1

i'm trying to add whitespaces in front of my text, but flex removes all but one whitespace from the text. So i can't format the text.

Here is the specified line:

<s:p> •  Lorem</s:p>
<s:p>    ipsulum</s:p>

Here its shown correctly but when running the swf it reduces the whitespaces of the second line. Of course i tried to use CDATA but this didn't work too.

Cheers Felix

zero323
  • 322,348
  • 103
  • 959
  • 935
Felix K.
  • 6,201
  • 2
  • 38
  • 71
  • Perhaps a bit besides the question, but I noticed you seem to try to create a list. There's a specific element for that, you know: http://help.adobe.com/en_US/flex/using/WS02f7d8d4857b1677-165a04e1126951a2d98-7ff6.html – RIAstar Oct 17 '11 at 10:22
  • Stupid question : have you tried using HTML non-breaking spaces " " ? http://en.wikipedia.org/wiki/Non-breaking_space – Exort Oct 17 '11 at 12:04

2 Answers2

1

You need to use:

my_textFlow.whiteSpaceCollapse = WhiteSpaceCollapse.PRESERVE;

Check the TextFlow Adobe reference for whiteSpaceCollapse for FlowElement.

danii
  • 5,553
  • 2
  • 21
  • 23
  • This solves the whitespace issue, but i had to remove all formatting with paragraph tags and ALL other whitespaces which are not used. – Felix K. Oct 17 '11 at 10:34
1

Try using unicode character for non breaking space "\u00A0".