Packageqnx.events
Classpublic class QNXApplicationEvent
InheritanceQNXApplicationEvent Inheritance flash.events.Event

The QNXApplicationEvent class contains application-specific event functionality including the low-memory event and the top swipe event.

See also

QNXApplication


Public Methods
 MethodDefined By
  
QNXApplicationEvent(type:String)
Constructor for a QNXApplicationEvent instance.
QNXApplicationEvent
Public Constants
 ConstantDefined 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
Constructor Detail
QNXApplicationEvent()Constructor
public function QNXApplicationEvent(type:String)

Constructor for a QNXApplicationEvent instance.

Parameters
type:String — The type of event.
Constant Detail
LOW_MEMORYConstant
public static const LOW_MEMORY:String = lowMemory

Dispatched 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_DOWNConstant 
public static const SWIPE_DOWN:String = swipeDown

Dispatched 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"});
        }