Hi there, i have a simple problem that is hard for me…
I want to reach a XML data (var) from a child movieclip but i couldnt figure out.
I have a movieclip(call it McA) on mainstage that loads a XML.
That XML have this line;
port_module_xml = “xml/portfolio/project/housing_logos.xml”
McA have this code;
function loadXML(loaded) {
if (loaded) {
xmlPath = this.firstChild.childNodes[0].attributes.port_module_xml;
trace("This Works > " + xmlPath); // Returns "xml/portfolio/project/housing_logos.xml"
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("main.xml");
// Everything works till here.
trace("This doesnt work > " + xmlPath); // Returns "undefined"
And in McA i have child movieclip(McB) that have this script;
/*
var xmlDatal = "xml/portfolio/project/housing_logos.xml"; //set xml data file
*/
var xmlDatal = xmlPath;
var xmlObj: XML;
var nodes = new Array();
if (_root.xmlFile!=undefined) xmlDatal = unescape(_root.xmlFile);
init();
function init() {
xmlObj = new XML(xmlDatal);
xmlObj.ignoreWhite = true;
xmlObj.load(xmlDatal);
this.onEnterFrame = checkXMLprogress;
}
**I couldn’t reach **‘xmlPath’ data from child movie clip…
**
I’m in a really bad situation now, any help will make my day…
[SIZE=5]Thanks![/SIZE]**