Use the Spacebar or click on the Emenoh logo to access the global navigation menu
Go Back

TouchScreen Mouse Events in Flash

After looking everywhere for the answer to what mouse event was the right one to use in Flash on a TouchScreen, I had to discover it through trial and error.

Using a Click event did not work. The mouse would receive the down event before moving to the location of the touch and would continue to process the event at the last location of the mouse rather than the new location. Mouse Down similarly was triggered prior to moving the mouse to the proper location. Mouse Up seemed to work but was inconsistent. On Release worked the best.

So for anyone out there working on TouchScreen applications using Flash (at least, this may apply to HTML+Javascript as well)... use the On Release event.

One caveat. I was working in Actionscript 3, so YMMV. Also I did not play around with event phases to see if setting the events to the capture phase would result in better response with Mouse Down or Up. I have used generic terms rather than the specific code here. I'll follow up with some examples - though their usefulness for people without access to a TouchScreen is educational at best. Finally, every TouchScreen appears to be slightly different and has unique software driver support. Again, YMMV - hopefully this will help someone out there.