Topic: Getting coordinates for touchscreen clicks

This is an incredibly simple question, the asking of which should indicate my level of knowledge wrt Flash.

I'm writing an app as the interface to control my Kegbot at home. In frame 5 of this app I display an image (even though frustratingly it's referred to as a Movie Clip) of a keypad. I'd like to authenticate the user based on a PIN code entered on said keypad. To do so my (incorrect it seems) assumption was that I would write an on(press) function in frame 5 and use the coordinates of the screen press to determine which button on the keypad image the user has selected.

So my question is, how can I get the coordinates (relative to the screen or the image) of a touchscreen click?

In a related question: Is Flash the way to go about doing this? I figured it would be the path of least resistance, since Flash is already set up to run on the Chumby, but really I just want an interface to my kegbot, and would be just as happy(if not more so) to use C or Perl to write in QT or GTK or other. Opinions welcome.

Re: Getting coordinates for touchscreen clicks

In Flash, you'd create actual buttons (or MovieClips) for each hot area and attach click handlers to them.

If that's not what you want, then you'd create a click handler for the single MovieClip and use the _xmouse and _ymouse properties to get the local coordinates of the hit (assuming AS2).