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.
cf_flex
Points:240
Posts:0

7/19/2010 9:47:01 AM

Title: Session mgmt


hi all,

in my app i have set the session out after 12 mins when there is no mouse movement or there is no key pressed from keyboard but still the app is giving a message as session timed out though i am browsing thru the application.

i am using timer in my app.

any sample code would help me on session management..

thanks




1
Rayan
Points: 700
Posts:0
7/19/2010 10:07:56 AM



Create a timer say 500 msec interval in its interval function
set a variable

time=+=500;
//if time is greater than 12 minutes
if(time>720000){
//end session
}
Now add key and mouse listener to stage which should set time=0; on mouse move or keyboard event occurs.

Timer will reset this way and start counting the time again. If any activity occurs before 12 minutes then the timer will reset

2
Mark
Points: 380
Posts:0
7/19/2010 11:59:26 PM



use a 12 minute timer and reset it on mouseOver or keyboard events. This will make the timer restart from beginning and will only call the complete event function if timer was not reset before 12 minutes. How ever the code by rayan should also work.Let me know if it does not work


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 5+6 



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