Creating popup Window using Flash


Recently making a Flash in which I need a user input in a popup window to complete user action. For this I need to ask user some more value. Hence I use this code to show user another modal window.

 var nw = PopUpManager.createPopUp(_root,mx.containers.Window,true,{_width:150,_height:110,_x:((Stage.width-150)/2),_y:((Stage.height-125)/2)});
 nw.title = “Choose Industry”;
 nw.createClassObject(mx.controls.ComboBox, “cb”, nw.getNextHighestDepth(), {_x:25, _y:40});
 nw.cb.addItem(“All”);
 if (aIndustry.length > 0 ) {
   aIndustry.sort();
   for (var i=0;i      if (aIndustry[i] != “”) {
       nw.cb.addItem(aIndustry[i]);
     }
   }
 }
 nw.createClassObject(mx.controls.Button,”btnclose”,nw.getNextHighestDepth(),{_x:25,_y:70,label:”Show”});
 nw.btnclose.onPress= function() {
   IndustryShown = nw.cb.selectedItem.label;
   nw.deletePopUp();
   redisplay();

}

,