I want to format XML tags just like you would do with HTML. How can I do that.
Here is what I have for the AS
Code:
var content = new XML();
content.onLoad = start;
content.load("somexmlfile.xml");
content.ignoreWhite = true;
function start(success) {
if (success == true) {
rootNode = content.firstChild;
firstImageNode = rootNode.firstChild;
currentImageNode = firstImageNode;
updateImage(firstImageNode);
//
title.text = rootNode.childNodes[1].firstChild.nodeValue;
//
type.text = rootNode.childNodes[2].firstChild.nodeValue;
}
}
function updateImage(newImageNode) {
imageholder.loadMovie(newImageNode.attributes.jpegURL);
info = newImageNode.firstChild.nodeValue;
}
What I am trying to do is load text into three diferent text fields and one picture into a mc.
If anyone has any better suggetions on how to clean this mess up or add to it PLEASE HELP. I have spent too long on this I just want to get it done.
Also I have different buttons that will load different data is there a way that I can compact it all into one xml file instead of different ones. So when someone clicks on a different button everything changes.