Background: I’m building this photo gallery in AS3, when user clicks a thumbnail is displays text gathered from an XML file.
Problem Description: Everything runs wonderful on my local machine, but when I upload the files to the server and preview the site from the server, the line spacing on the description text is way different than when I preview the site local.
Below see two images so you can see the difference
Correct one (Preview from Local Machine)
correct Spacing http://www.olemedia.net/lineSpacing1.jpg
Incorrect One (From the Browser)
incorrect Spacing http://www.olemedia.net/lineSpacing2.jpg
Solution: Any suggestions?
It is indeed a line break issue that depends on what platform you’re on, or rather. how the xml document was saved. Line breaks on windows are \r\n (Carriage Return + Line Feed). if I recall correctly. Flash player interprets both as a newline. I usually do something like this:
That will get rid of all the \r’s (if they’re there) and leave only \n’s.