Relax Breath of Solution.Community tech blog of Sameera Thilakasiri - Consultant UI, UX, RWD Specialist/ Interactive Designer

Just I wanted.. Do you?…

AS3 XML Loader Utility Class

Posted on June 3, 2010 | No Comments

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);

//-----     Method   to   handle the returned data
private function onXMLLoaded(evt:CustomEvent)     {
xmlData     =   as XML;

Sameera Thilakasiri By Sameera Thilakasiri
,is a front-end developer based in Colombo, is a blogger and a lifestyle photographer.
Follow him Twitter and Google+. Check out him.


Leave a Reply

You must be logged in to post a comment.