combobox visible depending on the selection in a previous combobox
i've 5 combo box
please me find way resolve problem :
want when select in first combobox, second 1 becomes visible , first 1 becomes invisible, , when select in second one, third 1 becomes visible , second invisible ...........etc
the code :
1st combobox :
search_motif.prompt = "select motif";
var xmlloader:urlloader = new urlloader();
var xmldata:xml = new xml();
var xmlary:array = new array();
xmlloader.addeventlistener(event.complete, loadxml);
xmlloader.load(new urlrequest("motif.xml"));
function loadxml(e:event):void {
xmldata = new xml(e.target.data);
trace(xmldata..motifname.length());
for(var i:uint=0;i<xmldata..motifname.length();i++)
{
xmlary.push(xmldata..motifname[i]);
search_motif.additem( { label: xmlary[i], data:xmlary[i] } );
}
}
2nd combobox :
search_age.prompt = "select age";
var xml2loader:urlloader = new urlloader();
var xml2data:xml = new xml();
var xml2ary:array = new array();
xml2loader.addeventlistener(event.complete, loadxml2);
xml2loader.load(new urlrequest("age.xml"));
function loadxml2(e:event):void {
xml2data = new xml(e.target.data);
trace(xml2data..agename.length());
for(var j:uint=0;j<xml2data..agename.length();j++) {
xml2ary.push(xml2data..agename[j]);
search_motif.additem( { label: xmlary[j], data:xmlary[j] } );
}
}
and 3rd combobox, 4th combobox .....................
use change event trigger combobox'es visible property.
More discussions in ActionScript 3
adobe
Comments
Post a Comment