header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Harry
Points:0
Posts:0
Answered

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.



1
MaxFlash
Points: 460
Posts:0
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;

}

2
Brad
Points: 480
Posts:0
Accepted Answer
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;
}



Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 3+3 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions