qnx.events.QNXApplicationEvent

QNXApplicationEvent

Methods | Constants


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.

Class information:
PlayBook Tablet OS Version:   1.0.6

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
  OPEN_FILE_FAILURE : String = openFileFailure
[static] Dispatched when a file has failed to opened by calling the QNXApplication.openFile() method.
QNXApplicationEvent
  OPEN_FILE_SUCCESS : String = openFileSuccess
[static] Dispatched when a file has successfully opened by calling the QNXApplication.openFile() method.
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()


public function QNXApplicationEvent(type:String)

Constructor for a QNXApplicationEvent instance.

Parameters

type:String — The type of event.

Constant Detail

LOW_MEMORY


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.

OPEN_FILE_FAILURE


public static const OPEN_FILE_FAILURE:String = openFileFailure

Dispatched when a file has failed to opened by calling the QNXApplication.openFile() method.

See also

qnx.system.QNXApplication.openFile()

OPEN_FILE_SUCCESS


public static const OPEN_FILE_SUCCESS:String = openFileSuccess

Dispatched when a file has successfully opened by calling the QNXApplication.openFile() method.

See also

qnx.system.QNXApplication.openFile()

SWIPE_DOWN


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