diciamo che "risolvetti" in questa maniera:
codice:
var categorie_xml:XML = new XML();
categorie_xml.ignoreWhite = true;
categorie_xml.onLoad = function(success) {
if (success) {
var cat_array:Array = new Array();
for (i=0; i<this.firstChild.childNodes.length; i++) {
cat_array[i] = new Object();
cat_array[i].label = this.firstChild.childNodes[i].firstChild.nodeValue;
cat_array[i].data = this.firstChild.childNodes[i].attributes.xml;
}
combo.dataProvider = cat_array;
var esListener:Object = new Object();
esListener.change = function(evt) {
//azioni per caricamento gallery
};
combo.addEventListener("change", esListener);
} else {
trace("error loading xml");
}
};
categorie_xml.load("categorie.xml");
oggetto=new Object()
oggetto.change=function() {
if (getValue() != "") {
trace(combo.getValue());
getURL(combo.getValue()+".php");
}
}
combo.addEventListener("change",oggetto);
e nel files xml
codice:
<?xml version="1.0" encoding="iso-8859-1"?>
<categorie>
<categoria xml="categoria1">Categoria 1</categoria>
<categoria xml="categoria2">Categoria 2</categoria>
<categoria xml="categoria3">Categoria 3</categoria>
</categorie>
cosa ne pensi?
tJ