So the things highlighted in red represent the .xml nodes, and as the width (character count) of TEAM1 and TEAM2 change, the spacing needs to remain consistant, and the static elements (the "vs." and "|" need to move accordingly, and the TEAMLOCATIONS need to stay lined up as well...
Does anyone have a good idea how to handle this, or a good tutorial they could point out? I'm trying to build my own array structure, and calculate the width of "TEAM1", but it's slow going... Any ideas would be greatly appreciated.
Here's the source code without the spacing stuff happening:
[PHP]
function loadXML(loaded) {
if (loaded) {
_root.teamcity1 = this.firstChild .childNodes[0].childNodes[0].firstChild.nod eValue;
_root.teamname1 = this.firstChild .childNodes[0].childNodes[1].firstChild.nod eValue;
city_txt.text = _root.teamcity1 ;
name_txt.text = _root.teamname1 ;
_root.teamcity2 = this.firstChild .childNodes[0].childNodes[2].firstChild.nod eValue;
_root.teamname2 = this.firstChild .childNodes[0].childNodes[3].firstChild.nod eValue;
city2_txt.text = _root.teamcity2 ;
name2_txt.text = _root.teamname2 ;
_root.thetime = this.firstChild .childNodes[0].childNodes[4].firstChild.nod eValue;
time_txt.text = _root.thetime;
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreW hite = true;
xmlData.onLoad = loadXML;
xmlData.load("g ames.xml");[/PHP]
And the XML
[PHP]<?xml version="1.0" encoding="ISO-8859-1"?>
<games>
<team>
<city1>BALTIMOR E</city1>
<name1>REDSKINS </name1>
<city2>CINCINNA TI</city2>
<name2>BENGAL S</name2>
<thetime>12:00E T</thetime>
</team>
</games>[/PHP]
Thanks!
-EmoJoy