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.
Vipin
Points:0
Posts:0
Answered

6/1/2010 2:58:20 AM

Title: Timer


How to implement timer in Adobe AIR?



1
bob_senior
Points: 1300
Posts:0
Accepted Answer
6/1/2010 4:21:04 AM



check this code example to create timer in actionscript 3.0 with Adobe AIR or Flex


<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init();">
	<mx:Script>
		<![CDATA[
			private var timer:Timer;
			private function init():void {
				//Calls timer_function after every 1000 milliseconnds
				timer = new Timer(1000);
				timer.addEventListener(TimerEvent.TIMER, timer_function);
				timer.start();
			}
			private function timer_function(evt:TimerEvent):void {
			//your code to run 
				trace("Timer running")
			}
		]]>
	</mx:Script>
</mx:Application>



Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 6+7 



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