PDA

View Full Version : Problem with popup window


monsa
12-23-2004, 11:29 AM
Hi

I am creating an application in flash mx 2004

i am stuck,

The problem is with the deletePopUp(); command
when i am using the command 4 first time it is working but for the second time it is not working . can some body please help me out.

Here is the code

.................................................. ..............

import mx.managers.PopUpManager;
import mx.containers.Window;
import mx.controls.Alert;
//////////////////
_global.raceway_ln_size1;
_global.raceway_ln_size2;
rc_ln = new Object();
rc_ln.focusOut = function(evt) {
if (_root.txtln1.length == 0) {
trace("empty");
tt_Window = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, true, {closeButton:true, title:"Error"});
tt_Window.setSize(240, 150);
//
btn = new Object();
btn.click = function() {
tt_Window.deletePopUp();
Selection.setFocus("_root.txtlogo_height");
trace("removed");
};
tt_Window.addEventListener("click", btn);
} else {
_global.raceway_ln_size1 = _root.txtln1.text;
trace(_global.raceway_ln_size1);
}
};
txtln1.addEventListener("focusOut", rc_ln);
//
/////////////////////////////////////////////////////////////////////////////////////
//
//
// listener for raceway size line 2
tt2 = new Object();
tt2.focusOut = function(evt) {
if (_root.txtln2.length == 0) {
v2 = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, true, {closeButton:true, title:"Error"});
v2.setSize(240, 150);
hh = new Object();
hh.click = function() {
v2.deletePopUp();
trace("deleted pop up 2");
};
v2.addListener("click", hh);
} else {
_global.raceway_ln_size2 = _root.txtln2.text;
trace(_global.raceway_ln_size2);
}
};
txtln2.addEventListener("focusOut", tt2);

thnks