1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
private function positionChoisir():void
{
var objet:Object = new Object();
supprimeListes([galaxie, ss, position]);
if(!choisir)
{
galaxie = new DropDownList();
galaxie.dataProvider = galaxiesProvider;
galaxie.labelField = "galaxie"
galaxie.prompt = 'galaxie';
galaxie.percentWidth = 100;
galaxie.addEventListener(IndexChangeEvent.CHANGE, launchGetSS);
choisir = new VGroup();
choisir.percentWidth = 100;
choisir.addElement(galaxie);
position_conteneur.addElement(choisir);
objet.univers = univers_ddl.selectedItem.univers;
objet.num = univers_ddl.selectedItem.num;
monService.getGalaxies(objet);
}
}
private function supprimeListes(listes:Array):void
{
for each(var liste:DropDownList in listes)
{
if(liste)
{
choisir.removeElement(liste);
liste = null;
}
}
if(choisir && choisir.numElements == 0){
position_conteneur.removeElement(choisir);
choisir = null;
}
} |
Partager