针对移动平台的Flash游戏移植与优化

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
13
Click/Drag = Touch Begin/End
点击与拖动对象时可采用Touch Begin/End
Thursday, August 4, 2011
9
了解移动设备的特点
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
9
为手指操作设计你的游戏
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
7
移植
migration
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
8
了解移动设备的特点
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
14
Long Tab
长按对象可用来激活子菜单,游戏对象属性面板等
var pressTimer:Timer = new Timer(1000); pressTimer.addEventListener(TimerEvent.TIMER, pressTimerHandler); function fl_PressTimerHandler(event:TimerEvent):void { // Start your custom code } Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; square.addEventListener(TouchEvent.TOUCH_BEGIN, pressBeginHandler); function pressBeginHandler(event:TouchEvent):void { pressTimer.start(); } square.addEventListener(TouchEvent.TOUCH_END, pressEndHandler); square.addEventListener(TouchEvent.TOUCH_ROLL_OUT, pressEndHandler); function pressEndHandler(event:TouchEvent):void { pressTimer.stop(); // End your custom code }
Thursday, August 4, 2011
10
为手指操作设计你的游戏
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
11
为手指操作设计你的游戏
1
契机
opportunity
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
2
Flash/AIR 跨平台的解决方案
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
6
传统的Flash开发与移动开发存在距离
文件大小 内存限制 渲染性能 网络速度 用户体验 ......
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
11
为手指操作设计你的游戏
充分运用手势
•缩放手势来放大缩小 •滑动来对内容切换 •点击、长按来出现不同内容 •多点触摸控制游戏角色不同行为 •......
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
10
为手指操作设计你的游戏
15x15px
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
10
为手指操作设计你的游戏
15x15px
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
10
为手指操作设计你的游戏
15x15px
45x45px
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
9
了解移动设备的特点
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
9
了解移动设备的特点
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; square.addEventListener(TouchEvent.TOUCH_BEGIN, touchBeginHandler); var fl_DragBounds:Rectangle = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight); function fl_TouchBeginHandler(event:TouchEvent):void { event.target.startTouchDrag(event.touchPointID, false, fl_DragBounds); } square.addEventListener(TouchEvent.TOUCH_END, touchEndHandler); function fl_TouchEndHandler(event:TouchEvent):void { event.target.stopTouchDrag(event.touchPointID); }
4
AIR在移动设备上的性能大幅度提升
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
5
移动Байду номын сангаас用市场为Flash开发者提供了新的空间
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
针对移动平台的Flash游戏移植与优化
Peter Huang | Adobe Platform Evangelist weibo.com/fans8
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
Thursday, August 4, 2011
12
Mouse Click = Tap Event
Tab事件与传统鼠标点击事件一致
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; square.addEventListener(TouchEvent.TOUCH_TAP, tapHandler); function tapHandler(event:TouchEvent):void { // Start your custom code }
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
11
为手指操作设计你的游戏
菜单导航=按钮
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
15
Tow-Finger Tab
双指点击同样可以在游戏中替代传统的右键激活子功能
Multitouch.inputMode = MultitouchInputMode.GESTURE; stage.addEventListener(GestureEvent.GESTURE_TWO_FINGER_TAP, twoFingerTapHandler); function twoFingerTapHandler(event:GestureEvent):void { // Start your custom code }
•Flash Builder 4.5 •Flash Pro 5.5 •AIR Developer Tool
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
Thursday, August 4, 2011
3
Flash/AIR 跨平台的解决方案
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
3
Flash平台移动应用创建工作流
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thursday, August 4, 2011
16
Pinch to Zoom
通过手指缩放操作来放大缩小游戏元素
Multitouch.inputMode = MultitouchInputMode.GESTURE; stage.addEventListener(TransformGestureEvent.GESTURE_ZOOM, zoomHandler); function zoomHandler(event:TransformGestureEvent):void { instance_name_here.scaleX *= event.scaleX; instance_name_here.scaleY *= event.scaleY; }
相关文档
最新文档