Groups | Blog | Home
all groups > flash data integration > may 2005 >

flash data integration : XML Data Array


Alper Bulu?
5/17/2005 12:00:00 AM
Hello

Using the code below, I am fetching some data from an XML file. And then I
store them into an Array. But I cannot get the data in the array from outside
of the function. Is there a way that I can define a Global Array or something.

Thanks.



var haberler:XML = new XML();
haberler.ignoreWhite = true;
haberler.onLoad = function (success) {

var anaCount:Number = this.firstChild.childNodes.length;
var cocukCount:Number = this.firstChild.firstChild.childNodes.length;
var ana:Object = this.firstChild;
var tl:Array = new Array();

for (i = 0; i<anaCount; i++) {
for (j = 0; j<cocukCount; j++) {
tl.push(ana.childNodes[i].childNodes[j].firstChild);
//trace(ana.childNodes[i].childNodes[j].firstChild);

}
}
}
haberler.load("haber.xml");
YPAJIE
5/17/2005 12:00:00 AM
try to make t1 global, use '_global t1 = new Array()'

YPAJIE
5/17/2005 12:00:00 AM
try to make t1 global, use '_global.t1 = new Array()'

Alper Bulu?
5/18/2005 12:00:00 AM
AddThis Social Bookmark Button