Flex mobile 开发手机小项目 import flash.ui.Multitouch; import flash.ui.MultitouchInputMode; private function onSwipe(event:TransformGestureEvent):void{ if(event.offsetX == -1){ doSwipeLeft(); } else if(event.offsetX == 1){ doSwipeRight(); } } private function doSwipeLeft():void{ navigator.pushView(NewPhoto); } private function doSwipeRight():void{ navigator.popToFirstView(); } public function left_Handler(e:MouseEvent):void{ image.rotation -=90; } public function right_Handler(e:MouseEvent):void{ image.rotation += 90; } ]]> </fx:Script> <s:VGroup left="6" right="14" top="10" bottom="10" gestureSwipe="onSwipe(event)"> <s:Image source="assets/0 (3).jpg" id="image" width="472" height="423" horizontalAlign="center"/> <s:HGroup width="490"> <s:Button width="50" height="50" click="left_Handler(event)" icon="assets/left.jpg" layoutDirection="rtl"/> <s:Button width="50" height="50" click="right_Handler(event)" icon="assets/right.jpg" layoutDirection="rtr"/> </s:HGroup> </s:VGroup> </s:View>
- 粉丝: 4
- 资源: 2
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助