simple expressions at play

74
Simple Expressions @ Play Shashank Tiwari www.treasuryofideas.com | www.shanky.org shashank.>wari@treasuryofideas.com| [email protected] | twi?er: tshanky

Upload: shashank-tiwari

Post on 28-Jan-2015

108 views

Category:

Technology


0 download

DESCRIPTION

Introducing gestures and its relevance to the Flash platform.

TRANSCRIPT

Page 1: Simple Expressions At Play

SimpleExpressions@Play

ShashankTiwariwww.treasuryofideas.com|www.shanky.org

shashank.>[email protected]|[email protected]|twi?er:tshanky

Page 2: Simple Expressions At Play

What’scoming?

•  Gestureseverywhere!•  GesturesinFlashtoday•  What’sbrewing?

•  WheredoIgofromhere?

Page 3: Simple Expressions At Play

Whatexactlyisagesture?

•  Touch,mo>on,voice,thought?•  Sta>c–performandhold– Example–thumbsup!,touch

•  Dynamic–movementover>me– Example–wave,flick/pinch

•  Welldefineddeviceconstrained|freeform

Page 4: Simple Expressions At Play

GesturesEverywhere!

JeffHan

1Of15

Page 5: Simple Expressions At Play

GesturesEverywhere!

Wii

2Of15

Page 6: Simple Expressions At Play

GesturesEverywhere!

TheClapper

3Of15

Page 7: Simple Expressions At Play

GesturesEverywhere!

GoogleNexusOne

4Of15

Page 8: Simple Expressions At Play

GesturesEverywhere!

ATM

5Of15

Page 9: Simple Expressions At Play

GesturesEverywhere!

AirportCheck‐inkiosk

6Of15

Page 10: Simple Expressions At Play

GesturesEverywhere!

GlowingPlaces

7Of15

Page 11: Simple Expressions At Play

GesturesEverywhere!

MicrosoYSurface

8Of15

Page 12: Simple Expressions At Play

GesturesEverywhere!

Fukuda’sautoma>cdoor

9Of15

Page 13: Simple Expressions At Play

GesturesEverywhere!

enMo>on’sPapertoweldispenser

10Of15

Page 14: Simple Expressions At Play

GesturesEverywhere!

DysonAirBlade

11Of15

Page 15: Simple Expressions At Play

GesturesEverywhere!

DanceDanceRevolu>on

12Of15

Page 16: Simple Expressions At Play

GesturesEverywhere!

Cubit

13Of15

Page 17: Simple Expressions At Play

GesturesEverywhere!

Intel’stouchscreenwall

14Of15

Page 18: Simple Expressions At Play

GesturesEverywhere!

PhilipsImageocandlelight

15Of15

Page 19: Simple Expressions At Play

GesturesinFlash

•  It’snotnewontheFlashpla\orm!•  Sohowdowegetgesturesworking–  Ifyouarenotblindtoinputs,youcanpossibleactonit.

•  OldStyle–FP‐>Socket‐>deviceinputs•  NewStyle–FP10.1‐>driverbakedintotheplayer

1Of45

Page 20: Simple Expressions At Play

GesturesinFlash

•  OldStyle– Touchlib‐‐h?p://code.google.com/p/touchlib/

– Gestureworks‐‐h?p://gestureworks.com/–  Ideo‐‐h?p://code.google.com/p/ideo‐mul>touch/

– Touche‐‐h?p://code.google.com/p/touche/–  (op>calmul>‐touch)

2Of45

Page 21: Simple Expressions At Play

GesturesinFlash

•  NewStyle– Build‐insupportinFlashPlayer10.1andAIR2•  Formul>‐touchgestures•  Promisingtobecrosspla\orminfuture

–  (providedthatispossible!)

3Of45

Page 22: Simple Expressions At Play

GesturesinFlash

•  Beforewelearnaboutthemul>‐touchsupport,letsseewhat’sinfluencingit…

4Of45

Page 23: Simple Expressions At Play

GesturesinFlash

•  Typesoftouchdevices:•  Resis>ve‐‐(example:Kiosks)– 2thinelectricallyconduc>velayersseparatedbyagap

– Ontouchpanelsgetconnected– Panelsactasvoltagedividerpairwithconnectedoutputs

– Changeinelectriccurrentregisteredasatouchevent

5Of45

Page 24: Simple Expressions At Play

GesturesinFlash

•  Capaci>ve––  InsulatorlikeglasscoveredwithaconductorlikeIndiumTinOxide(ITO)

– Humanbodyisagoodcondutor

– Ontouchelectrosta>cfieldisdistorted,whichisrecordedasachangeincapacitance(abilityofabodytoholdcharge)

6Of45

Page 25: Simple Expressions At Play

GesturesinFlash

•  Op>calImaging–– 2or>imagesensorsplacedaroundedges

– Ontheotherside,inthecamera’sfieldofviewinfraredlightisplaced

–  touchtranslatestoshadow– Pairofcamerastriangulatedtolocateatouch

7Of45

Page 26: Simple Expressions At Play

GesturesinFlash

•  Surfacewaveacous>cs–– Ultrasonicwavespassoverthesurface– Touchabsorbsultrasonicwaves

•  Dispersivesignal– Sensorstouchmechanicalenergyintheglassduetotouch

•  Straingauge– Springmountedon4corners– Gaugesdeterminedeflec>onontouch

8Of45

Page 27: Simple Expressions At Play

GesturesinFlash

•  Numberoftouchpoints– 2seemstoomany!

9Of45

Page 28: Simple Expressions At Play

GesturesinFlash

•  Mul>‐touchdevices–whathavewegot?–  3M—M2256PWwithten‐fingersupport–  Acer—AcerAspire1820PT&5738PG–  Apple—iPhone,iPad,iPodTouch,MacBook,MacBookAir,MacBookPro,MagicMouse

–  Asus—EEEPCT91MT&T101MT–  CircleTwelve—DiamondTouch–  Dell—La>tudeXT&XT2,Mini5,Studio17–  Google—NexusOne–  Hewle?‐Packard—HPTouchsmart–  HTC—HTCHero,HTCHD2–  Ideum—MT‐50Mul>touchTable

10Of45

Page 29: Simple Expressions At Play

GesturesinFlash–  Lenovo—X200&T400–  LGElectronics—Arena,BL40NewChocolate–  MicrosoY—Surface,ZuneHD–  Motorola—Droid–  MULTIVISION—Mul>‐TouchLCD—upto32fingers–  Nortd—TouchKit–  Palm—Pre,Pixi–  Percep>vePixel—Mul>‐TouchCollabora>onWall–  Shu?leInc.—Mul>‐touchLCDX50v2–  Sony—VAIOLSeriesAll‐in‐onedesktops–  TycoElectronics/EloTouchSystems‐IntelliTouchPlusSurface

Acous>cWaveMul>‐touchTouchTechnology–  Wacom—Bambootablets

11Of45

Page 30: Simple Expressions At Play

GesturesinFlash

•  ForstartershowdoIfindifFP10.1|AIR2knowsofthetouchevents?

12Of45

Page 31: Simple Expressions At Play

GesturesinFlash

Mul>touch.supportsGestureEvents– Doesit?

Mul>touch.supportsTouchEvents– Doesit?

13Of45

Page 32: Simple Expressions At Play

GesturesinFlash

•  Isitsingletouchorgestures?

– SetthecorrectinputMode

– Whichissetflash.ui.Mul>touch.inputMode

14Of45

Page 33: Simple Expressions At Play

GesturesinFlash

•  flash.ui.Mul>touchInputMode– GESTURE–gesturesrecognized,simpletouchevent=mouseevent

– NONE–everythingistreatedasamouseevent

– TOUCH_POINT–onlythebasictouchevents,nogestures

15Of45

Page 34: Simple Expressions At Play

GesturesinFlash

•  Howmanytouchpointsaresupported?

– Mul>touch.maxTouchPoints 16Of45

Page 35: Simple Expressions At Play

GesturesinFlash

•  ToucheventorGestureevent?•  flash.events.TouchEvent

•  flash.events.GestureEvent•  flash.events.TransformGestureEvent

•  flash.events.PressAndTapGestureEvent

17Of45

Page 36: Simple Expressions At Play

GesturesinFlash

•  TouchEvent– TOUCH_BEGIN– TOUCH_END– TOUCH_MOVE– TOUCH_OUT

18Of45

Page 37: Simple Expressions At Play

GesturesinFlash

•  TouchEvent(…cont)– TOUCH_OVER– TOUCH_ROLL_OUT– TOUCH_ROLL_OVER– TOUCH_TAP

19Of45

Page 38: Simple Expressions At Play

GesturesinFlash

•  Proper>estheTouchEventobjecthas––  touchPointID–uniqueIDa?achedtothetouchpoint

–  localX–xcoordinaterela>vetothesprite–  localY–ycordinaterela>vetothesprite– sizeX–widthofthecontactarea– sizeY–heightofthecontactarea

20Of45

Page 39: Simple Expressions At Play

GesturesinFlash

•  Proper>estheTouchEventobjecthas(…cont)–– controlKey– commandKey– altKey– shiYKey

21Of45

Page 40: Simple Expressions At Play

GesturesinFlash

•  Rawtoucheventscanbehandledtounderstandgestures,buttherearesomealreadythere. 22

Of45

Page 41: Simple Expressions At Play

GesturesinFlash

•  TransformGestureEvent– GESTURE_PAN– GESTURE_ROTATE– GESTURE_SWIPE– GESTURE_ZOOM

23Of45

Page 42: Simple Expressions At Play

GesturesinFlash

•  GESTURE_PAN

•  h?p://gestureworks.com/wp‐content/themes/gestureWorks/images/gesturePngs/lock_two_pan.png

•  (h?p://i.msdn.microsoY.com/Dd940543.gestures%28en‐us,VS.85%29.png)

24Of45

Page 43: Simple Expressions At Play

GesturesinFlash

•  GESTURE_ROTATE

•  h?p://gestureworks.com/wp‐content/themes/gestureWorks/images/gesturePngs/two_finger_rotate.png

•  (h?p://i.msdn.microsoY.com/Dd940543.gestures%28en‐us,VS.85%29.png)

25Of45

Page 44: Simple Expressions At Play

GesturesinFlash

•  Whataboutthis?

•  h?p://gestureworks.com/wp‐content/themes/gestureWorks/images/gesturePngs/two_hand_rotate.png

26Of45

Page 45: Simple Expressions At Play

GesturesinFlash

•  GESTURE_SWIPE

•  h?p://regmedia.co.uk/2008/12/29/swipe_patent1.jpg•  (h?p://i.msdn.microsoY.com/Dd940543.gestures%28en‐us,VS.85%29.png)

27Of45

Page 46: Simple Expressions At Play

GesturesinFlash

•  Whataboutthis?

•  Onefingerflick‐‐h?p://gestureworks.com/wp‐content/themes/gestureWorks/images/gesturePngs/one_finger_swipe.png

28Of45

Page 47: Simple Expressions At Play

GesturesinFlash

•  Andthis?

•  Twofingerflick‐‐h?p://gestureworks.com/wp‐content/themes/gestureWorks/images/gesturePngs/two_finger_swipe.png

29Of45

Page 48: Simple Expressions At Play

GesturesinFlash

•  GESTURE_ZOOM

•  h?p://gestureworks.com/wp‐content/themes/gestureWorks/images/gesturePngs/two_finger_zoom_in.png

•  (h?p://i.msdn.microsoY.com/Dd940543.gestures%28en‐us,VS.85%29.png)

30Of45

Page 49: Simple Expressions At Play

GesturesinFlash

•  Whataboutthis?

•  Mul>pointzoom‐‐h?p://gestureworks.com/wp‐content/themes/gestureWorks/images/gesturePngs/two_hand_zoom_in.png

31Of45

Page 50: Simple Expressions At Play

GesturesinFlash

•  Andthis?

•  h?p://gestureworks.com/wp‐content/themes/gestureWorks/images/gesturePngs/pinch_zoom.png

32Of45

Page 51: Simple Expressions At Play

GesturesinFlash

•  GestureEvent– GESTURE_TWO_FINGER_TAP

33Of45

Page 52: Simple Expressions At Play

GesturesinFlash

•  GESTURE_TWO_FINGER_TAP

•  h?p://gestureworks.com/wp‐content/themes/gestureWorks/images/gesturePngs/two_finger_tap.png•  h?p://i.msdn.microsoY.com/Dd940543.gestures%28en‐us,VS.85%29.png

34Of45

Page 53: Simple Expressions At Play

GesturesinFlash

•  Whataboutthis?

•  Twofingerdoubletap‐‐h?p://gestureworks.com/wp‐content/themes/gestureWorks/images/gesturePngs/two_finger_double_tap.png

35Of45

Page 54: Simple Expressions At Play

GesturesinFlash

•  PressAndTapGestureEvent– GESTURE_PRESS_AND_TAP

36Of45

Page 55: Simple Expressions At Play

GesturesinFlash

•  GESTURE_PRESS_AND_TAP

•  h?p://i.msdn.microsoY.com/Dd940543.gestures%28en‐us,VS.85%29.png

37Of45

Page 56: Simple Expressions At Play

GesturesinFlash

•  Letsseeasimpleexample(amediasorter)– FP10.1– AIR2 38

Of45

Page 57: Simple Expressions At Play

GesturesinFlash

•  Sowhatworks?•  Win7–allgood

•  Mac–AIR2|FP10.1

•  Linux–some>mesworks!

39Of45

Page 58: Simple Expressions At Play

GesturesinFlash

•  Anotherexample(asoYkeyboard)– OlderFP(earlierthantheonethatofficiallysupportstouchandgestures)

– FP10.1– AIR2

40Of45

Page 59: Simple Expressions At Play

GesturesinFlash

•  Yetanotherexample(anelementaryrota>ngglobe)

41Of45

Page 60: Simple Expressions At Play

GesturesinFlash

•  Whataboutcustomgestures?– Combina>on|Aggrega>on

– Extension 42Of45

Page 61: Simple Expressions At Play

GesturesinFlash

•  Aggrega>on•  GESTURE_ZOOM+TAP– <>.addEventListener(TransformGestureEvent.GESTURE_ZOOM,onZoom);

–  func>ononZoom(evt:TransformGestureEvent):void{if(evt.phase==GesturePhase.BEGIN){addeventlistenerfortap–whichistranslatedtoamouseclick}

43Of45

Page 62: Simple Expressions At Play

GesturesinFlash

•  Aggrega>on•  GESTURE_ZOOM+GESTURE_ROTATE

•  ? 44Of45

Page 63: Simple Expressions At Play

GesturesinFlash

•  Extension– Listentorawtoucheventsanduseyourbrilliance!

45Of45

Page 64: Simple Expressions At Play

What’sbrewing?

•  Extendgesturesupportbeyondthebasics– Gesturekit‐‐h?p://code.google.com/p/gesturekit/ 1

Of5

Page 65: Simple Expressions At Play

What’sbrewing?

•  Helpthosewhodon’thaveaccesstoamul>‐touchdevice– Startwithmul>touchup.com– Relyonyourmouse– Mactrackpadisn’tbad(withAIR2)

2Of5

Page 66: Simple Expressions At Play

What’sbrewing?

•  TouchdragsupportwithintheFPapi•  Supportonallpla\orms– Mobileseemsapriority 3

Of5

Page 67: Simple Expressions At Play

What’sbrewing?

•  Newerdevices–smartphones,slatesandnetbooks

•  Newertouchaccesspoints–kiosks,surfacesandwalls

4Of5

Page 68: Simple Expressions At Play

What’sbrewing?

•  Integra>onwithgesturesbeyondtouch– Mo>ondetec>on

– Soundrecogni>on– Freeformexpressions– Simultaneoustrackingofeachofthese

5Of5

Page 69: Simple Expressions At Play

WheredoIgofromhere?

•  GetFP10.1&AIR2•  Getholdofatouchscreen|device•  Readthedocumenta>on– h?p://help.adobe.com/en_US/as3/dev/WSb2ba3b1aad8a27b0‐6�37601221e58cc29‐8000.html

– h?p://help.adobe.com/en_US/FlashPla\orm/beta/reference/ac>onscript/3/flash/events/TouchEvent.html

1Of4

Page 70: Simple Expressions At Play

WheredoIgofromhere?

•  Writeanapportwo•  GiveupyoursleeptrackingtheTouchEvent!

2Of4

Page 71: Simple Expressions At Play

WheredoIgofromhere?

•  Explore– Unistrokerecognizer‐‐h?p://depts.washington.edu/aimgroup/proj/dollar/

– h?p://www.betriebsraum.de/projects/gestures/

•  Gestureworks–Opensourcegesturelibrary– h?p://gestureworks.com/about/open‐source‐gesture‐library/

3Of4

Page 72: Simple Expressions At Play

WheredoIgofromhere?

•  Gesturerecogni>on‐‐h?p://github.com/sqrtof5/GestureRecogni>on

•  Touchlibsource–– h?p://code.google.com/p/touchlib/source/browse/trunk/AS3/int/app/core/ac>on/gestures/GestureNormalizer.as

4Of4

Page 73: Simple Expressions At Play

Thispresenta>on&demos?

•  h?p://shanky.org/publish‐and‐present/flex•  h?p://www.treasuryofideas.com/gestures/touch/MediaSorter/MediaSorter.html

–  Iwilltweettheexactlinksandwhentheupdatedversionsareready–twi?er:tshanky

–  Imagesforslidesweredownloadedfromtheweb.Thecopyrightsiswiththeirrespec>veowners

–  Referencestomaterialusedbetweenslides4and18isavailableath?p://www.shanky.org/references/simple_expressions_at_play_references.pdf.

Page 74: Simple Expressions At Play

Thanksforcoming!

ShashankTiwariwww.treasuryofideas.com|www.shanky.org

[email protected]|[email protected]|

twi?er:tshanky