XML line break
Hi,
I have a new problem with my XML parsed to AS3 textfield. Seems like there is a double spacing line break when displayed on the Flash AS3 screen from the XML file. below is my code in the XML, i did try <br /> but to now avail since the <br /> tag will display itself on the textfield.
XML code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pages>
<page pTitle="What Causes Back Pain?">
Poor posture
Strenuous activities at home or at work
Lifting, carrying, pushing or pulling incorrectly
Standing or bending down for long periods
Twisting or bending awkwardly
Sitting in a hunched position for long periods without taking a break
Muscle tension and or over-stretching
</page>
</pages>
And this my AS3 Code:
var myXML:XML = new XML();
var XMLURL:String = "xxxx.xml";
var myXMLURL:URLRequest = new URLRequest(XMLURL);
var myLoader:URLLoader = new URLLoader(myXMLURL);
myLoader.addEventListener("complete", xmlLoaded);
function xmlLoaded(event:Event):void
{
myXML = XML(event.target.data);
titleText.text=myXML.page[0].@pTitle;
descText.htmlText=myXML.page[0];
}
Any help would be much appreciated.
Thanks,
BB
|