我给我的移动应用程序提供了两种导航方式,一方面是滑动(左/右)的方式,另一方面是底部的普通标签栏用手指“指向”。因此,当我添加滑动功能时,我意识到当我滑动到另一个页面时,栏不会更新它们的按钮 - 我正在寻找一些命令来选择我的滑动选项卡的特定按钮。
init():
protected function init():void{
this.addEventListener( TransformGestureEvent.GESTURE_SWIPE, handleSwipe );
}
handleSwipe():
private function handleSwipe(event:TransformGestureEvent):void
{
var slideViewTransition:SlideViewTransition = new SlideViewTransition();
// Swipe was to the right
if (event.offsetX == 1 ) {
slideViewTransition.direction = ViewTransitionDirection.RIGHT;
navigator.pushView( views.HomeView, null, null, slideViewTransition );
play("swipeee");
}
// Swipe was to the left
else if (event.offsetX == -1 ) {
slideViewTransition.direction = ViewTransitionDirection.LEFT;
navigator.pushView( views.HomeView, null, null, slideViewTransition );
play("swipeee");
}
}
我想我必须从我的 tabbedViewNavigator MainClass 中获取数据......但我不知道如何