Groups | Blog | Home
all groups > flash actionscript > may 2006 >

flash actionscript : XML Question



Xodus6.com
5/21/2006 11:39:35 PM
How do I make XML appear on layer embedded within another layer embedded within
another layer? Right now I'm trying to get a transition layer that has symbols
within symbols to display xml from an external file. All the happens is it
currently displays the graphics that I made with the XML, but does not display
the XML itself. Included is the XML script that I'm using to display the XML.



function loadXML(loaded) {
if (loaded) {
_root.inventor =
this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.comments =
this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
name_txt.text = _root.inventor;
comment_txt.text = _root.comments;
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("inventors.xml");
2m
5/22/2006 12:00:00 AM
Hi,

It seems what you want to do calls for the use of dynamicly created
movieclips, but the code you provide is a it sparse.

With that code you just populte two textfields with values from an xml.

If you care to provide more details (examples / files) there will be abetter
chance to find help.
Xodus6.com
5/27/2006 9:46:04 PM
I finally got the flash to display the XML from the external file except now it
says "Undefined" for all the values. I'm using the same code that I provided
above, but in order to fix the problem, I loaded an external flash file into
another flash file into another. I have the main flash button that opens a
flash file within when you click a button and now I have another flash file
load within the sub flash file (if this makes any sense??). I guess my
question is how do I get it to display the data from the external (txt) file
instead of "undefined"?
AddThis Social Bookmark Button