Connecting Tech Pros Worldwide Help | Site Map

Flex Builder 2 - How do I manually close an alert window without user input?

Newbie
 
Join Date: Aug 2007
Posts: 4
#1: Nov 15 '07
My question is this: I use Flex Builder 2 and actionscript 2. Suppose that I have created a simple alert window like that:

Expand|Select|Wrap|Line Numbers
  1. var alertWindow:Alert  = Alert.Show(message);
.

What if I want to close it before user gives an input, let's say 2 seconds after I have opened it? Is there a way to send to this window a CloseEvent? Or do I have to wait
for the user to close it?

Thanks in advance.
Newbie
 
Join Date: Nov 2008
Posts: 1
#2: Nov 3 '08

re: Flex Builder 2 - How do I manually close an alert window without user input?


Answer

import mx.managers.PopUpManager;
var alertWindow:Alert = Alert.Show(message);
PopUpManager.removePopUp(alertWindow);
Reply