【发布时间】:2011-05-25 00:35:40
【问题描述】:
我正在开发带有三个选项卡(ViewNavigator 元素)的 Flex TabbedViewNavigatorApplication。我想根据用户操作(通过 ActionScript 代码)从一个 ViewNavigator 切换到另一个。
我知道在视图之间切换使用 pushView 和 popView,但我正在使用 ViewNavigator,我的搜索显示没有任何用处。
我正在尝试在事件发生时从 Tab2 切换到 Tab1。在这种情况下,Tab2 包含一个列表,当用户进行选择时,我想跳回 Tab1。
<s:TabbedViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="onAppReady(event)">
<s:ViewNavigator label="Tab1" width="100%" height="100%" firstView="views.TabOneView"/>
<s:ViewNavigator label="Tab2" width="100%" height="100%" firstView="views.TabTwoView"/>
<s:ViewNavigator label="Tab3" width="100%" height="100%" firstView="views.TabThreeView"/>
</s:TabbedViewNavigatorApplication>
感谢您的帮助!
【问题讨论】:
标签: apache-flex actionscript-3 blackberry-playbook