flash - Application timeout feature -
flash - Application timeout feature -
i developing air 2.0 application, , set inactivity timeout feature it. (i.e: if user doesn't press key 5 minutes application logs user out. have implemented native timeout features available in flash.utils library, , hear mouse or keyboard events clear / reset timeout in main mxml. problem application uses titlewindows , keyboard events don't appear bubble (or back) main mxml i'm listening them. hence app thinks there inactivity when keys , mouse events firing in title windows.
is there way can inherently hear keyboard , mouse events globally? prospect of adding listeners every titlewindow (and checking see if open or not) seems quite daunting.
many help.
from anywhere in uicomponent (probably main ui class):
private function oncreationcomplete():void { stage.addeventlistener(keyboardevent.down, onkeyboard); } private function onkeyboard(e:keyboardevent):void { // }
flash flex air
Comments
Post a Comment