MACROMEDIA FLEX - DEVELOPING COMPONENTS AND THEMES Instrukcja Użytkownika Strona 22

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 53
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 21
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Condential.
Handling the Back key
private function initializeHandler(event:Event):void!
{!
!systemManager.stage.addEventListener(KeyboardEvent.KEY_DOWN,!
!!deviceKeyDownHandler);!
!systemManager.stage.addEventListener(KeyboardEvent.KEY_UP,!
!!deviceKeyUpHandler);!
}!
private function deviceKeyDownHandler(event:KeyboardEvent):void!
{!
!if (event.keyCode == Keyboard.BACK && mainNavigator.length > 1)!
!!event.preventDefault();!
}!
private function deviceKeyUpHandler(event:KeyboardEvent):void!
{!
!if (event.keyCode == Keyboard.BACK && mainNavigator.length > 1)!
!!mainNavigator.popView();!
}!
22
Przeglądanie stron 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 ... 52 53

Komentarze do niniejszej Instrukcji

Brak uwag