Getting Touch Events to Play Nice in Flex Ryan Frishberg Software Consultant, Lab49

Slides:



Advertisements
Similar presentations
Click on the rectangle on the lower right-hand side of the screen. This will quickly clear your desktop.
Advertisements

Mouse Listeners We continue our examination of GUIs by looking at how to interact with the mouse –Just as Java creates Events when the user interacts with.
Event Handling. Overview How to listen (and not listen) for events Creating a utility library (and why you should) Typology of events Pairing event listeners.
Macromedia Flash MX 2004 – Design Professional and Interactivity WORKING WITH SYMBOLS.
ACTIVE X By Ethan Huang. OUTLINE What is ActiveX? Component of ActiveX Why ActiveX? ActiveX and Java Security Issue.
Combining Informal and Tangible Interfaces for Early Stages of Web Site Design Raecine Sapien Mentor: Mark Newman Professor: Dr. James Landay This presentation.
Work with symbols and instances Work with Libraries Create buttons Assign actions to buttons Unit Lessons.
CS320n –Visual Programming Interactive Programs Mike Scott (Slides 5-1)
Object-Oriented Analysis and Design
1 CGS1060 Mobile UIs Copyright 2012 by Janson Industries.
Spring /6.831 User Interface Design and Implementation1 Lecture 26: Mobile User Interfaces.
Chapter 11 Adding Media and Interactivity. Flash is a software program that allows you to create low-bandwidth, high-quality animations and interactive.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
Chapter 11 Java AWT Part I: Mouse Events (Optional) Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin,
C H A P T E R T E N Event-Driven Programming Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
Introduction to Flash MX 2004: Action Scripting Lloyd Rieber.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
Flex 2 We’re Not in Kansas Anymore! or Welcome to Flex Theo Rushin Jr TeraTech, Inc.
Interactive Programming Alice. Control of flow Control of flow -- how the sequence of actions in a program is controlled. What action happens first, what.
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Computer basics: Using a mouse Suitable for: Beginner.
CS-1020 Dr. Mark L. Hornick 1 Event-Driven Programming.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.
Model View Controller (MVC) Bigger than a Pattern: It’s an Architecture Rick Mercer with help from many of others 1.
Programming in the Simple Raster Graphics Package (SRGP) Chapter 2.
Macromedia Flash 8 Revealed WORKING WITH SYMBOLS AND INTERACTIVITY.
Macromedia Flash Design Professional And Interactivity WORKING WITH SYMBOLS.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4: Events Programming with Alice and Java First Edition by John Lewis.
Interactive Programming Alice. Control of flow Control of flow -- how the sequence of actions in a program is controlled. What action happens first, what.
Lecture 18: Events; Cool Applets Yoni Fridman 7/30/01 7/30/01.
Week 2: Mobile User Interfaces. Objectives Review of User Interface Design Mobile specific design challenges in mobile UIs –specifically modern smartphones.
1 Event Driven Programs Rick Mercer. 2 So what happens next?  You can layout a real pretty GUI  You can click on buttons, enter text into a text field,
CSI 3125, Preliminaries, page 1 Event Handling. CSI 3125, Preliminaries, page 2 Event Handling An Event Change in the state of an object is known as event.
CISC 110 Day 6 Introduction to Events. Outline Event-Driven Programming Event Classes Hierarchy –Event Class –Mouse Events –Keyboard Events Registering.
Adding User Interactivity. Dynamic and database-driven pages Macromedia Flash Quick Time Virtual Reality (QTVR) Java Script –primarily for client-side.
Part 1 Working with Devices in the CQ Lab. Agenda 2 How to select a device and reserve it. Basic device operations inside the Lab Other features to get.
DM 11- Flash –Unit C and Interactivity WORKING WITH SYMBOLS.
JavaScript Events Java 4 Understanding Events Events add interactivity between the web page and the user You can think of an event as a trigger that.
A disciplined approach to analyzing malfunctions –Provides feedback into the redesign process 1.Play protocol, searching for malfunctions 2.Answer four.
Events. Slide 2©SoftMoore Consulting Events Events are generated when a user interacts with the view objects of an application. Examples –button clicked–
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
12-Jun-16 Event loops. 2 Programming in prehistoric times Earliest programs were all “batch” processing There was no interaction with the user Input Output.
User Interaction Radan Ganchev Astea Solutions. Content Basic input events Gestures Drag and drop Sensors.
Events and Event Handling
Responding to Events Event Handling in Java
Advanced User Interfaces
Introduction to Event-Driven Programming
Event loops 16-Jun-18.
EMR field in Portals Work History page
State Transition Diagram for A System
Lesson 1: Buttons and Events – 12/18
Introduction to Events
The mouse controls the movement of the pointer on your screen.
Event loops.
Using the Vendor Portal
Interactive Programming
Event Driven Systems and Modeling
Event loops 17-Jan-19.
Event loops 17-Jan-19.
Scratch Summer Session 2
Event loops 8-Apr-19.
CS246: Leveraging User Feedback
Event loops.
Give a play idea Listen and respond to friends.
ACM programming contest
Event loops.
Event loops 19-Aug-19.
Interactive Programming
Events Part I Mouse Events.
Brown Bag Seminar Summer 2007
Presentation transcript:

Getting Touch Events to Play Nice in Flex Ryan Frishberg Software Consultant, Lab49

About Me…About You Former Flex SDK Engineer Currently consultant at Lab49 UK

Flash Touch Basics flash.ui.MultitouchInputMode – TOUCH_POINT – GESTURE – NONE

Flash Touch Basics flash.events.TouchEvent – BEGIN – END – MOVE touchEvent – touchPointID – isPrimaryTouchPoint – pressure – sizeX – sizeY

Flash Touch Basics flash.events.GestureEvent – GESTURE_TWO_FINGER_TAP flash.events.GestureTransformEvent – GESTURE_PAN – GESTURE_ROTATE – GESTURE_ZOOM – GESTURE_SWIPE flash.events.PressAndTapGestureEvent – PRESS_AND_TAP_GESTURE_EVENT

Flex Touch Basics MultiTouch.inputMode controls what Flash events you get UIComponent.interactionMode style controls how the Flex components respond to those events – mx.core.InteractionMode TOUCH MOUSE New down state for item renderers – Down vs selected: Down shows intent to click, selected shows item selection(s). To show both in mobile, use an item renderer with a checkmark

Multi-select Item Renderers Example

Why is Touch Difficult Touch events can be inaccurate Interactions are asynchronous and ambiguous Who interprets what was meant? – Components need to coordinate together

Button clicks in a touch-world User presses down on a button Are they attempting to touch the button or start scrolling? When do we show a down state on the Button? What if the user starts scrolling later? What if the user presses on the button quickly – how does the user receive any feedback?

Touch-cancellation Behaviors MouseEvents are bubbled up. When a component sees a mouse event or series of mouse events they want to interpret, the component should dispatch TouchInteractionEvents Three TouchInteractionEvents: – STARTING, START, END

Buttons inside item renderers Not just a touch issue! Issues occur with mouse as well event.preventDefault() is your friend

Adding Swipe Gesture Listen for GestureEvent Listen for other TouchInteraction STARTs and ENDs – can’t interrupt another START Once swipe occurs, dispatch a STARTING, and if not cancelled, dispatch a START (and then an END since it’s not asynchronous

Questions