Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c02/h01/mnt/46561/domains/ on line 520

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c02/h01/mnt/46561/domains/ on line 535

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c02/h01/mnt/46561/domains/ on line 542

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c02/h01/mnt/46561/domains/ on line 578

Deprecated: Function set_magic_quotes_runtime() is deprecated in /nfs/c02/h01/mnt/46561/domains/ on line 18
Stable Release XMLLoader 2.0 | kreativeKING - Interactive Developer

' 08 October, 07 - 2:34 am

Stable Release XMLLoader 2.0

Post Header


I have been working hard on making this as robust and stable as possible. This release should be able to do anything you would like with loading XML. Couple of new features from 1.8 the community has been emailing me about as well as some that I wanted to include in past versions. I will be releasing a video tutorial on how to use this class properly. I’ll explain the new features to hold you over until then.

New Constructor

XMLLoader($url:Array = null, $cache:Boolean = false):void

In 2.0, the XMLLoader constructor now takes 2 parameters. The first, being the same as in past versions, an Array of the xml files being loaded. The second being a new feature called cacheBuster which I will get more into bit later. By default these are set to null and false respectively.

New Cachebuster Feature

XmlLoader 2.0 introduces the new Cachebuster feature. This feature allows you to always load up an up to date version of your XML File. This is will make it so your flash application will not used cached files. This parameter is takes a boolean value and can be set in two ways. One being in the constructor shown above. The second is by setting the cacheBuster property.

XMLLoader.cacheBuster = true;
XMLLoader.cacheBuster =false;

New way of referencing load XML’s

In past versions, to access a certain loaded XML file. Something like the code below would be used.


In 2.0 the file extension is no longer accepted, just the name of the file like below.


Also in 2.0, if you have two loaded files that happen to have the same name. To access the other files after the first. You only need to put the name + underscore + array index. Here is an example.

var testXML:XMLLoader = new XMLLoader(["test.xml", "test2.xml", "test.xml", "test2.xml", "test.xml", "test2.xml"], true);
testXML.addEventListener(Event.COMPLETE, doIT);
function doIT(e:Event)
	var list:XML;
	list = testXML.getList["test_4"];

In the above code, the last test.xml will be loaded. The array index is its spot in the url array.

Those are the main new features in 2.0. Some other under the hood work includes some better error catching and proper event dispatching. The video tutorial should be out before the month is out as well as a new ite to host them, so look out for that. As always, let me know of any bugs and suggestions nd I will try to get to them ASAP.


Download XMLLoader Class 2.0 Here

No related posts.

  • This would be achieved the same way as an XML file.


  • and wath about retrive attributes from nodes?

  • error loading

    Ok now it works fine. The problem had to do with the cachebuster. I should turn it off for working locally. Very powerful and simple in syntax class indeed. Perchaps in your examples the cachebuster should be off. Thank you so much!

  • error loading

    Thank you very much for your support. My OS is Windows Vista, I receive the same error even when I'm trying to load only test.xml (but anyway folder1/test.xml is also the same for Vista) I've moved the whole com folder where the fla is. My settings in the classpath are empty and the default (publish settings>flash>settings>classpath list).

  • AH you know what, its probably the path. If you are on a PC, you will most likely need to reverse the backslashes.

blog comments powered by Disqus