VandenTR
09-13-2006, 03:47 PM
Hello,
I've got a non-modal component window that opens with an on(Press) function and closes when hitting the 'X' button as it should.
The problem I'm facing is how to eliminate the first window when somebody hits the button a second time. Right now it opens a new window instance on every click, I want it to allow only one at a time...
Best Regards,
TVB
btn_healthy.onPress = function() {
var indexWindow = PopUpManager.createPopUp(_root, Window, false,
{closeButton:true, title:"Title...", contentPath:""});
indexWindow.setSize(200,200)
indexWindow._x=275;
indexWindow._y=115;
var iwListener:Object = new Object();
iwListener.click = function(evt:Object) {
evt.target.deletePopUp();
};
indexWindow.addEventListener("click", iwListener);
}
I've got a non-modal component window that opens with an on(Press) function and closes when hitting the 'X' button as it should.
The problem I'm facing is how to eliminate the first window when somebody hits the button a second time. Right now it opens a new window instance on every click, I want it to allow only one at a time...
Best Regards,
TVB
btn_healthy.onPress = function() {
var indexWindow = PopUpManager.createPopUp(_root, Window, false,
{closeButton:true, title:"Title...", contentPath:""});
indexWindow.setSize(200,200)
indexWindow._x=275;
indexWindow._y=115;
var iwListener:Object = new Object();
iwListener.click = function(evt:Object) {
evt.target.deletePopUp();
};
indexWindow.addEventListener("click", iwListener);
}