最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
robotlegs使用例子的笔记
时间:2014-04-23 编辑:简简单单 来源:一聚教程网
先放上我写的demo吧,明天回老家,等下周来了继续写哈~
as文件
代码如下 | 复制代码 |
package { import com.pztai.example.AppConfig; import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import robotlegs.bender.bundles.mvcs.MVCSBundle; import robotlegs.bender.extensions.contextView.ContextView; import robotlegs.bender.framework.api.IContext; import robotlegs.bender.framework.impl.Context; import flash.events.IEventDispatcher; import com.pztai.example.view.events.indexViewEvent; public class vcandroid extends Sprite { private var _context:IContext; public function vcandroid() { super(); // 支持 autoOrient stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; _context = new Context() .install(MVCSBundle) .configure(AppConfig) .configure(new ContextView(this)); } } } |
xml文件
代码如下 | 复制代码 |
|
这个demo仅仅实现了核心的交互
其中需要注意的地方
1.AppConfi.as 里面的注入要写在config()函数里面
2.command触发事件 要写在mediator里面,逻辑部分最好都写在command 里面
3.model 不存储数据
相关文章
- FLASH软件帧编辑功能怎么使用 06-22
- FLASH软件常用上色工具怎么使用 06-19
- flash怎么制作遮罩图片切换动画 06-19
- FLASH制作春意盎然花园效果 06-18
- 利用ae制作碎片文字动画 06-15
- flash图片怎么替换 06-14