Introduction to XML in Flash
by senocular
Double-spacing Occurs With Text Nodes
And/Or CDATA
When text is brought into Flash and displayed
in a text field, whitespace from that text is
retained allowing you to mainttain tabbing and
line breaks. Depending on your operating system,
line breaks may consist of one of the following:
Character |
Represents |
OS |
\r |
carriage return |
Mac OS <= 9 |
\n |
newline |
Unix
(OSX) |
\r\n |
(both) |
Windows |
Flash understands both \r and \n as line breaks.
The problem comes with Windows line breaks which
actually uses both \r and \n to represent one
single line break. When this is brought into
Flash, that single line break is interpreted
as two.
To solve this problem, you can either replace
all instances of either \r or \n from within
Flash before the text is added to a text field
or you can simply remove it beforehand (prefered)
using a more advanced text editor - something
other than notepad - which will let you distinguish
between characters used for line breaks.
|