PDA

View Full Version : Problem with Multiline Text Loading from XML



nightbird0
November 13th, 2006, 08:15 AM
Hi Guys

i am making an online visiting card editor in flash. Everything is going just fine but a problem with loading multi line text from xml is there. Actually user can enter multi line text and after he finish designing the card he can save it for later use. I am saving the settings of object and text in database through xml communication with php. When a user open an existing card setting everything comes just fine but there is and extra line space between any two lines. Means single break line element becomes 2 line breaks. I have tried both text and htmlText method but failed

Please help me its really urgent.

Thanks in advance

nightbird0
November 14th, 2006, 03:41 AM
Common Guys plz i need your help

eslacker
November 14th, 2006, 04:45 AM
So it's fine (i.e. no extra space) when they design it, but when they come back there's an extra line? Sounds like maybe somewhere between Flash/PHP and the DB you're getting an extra linebreak. Perhaps when you're URLEncoding the XML in or out of Flash/PHP?

Would need to see code to know for sure, but look at the XML and see if there's an extra linebreak. If there is, then I suspect somewhere in your saving process in PHP an extra space is getting inserted. How are you handing the text from Flash to your PHP script (QueryString, XML socket, etc.)?

MureJIb
November 14th, 2006, 09:14 AM
Try using TextField.htmlText = true; in couple with TextField.condenceWhite = true;
This will ignore all non-tag lineBreaks (<p></p> and <br> will work correctly)