Hello there,
This is sort of to do with my earlier post here:
What I ended up doing was having the class function [main();] call loadXML(); which would then call processXML(); when it was finished. Here is what I started using:
public function main() {
loadXML(_targetURL);
}
private function loadXML(_targetURL) {
getXMLLoad = new xmlLoad(_targetURL);
getXMLLoad.addEventListener(Event.COMPLETE, onComplete);
}
private function onComplete(evt:Event) {
xmlData = getXMLLoad.getXML();
processXML();
}
Now as I have started to restructure my code, as it wasn’t very OOP-like, I would like to call loadXML(); without having to move to a new function, thus keeping my code in one function.
Can this be done?