7/4/2010 11:41:51 PM
Title:
Windows timeout
Is it possible to show a window for some time and then hide it in Adobe AIR.
7/5/2010 2:46:23 AM
use the code below to close the window after some time. Following code uses the timer to close another window .
Write this code in main application , which can be invisible .
private var myTimer:Timer;
private function createWindow():void
{
w_splashScreen = new mySplashScreen();
w_splashScreen.open();
//Time to remove splash screen right now its 3 sec
myTimer = new Timer(3000, 2);
myTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removeSplashScreen);
myTimer.start();
}
private function removeSplashScreen(e:TimerEvent):void
{
w_splashScreen.close();
w_splashScreen = null;
myTimer.stop();
myTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, removeSplashScreen);
myTimer = null;
}
7/5/2010 6:59:57 AM
see this code to hide the main application window in Adobe Air application with actionscript 3.0. you can use the nativeWindow class to access the main application window
private var mainAppWindow:NativeWindow;
// call this function to hide the main window
private function hideMe():viod{
mainAppWindow = this.stage.nativeWindow;
mainAppWindow.visible = false;
}