Question

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

Was it helpful?

Solution

You need to use:

my_textFlow.whiteSpaceCollapse = WhiteSpaceCollapse.PRESERVE;

Check the TextFlow Adobe reference for whiteSpaceCollapse for FlowElement.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top