XML Reader Class

February 9th, 2007 by Slav

This class is basically a simple wrapper class around xml.load functionality.  This is how it works in it’s simplest form :

first off , you create new instance of it, and pass a callback string, which is a name of the function you want to call once the xml file has been loaded.
var reader = new com.durej.utils.XMLReader("onXMLRead");
then you add a listener to that callback :
reader.addEventListener("onXMLRead",this);
then you tell xml reader which file to load :
reader.readXMLFile("xml/sample.xml");

and that’s it ! you can sit back and relax and wait with your function to be called by the xml Reader once he’s loaded the file. Read the rest of this entry »

Posted in AS2, flash | No Comments »