Hi All,
I have been going round in circles regarding this topic.
My XML:
<clientconfig>
<global>
<customerid>1001</customerid>
<name>Test</name>
<calltimeout>300</calltimeout>
<timeout>120</timeout>
<globalnotes>Notes field.</globalnotes>
<bgcolor>01AAD3</bgcolor>
</global>
<button>
<buttonposition>1</buttonposition>
<buttontitle>ARTS AND MEDIA</buttontitle>
<buttonnarrative>Text</buttonnarrative>
</button>
<button>
<buttonposition>2</buttonposition>
<buttontitle>CAREERS AND EMPLOYMENT</buttontitle>
<buttonnarrative>Text</buttonnarrative>
</button>
</clientconfig>
My actionscript to parse the XML:
function load_clientconfig(loaded) {
if (loaded) {
_root.buttontitle1 = this.firstChild.childNodes[1].childNodes[2].firstChild.nodeValue;
_root.buttontitle2 = this.firstChild.childNodes[2].childNodes[2].firstChild.nodeValue;
button1.text = _root.buttontitle1;
button2.text = _root.buttontitle2;
} else {
content = "file not loaded!";
}
}
xml_clientconfig = new XML();
xml_clientconfig.ignoreWhite = true;
xml_clientconfig.onLoad = load_clientconfig;
xml_clientconfig.load("../customers/" + id + "/" + id + ".xml");
I'm using 'button1' in the dynamic_text box.
When I run the flash I seem to only see the word 'button1' not 'ARTS AND MEDIA'.
Can anyone point me in the correct direction, thanks in advance.
I have been going round in circles regarding this topic.
My XML:
<clientconfig>
<global>
<customerid>1001</customerid>
<name>Test</name>
<calltimeout>300</calltimeout>
<timeout>120</timeout>
<globalnotes>Notes field.</globalnotes>
<bgcolor>01AAD3</bgcolor>
</global>
<button>
<buttonposition>1</buttonposition>
<buttontitle>ARTS AND MEDIA</buttontitle>
<buttonnarrative>Text</buttonnarrative>
</button>
<button>
<buttonposition>2</buttonposition>
<buttontitle>CAREERS AND EMPLOYMENT</buttontitle>
<buttonnarrative>Text</buttonnarrative>
</button>
</clientconfig>
My actionscript to parse the XML:
function load_clientconfig(loaded) {
if (loaded) {
_root.buttontitle1 = this.firstChild.childNodes[1].childNodes[2].firstChild.nodeValue;
_root.buttontitle2 = this.firstChild.childNodes[2].childNodes[2].firstChild.nodeValue;
button1.text = _root.buttontitle1;
button2.text = _root.buttontitle2;
} else {
content = "file not loaded!";
}
}
xml_clientconfig = new XML();
xml_clientconfig.ignoreWhite = true;
xml_clientconfig.onLoad = load_clientconfig;
xml_clientconfig.load("../customers/" + id + "/" + id + ".xml");
I'm using 'button1' in the dynamic_text box.
When I run the flash I seem to only see the word 'button1' not 'ARTS AND MEDIA'.
Can anyone point me in the correct direction, thanks in advance.