legster
11-04-2005, 01:41 PM
I am trying to call another function to load data and build the application, but only after the xml data is loaded. I can't seem to call another function from within the onload function. This worked fine outside of a class, but when I move it into the class it no longer works. Below is the sample code. Thanks for any help.
dynamic class testProject {
function testProject() {
keywords_xml = new XML();
keywords_xml.load("test.xml");
keywords_xml.onLoad = keyLoad;
keywords_xml.ignoreWhite = true;
}
function keyLoad():Void {
trace('test1');
loadData()
}
function loadData():Void {
trace('Can't seem to get here');
}
}
dynamic class testProject {
function testProject() {
keywords_xml = new XML();
keywords_xml.load("test.xml");
keywords_xml.onLoad = keyLoad;
keywords_xml.ignoreWhite = true;
}
function keyLoad():Void {
trace('test1');
loadData()
}
function loadData():Void {
trace('Can't seem to get here');
}
}