viewStack 第一次创建后,后面viewStack切换时,viewStack的子组件没有重新初始化,如果要强制重新初始化,必须先从viewStack移除改组件,然后重新加入到viewStack.
<mx:ViewStack id="viewStack" creationPolicy="auto" width="100%" height="100%"
change="viewStack_changeHandler(event)" >
<s:NavigatorContent id="MAINFORM" width="100%" height="100%" >
<view:MainForm id="showForm" width="100%" height="100%"/>
</s:NavigatorContent>
<s:NavigatorContent id="USERSET" width="100%" height="100%">
<view:UserSetForm id="userSetForm" width="100%" height="100%"/>
</s:NavigatorContent>
<s:NavigatorContent id="SURBETSET" width="100%" height="100%">
<view:SurebetSetForm id="surbetSetForm" width="100%" height="100%"/>
</s:NavigatorContent>
<s:NavigatorContent id="MAKERSSET" width="100%" height="100%">
<view:MakersSetForm id="makersSetForm" width="100%" height="100%"/>
</s:NavigatorContent>
<s:NavigatorContent id="REPORT" width="100%" height="100%">
<view:ReportForm id="reportForm" width="100%" height="100%"/>
</s:NavigatorContent>
<s:NavigatorContent id="calcContent" width="100%" height="100%">
<view:CalcForm id="calcForm"/>
</s:NavigatorContent>
<s:NavigatorContent id="viewMakersDetailContent" width="100%" height="100%">
<component:ViewMakersDetail id="viewMakerDetailForm"/>
</s:NavigatorContent>
</mx:ViewStack>
//强制viewStack更新
protected function viewStack_changeHandler(ie:IndexChangedEvent):void
{
// TODO Auto-generated method stub
var obj:NavigatorContent = ie.relatedObject as NavigatorContent;
if(obj.name=='calcContent'){
if(calcForm==null)
calcForm = new CalcForm();
calcContent.addElement(calcForm);
}else{
calcContent.removeElement(calcForm);
calcForm = null;
}
}
不知道大家有米有其他更好的方式。。。。。。。。。。。 flex 采用Hero SDK。。。。
分享到:
相关推荐
使用viewstack切换登录的简单例子
Flex 实现viewstack简单切换。
flex开发中的一些小例子,这个是用viewstack控件开发的跳转功能
我跟WonJia打算写一个类似于《Flex编程注意之XX》的系列文章,此系列文章主要就是介绍一些我们在实际的项目中发现的一些Flex的问题,而这些问题可能已经被人发现了,也可能没被人发现,所以在此记录一下。
MXViewStackEffectExample FLEX切换效果
下载后,新建Flex Web工程,然后将文件按照文件夹结构拷贝进去后,编译,运行即可。但是主文件只需要拷贝内容,工程名字需要命名为testDemo。 功能包括 ViewStack的画面迁移 画面popup表示 鼠标在一览中滑动的事件...
Table of Contents ...8.1基本组件使用[Tree,datagrid,TitleWindow,ViewStack] 40 8.2读写XML 40 8.3读写ShareObject 40 8.4 BlazeDS配置及使用 40 8.5 回溯 40 8.6 Event 40 8.7 代码优化 40 8.8 Demo 40
demo1工程源码 博文链接:https://momoko8443.iteye.com/blog/192423
文件有两个文档组成,Rotate3D.mxml为主文件,DistortionEffects.swc拷贝到libs下面,运行主文件即可,已经调试没有问题了,实现了ViewStack 切换的3D效果,很实用,不需要琐碎的代码,一看就懂!flex4也OK!
flex组件之容器类组件实例源码,包括according、viewstack等20个实例
ViewStack component for Silverlight 2 – An inevitable control in RIA space。
flex3的cookbook书籍完整版dpf(包含目录),目录是我花了两个多小时自己整理的,希望对大家有帮助。 目录: 第一章.Flex与ActionScript基础(3) 1.1节.用FlexBuilder创建Flex项目 1.2节.用FlexBuilder创建Flex库项目 ...
Marionette.Viewstack Marionette 的视图堆栈实现安装可能最好的选择是使用 bower 来安装 Marionette.ViewStack $ bower install --save marionette.viewstack或者如果你想与节点一起使用: $ npm install --save-...
<mx:ViewStack id="viewStack" width="100%" height="75%" creationComplete="showData()" change="viewChanged(event)"> </mx:Box> </mx:ViewStack> ()"> <!--...
Efflex 。 提供多种 Flash 的 Canvas / Viewstack 的切换特效。 包括 3D 特效等。
1. a book Developing Flex Applications 2. a web page viewer for doc88 ebt 3. a DDA downloader for doc88.com CONTENTS PART I: Presenting Flex CHAPTER 1: Introducing Flex. . . . . . . . . . . . . . ...
NULL 博文链接:https://xiaoxiong0913.iteye.com/blog/712006
xmlplus 是一个JavaScript框架,用于快速开发前后端项目。这篇文章主要介绍了xmlplus组件设计系列之路由,具有一定的参考价值,感兴趣的小伙伴们可以参考一下