Flex: TextFlow ignores whitespaces

1.3k views Asked by At

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

2

There are 2 answers

1
danii On BEST ANSWER

You need to use:

my_textFlow.whiteSpaceCollapse = WhiteSpaceCollapse.PRESERVE;

Check the TextFlow Adobe reference for whiteSpaceCollapse for FlowElement.

0
Harish Jaiswal On

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