I’m trying to build a little blog with the help of the xml tuturials. SO far so good exept for one thing. I can load the text . But i cant load the image .Dont know why.
function loadXML(loaded) {
if (loaded) {
_root.blog = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.titulo = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
_root.imagem = this.firstChild.childNodes[0].childNodes[2].firstChild.nodeValue;
_root.texto = this.firstChild.childNodes[0].childNodes[3].firstChild.nodeValue;
data_txt.text = _root.blog;
titulo_txt.text = _root.titulo;
imagem_mc.loadMovie = _root.imagem;
texto_txt.text = _root.texto;
} else {
trace(“file not loaded!”);
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“blog.xml”);
this is it. Whats wrong with this? i just can’t understand it. I’m trying to solve this before i try to ad buttons to move forward and backwards betwen posts.
Thanks