AS3 XML Loader Utility Class
by Sameera Thilakasiri on 3rd June 2010 at 12:59 pm - Flex 3 Action Script 3 Tutorial
I have developed this XMLUtility class in conjunction with a CustomEvent Class which returns me the loaded XML/String Data along with the complete event firing. You can download the sources from here. Following is the code you need to write when you want to load this class
//------------ Import Classes
import com.flexcomps.utils.CustomEvent;
import com.flexcomps.utils.XMLLoaderUtil;
//-------- Create instance of loader class
var xmlLoader:XMLLoaderUtil = new XMLLoaderUtil();
xmlLoader.addEventListener(CustomEvent.ONLOADED, onXMLLoaded);
xmlLoader.load(xmlPath);
//----- Method to handle the returned data
private function onXMLLoaded(evt:CustomEvent) {
xmlData = evt.data as XML;
trace(xmlData);
}
Incoming search terms:
- as3 xml loader utility class (1)
- as3 xml utility class (1)
- as3 xmlloaderutil (1)
- com flexcomps utils xmlloaderutil (1)
- utility loader class as3 download (1)
Sameera at LinkedIn