Hi
I have a MC in which I want to load images from XML but somehow i am not getting it. Can anyone help me out.
Here is a simple example of it…
Script on Scene (root stage):
_root.attachMovie (“a”,“b”,1) // a is the identifer name of the MC in which I want to get image.
Script into a MC:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = myOnLoad;
myXML.load(“rd.xml”);
function myOnLoad(success){
if(success){
// trace(myXML)
this.createTextField(“t”, 2, 222, 111, 300, 300);
t.html = true;
t.wordWrap = true;
t.border = true;
var m = myXML.firstChild.attributes.photo
trace("node "+ m)
t.htmlText= m
stop();
}else{
gotoAndPlay(2);
}
}
// in rd XML file there is only one node:
// <data photo = “<P>Photo: <IMG src=‘logo.jpg’></P>” />
Thanx in Advance
Ashish