04-19-2011 06:09 PM
These are coming from AIR desktop, which are assumptions at this point for PlayBook. I've not tested any of them yet on the simulator, but they may be worth a shot.
One I added, but haven't properly tested for yet is Event.USER_IDLE. In showcase mode where Deactivate never happens, maybe it will.
There's also Event.MOUSE_LEAVE, which may work when switching as well or when a click/touch/tap is detected outside of your app window (it won't detect the click/touch, but may get the "new" position). I don't know how Flash/AIR interact with the system, but an AIR app on desktop can track the mouse position even when it isn't hovering over the stage. Maybe it's the same on PlayBook? If this one does work, it could have consequences while showing the menu with a swipe down (saving data and animating the menu at the same time may make the animation jerky, especially if there's a lot of data to be saved).
Another that I'm not sure is dispatched or not on minimize is Event.RESIZE. If the actual stage is being resized when an app is minimized, like it does when switching between portrait and landscape mode, this one may work.
Just for reference:
are not dipatched.
08-20-2011 02:32 PM
I know this is a slightly older thread, but on the device (as of 1.0.7) this works:
But it seems almost "timed". The event will start and then potentially mid-way through the function it simply stops.
Does anyone else notice this, or is it just the debugger right now?
08-20-2011 03:52 PM
08-20-2011 06:14 PM
08-20-2011 08:04 PM
08-20-2011 09:01 PM - edited 08-20-2011 09:05 PM
Yes, I originally wanted to prevent any constant read-write operations since I don't know the speed that it occurs at (I know on BlackBerry it goes at about the speed of "slow" )
I ended up modifying the class that handles the data so it would ignore writing anything (which is done at every value change because I don't know what the user might try to save and am not sure if 2 sec is enough) as values were changed until there was nothing left to change. Thus deflecting the issue and and allowing me to no longer need to Exiting event.