Flash event handling – desktop apps vs mobile apps – Part 1
Many people think that Win7/OSX/Chrome are not suitable for used on mobile device like tablet. Instead WP7/iOS/Android are more suitable choices to run on tablet. One of the arguments is that full desktop OSes are not designed with touch input in mind. They are designed for mouse input. This is a very valid argument.
With a computer, user rely on mouse to interact with the software. A display cursor help user point and click on an object. User can also use the cursor to hover over the object and very often the software would display a hover state of the object for visual feedback. Further user can often right-click the mouse and the object can display a context menu.
None of the above is available on a typical capactive touch screen tablet without a mouse input. There is no cursor display. User would point their finger directly on the screen to the object they want to interact with. There is no hover effect too. As soon as the finger tap on the object, it is equivalent to the mouse click event. And to simulate right-mouse click event, very often user would have to tap-and-hold (for a second or two) if context menu is to be displayed. On the other hand, there are additional touch input events like gesture, swipe, etc that are not available on computer based on mouse inputs.
As a result, the user interface of the software needs to change/adapt based on whether the device has a mouse input or touch input. And that extends beyond just the OS. Any software or application should be design according to the user input mechanism. A Flash application is no exception.
Flash can be output as SWF (for browser app) or AIR (for desktop app) or IPA (for iPhone/iPad app) or APK (for Andorid app). But that doesn’t mean we can simply change the publish profile and output the same Flash app to run on all these devices. We need to modify the Flash app based on user input types, among other things.
In my next post, I would elaborate on the different user inputs available on Actionscript 3 to handle mouse input and touch input devices. Stay tuned.