Michaël CHAIZE |  Platform Evangelist<br />Flex and Multi-touch applications<br />
About Me<br />2<br />http://codemoiunmouton.wordpress.com<br />http://twitter.com/mchaize<br />
Multi-touch facts<br />3<br />  	First Multi-touch display developed by Nimish Mehta.<br /> 	Murray Hill’s paper on touch-...
Two modes in Flash : Touch events vs. gestures<br />Touch events are raw inputs<br />Gestures are combinations of multiple...
Supported platforms and hardware<br />Supported by Flash Player 10.1 and AIR 2.0<br />Touch<br />Windows 7 and later<br />...
WHAT’S NEW?<br />6<br />
What do we get with FP10.1 and AIR 2.0?<br />flash.ui.Multitouch<br />flash.ui.MultitouchInputMode<br />flash.events.Touch...
Multitouch API<br />Multitouch.inputMode<br />MultitouchInputMode.GESTURE: Use this mode if you want multi-touch events sy...
TOUCH EVENTS<br />9<br />
New Flash touch API’s<br />TouchEvent.TOUCH_BEGIN<br />TouchEvent.TOUCH_END<br />TouchEvent.TOUCH_MOVEThe user is moving h...
New Flash touch API’s<br />TouchEvent.TOUCH_BEGIN<br />TouchEvent.TOUCH_END<br />TouchEvent.TOUCH_MOVE<br />TouchEvent.TOU...
New Flash touch API’s<br />Touch event properties<br />touchPointID: A unique identification number assigned to the touch ...
13<br />GESTURE EVENTS<br />
New Flash gesture API’s<br />GestureEvent.GESTURE_TWO_FINGER_TAP<br />PressAndTapGestureEvent.GESTURE_PRESS_AND_TAP<br />T...
Gesture events properties<br />TransformGestureEvent:<br />offsetXand offsetYindicate the horizontal or vertical translati...
16<br />DEMO<br />Gestures with Flex on MAC<br />Touch Events with Flex on Windows 7<br />Gestures with Flash CSx and Devi...
Credits and Links<br />Credits to Ryan Lee for letting me use icons from http://gesturecons.com<br />Christian Cantrell’s ...
18<br />Q&A<br />
Flex et le développement d'applications Multi-Touch
Upcoming SlideShare
Loading in …5
×

Flex et le développement d'applications Multi-Touch

12,837 views

Published on

Slides de ma présentation au Flex Camp de Paris (Mars 2010). Présentation de l'API Multi-touch du Flash Player 10.1.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
12,837
On SlideShare
0
From Embeds
0
Number of Embeds
9,697
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Touch events are similar to mouse events, except that you can receive and track more than one of them at once, and touch events do not support mouse-specific concepts such as hovering.Gestures are the synthesis of multiple touch events into a single event. Examples of gestures include &quot;pinching&quot; an image to scale it, or &quot;swiping&quot; to delete something from a list. Some platforms explicitly support the concept of gestures, reducing the amount of work that a developer needs to do in order to detect and react to them, and some platforms require developers to capture multiple touch events and synthesize them into gestures themselves. The Flash Platform automatically synthesizes the most common gestures across different platforms, but also provides developers with the APIs necessary to synthesize their own.
  • Flex et le développement d'applications Multi-Touch

    1. 1. Michaël CHAIZE | Platform Evangelist<br />Flex and Multi-touch applications<br />
    2. 2. About Me<br />2<br />http://codemoiunmouton.wordpress.com<br />http://twitter.com/mchaize<br />
    3. 3. Multi-touch facts<br />3<br /> First Multi-touch display developed by Nimish Mehta.<br /> Murray Hill’s paper on touch-screen based interfaces.<br />1991 Pierre Wellner’s paper on multi-finger and pinching motions.<br />2006 Jeff Han presents multi-touch sensing at TED.<br />2007 Apple annouces the iPhone.<br />2007 MSFT announces Surface.<br />2009 Windows 7 launches with full multi-touch support.<br />2009 Apple adds multi-touch gestures to MacBooks.<br />2009 Adobe adds multi-touch and Gestures to Flash/AIR.<br />
    4. 4. Two modes in Flash : Touch events vs. gestures<br />Touch events are raw inputs<br />Gestures are combinations of multiple touch events<br />4<br />
    5. 5. Supported platforms and hardware<br />Supported by Flash Player 10.1 and AIR 2.0<br />Touch<br />Windows 7 and later<br />iPhone OS 3.0 and later<br />Gestures<br />Windows 7 and later<br />Macs running Mac OS X 10.5.3 and later (with multi-touch trackpads)<br />At this time only AIR applications (not swf content in the browsers)<br />iPhone OS 3.0 and later<br />Android support Multi-touch<br />5<br />
    6. 6. WHAT’S NEW?<br />6<br />
    7. 7. What do we get with FP10.1 and AIR 2.0?<br />flash.ui.Multitouch<br />flash.ui.MultitouchInputMode<br />flash.events.TouchEvent<br />flash.events.GestureEvent<br />flash.events.GesturePhase<br />flash.events.TransformGestureEvent<br />flash.events.PressAndTapGestureEvent<br />7<br />
    8. 8. Multitouch API<br />Multitouch.inputMode<br />MultitouchInputMode.GESTURE: Use this mode if you want multi-touch events synthesized into gesture events.<br />MultitouchInputMode.TOUCH_POINT: Use this mode if you are interested only in touch events and no mouse or gesture events.<br />MultitouchInputMode.NONE: Use this mode if you want to handle all touches as mouse events.<br />Multitouch.maxTouchPoints<br />Multitouch.supportedGestures<br />Returns Vector.<String><br />Multitouch.supportsGestureEvents<br />Multitouch.supportsTouchEvents<br />8<br />
    9. 9. TOUCH EVENTS<br />9<br />
    10. 10. New Flash touch API’s<br />TouchEvent.TOUCH_BEGIN<br />TouchEvent.TOUCH_END<br />TouchEvent.TOUCH_MOVEThe user is moving his finger across the screen<br />TouchEvent.TOUCH_OUTA touch point has left an InteractiveObject(fire for each child of the InteractiveObject)<br />TouchEvent.TOUCH_OVER<br />TouchEvent.TOUCH_ROLL_OUTA touch point has left an InteractiveObject(don’t fire for each child, act as a container)<br />TouchEvent.TOUCH_ROLL_OVER<br />TouchEvent.TOUCH_TAPA quick TOUCH_BEGIN and TOUCH_END has occured<br />10<br />
    11. 11. New Flash touch API’s<br />TouchEvent.TOUCH_BEGIN<br />TouchEvent.TOUCH_END<br />TouchEvent.TOUCH_MOVE<br />TouchEvent.TOUCH_OUT<br />TouchEvent.TOUCH_OVER<br />TouchEvent.TOUCH_ROLL_OUT<br />TouchEvent.TOUCH_ROLL_OVER<br />TouchEvent.TOUCH_TAP<br />11<br />
    12. 12. New Flash touch API’s<br />Touch event properties<br />touchPointID: A unique identification number assigned to the touch point.<br />isPrimaryTouchPoint: Indicates whether the first point of contact is mapped to mouse events.<br />pressure: A value between 0.0 and 1.0 indicating force of the contact with the device (platform and device specific).<br />sizeX: The width of the contact area.<br />sizeY: The height of the contact area.<br />New touch functions on Sprite<br />startTouchDrag: Drags the specified sprite on a touch-enabled device.<br />stopTouchDrag: Ends the startTouchDrag() method.<br />12<br />
    13. 13. 13<br />GESTURE EVENTS<br />
    14. 14. New Flash gesture API’s<br />GestureEvent.GESTURE_TWO_FINGER_TAP<br />PressAndTapGestureEvent.GESTURE_PRESS_AND_TAP<br />TransformGestureEvent.GESTURE_PAN<br />TransformGestureEvent.GESTURE_ROTATE<br />TransformGestureEvent.GESTURE_SWIPE<br />TransformGestureEvent.GESTURE_ZOOM<br />14<br />
    15. 15. Gesture events properties<br />TransformGestureEvent:<br />offsetXand offsetYindicate the horizontal or vertical translation of the display object since the previous gesture event.<br />scaleXand scaleYindicate the horizontal or vertical scale of the display object since the previous gesture event.<br />rotation indicates the current rotation angle, in degrees, of the display object along the z-axis since the previous gesture event.<br />PressAndTapGestureEvent:<br />tapLocalXand tapLocalYindicating the horizontal or vertical coordinate at which the event occurred relative to the containing interactive object.<br />tapStageXand tapStageYindicate the horizontal or vertical coordinate at which the tap touch occurred in global Stage coordinates.<br />15<br />
    16. 16. 16<br />DEMO<br />Gestures with Flex on MAC<br />Touch Events with Flex on Windows 7<br />Gestures with Flash CSx and Device Central CSx<br />
    17. 17. Credits and Links<br />Credits to Ryan Lee for letting me use icons from http://gesturecons.com<br />Christian Cantrell’s article on:http://www.adobe.com/devnet/flash/articles/multitouch_gestures.html<br />ASDocs:http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/ui/Multitouch.html<br />17<br />
    18. 18. 18<br />Q&A<br />

    ×