pete@mymettle.com
03-06-2009, 11:27 PM
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");
XML:
<content>
<imagePath>01.jpg</imagePath>
<imagePath>Blah blah blah, sample text</imagePath>
</content>
Thanks
Sorry if this looks familiar. I posted a similar thread few days ago but didn't have a chance to get back to those who helped and had more questions.
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");
XML:
<content>
<imagePath>01.jpg</imagePath>
<imagePath>Blah blah blah, sample text</imagePath>
</content>
Thanks
Sorry if this looks familiar. I posted a similar thread few days ago but didn't have a chance to get back to those who helped and had more questions.