I am trying to load a single image and some text into a Flash doc with XML.
I can get the image to load fine but everything I have tried to get the text to load doesn't work. Could anyone tell me what needs to be added to this in order for text to be added?
I have a movie clip "imageLoader" which th image does load into. I also have a movie clip "textLoader" which I would like the copy to load into.
Here is what I have:
Actionscript
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success){
if(success){
// the line below load the pictures in an empty movie clip manually created and called imageLoader
loadMovie(myXML.childNodes[0].firstChild.firstChild.nodeValue, imageLoader);
loadMovie(myXML.childNodes[1].firstChild.firstChild.nodeValue, textLoader);
} else {
}
}
myXML.load("contact.xml");
This is what I have now and I still don't see the text:
Actionscript:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success){
if(success){
// the line below load the pictures in an empty movie clip manually created and called imageLoader
loadMovie(myXML.childNodes[0].firstChild.firstChild.nodeValue, imageLoader);
textLoader.myTxt.text=myXML.childNodes[1].firstChild.firstChild.nodeValue;
} else {
}
}
myXML.load("myImage.xml");
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success){
if(success){
// the line below load the pictures in an empty movie clip manually created and called imageLoader
loadMovie(myXML.childNodes[0].childNodes[0].firstChild.nodeValue, imageLoader);
textLoader.myTxt.text=myXML.childNodes[0].childNodes[1].firstChild.nodeValue;
} else {
}
}
myXML.load("myImage.xml");