for an XML file, I want to create an array in actionscript where I can reference a particular value with a key I set rather than 0, 1, 2 etc
buildings = myParsedObjectFromXML;
var aBuildings = new Array();
for ( building in buildings ) {
var currentBuilding = buildings[building][0];
var key:String = currentBuilding.buildingCode;
aBuildings[key][property1] = currentBuilding.someOtherValue;
aBuildings[key][property2] = currentBuilding.aDifferentValue;
... etc
}
So that I can access the data at a later date like this:
// building description
trace( aBuildings[BUILDING1][property2] );
but the above isn't working - what am I missing?