Could you please help me over this! I want to make TotalRubs is global variable but the result when I trace(_global.TotalRubs); is undefinded.
The code is here. Thanks!
PS: I’ve registered but forum does not send me any active mail for hours.
_global.TotalRubs;
_global.LabelTop;
set (“RubHeight”, getProperty(“Rub”,_height));
menu_xml = new XML();
menu_xml.ignoreWhite = true;
menu_xml.onfiltered= function(success)
if (success) {
loadVarMenu(menu_xml);
}
}
menu_xml.load(‘menu_structure.xml’);
function loadVarMenu(xmlfile)
{
_global.TotalRubs = xmlfile.firstChild.childNodes.length; // *= 4
*** trace (_global.TotalRubs);
for(i=0;i<xmlfile.firstChild.childNodes.length;i++)
{
_global.LabelTop = new Array();
_global.LabelTop.push([[xmlfile.firstChild.childNodes.childNodes[0].firstChild.nodeValue], [xmlfile.firstChild.childNodes.childNodes[1].firstChild.nodeValue]]);
}
}
trace (_global.TotalRubs); //out put undefinded