I’m writing a kiosk flash for use with a touchscreen. There’s no standard mouse our keyboard. What I’m creating is a “soft keyboard” with an array of movieclip objects on the screen. It is a bit challenging, however, because of the nature of the touchscreen interface.
A touchscreen, if I understand correctly, registers the equivalent of a mouse down, a drag, and a mouse up. There is no equivalent of moving the mouse without the button down.
What I’d like to do is change the state of the keyboard button movieclip if the cursor is over top of it (a “depressed” look). What is likely going to screw things up is that someone will touch the touchscreen (“mouse button down”) in a blank part of the flash, drag the cursor over top of the key movieclip, and then release the touchscreen (“mouse button up”). I’d like to do the key animation when the dragged mouse cursor comes over the movieclip, and do the inverse animation when the mouse cursor leaves the target area of the movieclip. I can do this just fine with the typical “on(rollOver)” and “on(rollOut)” if I didn’t need to worry about the fact that on a touchscreen, if you are moving the cursor, the mouse is always down. I looked at the on(dragOver) and on(dragOut) events, but they don’t seem to fire if you don’t click down within the movieclip to begin with. If you click down outside the movieclip, and roll over it, the event doesnt’ trigger.
Any ideas how to go about this? Do I need to come up with some complex array of absolute position coordinates and trigger the appropriate key movieclip based on its known x,y area on the screen? A simple set of triggered events would be SOOO much easier, especially if I want to change key locations or sizes.
If I need to explain this better, please let me know. I’m open to any ideas.