import mx.utils.Delegate;

var xmlData:XML = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = Delegate.create(this, onLoadXML);
xmlData.load("gallery.xml");

function onLoadXML(success) {
   if(success) {
       trace("xml Loaded");
       proceed();
   } else {
       trace("xml Not Loaded");
   }
}

function proceed() {
   totalPics = xmlData.firstChild.firstChild.childNodes.length;
   trace(totalPics);
}

// xml Loaded
// 4

Cheers,
Claus.


Omar Fouad wrote:

Fruber this code is still not working.. :(

var xmlData:XML = new XML();

xmlData.onLoad = function (success) {
   if(success) {
       trace("xml Loaded");
       proceed(this);
   }else{
       trace("xml Not Loaded");
   }
}
xmlData.load("gallery.xml");

proceed = function (gallery:XML) {
   totalPics = gallery.childNodes[0].childNodes[0].length;
   trace(total);

}


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to