| Package | qnx.events |
| Class | public class QNXApplicationEvent |
| Inheritance | QNXApplicationEvent flash.events.Event |
QNXApplicationEvent class contains application-specific event functionality including the low-memory event and
the top swipe event.
See also
| Method | Defined By | ||
|---|---|---|---|
QNXApplicationEvent(type:String)
Constructor for a QNXApplicationEvent instance. | QNXApplicationEvent | ||
| Constant | Defined By | ||
|---|---|---|---|
| LOW_MEMORY : String = lowMemory [static]
Dispatched when the device is running low on memory. | QNXApplicationEvent | ||
| SWIPE_DOWN : String = swipeDown [static]
Dispatched when a user swipes down from the top bezel of the device onto the screen. | QNXApplicationEvent | ||
| QNXApplicationEvent | () | Constructor |
public function QNXApplicationEvent(type:String)
Constructor for a QNXApplicationEvent instance.
type:String — The type of event.
|
| LOW_MEMORY | Constant |
public static const LOW_MEMORY:String = lowMemoryDispatched when the device is running low on memory. When this event is received you should save the state and free as many resources as possible. When the device is running low on memory, it will begin terminating applications in order to free up more memory.
| SWIPE_DOWN | Constant |
public static const SWIPE_DOWN:String = swipeDownDispatched when a user swipes down from the top bezel of the device onto the screen.
This event can be used to provide a context menu for your application. The following listing shows a simple drop-down menu that renders when the user swipes down from the top bezel of the device:
QNXApplication.qnxApplication.addEventListener(QNXApplicationEvent.SWIPE_DOWN, showAppMenu);
private function showAppMenu(event:QNXApplicationEvent):void
{
if(! _menu.isVisible())
{
_menu.show();
}
}
public function show():void
{
_active = true;
Tweener.addTween(this, {y:VISIBLE_Y, time:SLIDE_TIME, transition:"linear"});
}