Newbie question about image/button relationships

Martin Baxter martin at materiaprima.fsnet.co.uk
Mon Nov 22 16:07:32 EST 2004


>Hello all,
>
>This is my first post to the use-revolution mailing list, and I have a
>question about what images/buttons can (or cannot) do.  Our company has
>chosen Revolution to create prototypes of handset applications, so we
>can mock them up and find potential areas of confusion before committing
>to the user interface of the application.  I only have a handful of
>programming knowledge, as my background is in Human-Computer
>Interaction, focusing on UI design and usability; this is also my first
>experience with a "card-based" language.
>
>Now, onto the issue.  I have an image of a mobile phone keypad (in JPG
>format), and I would like for the user to be able to click on specific
>areas, causing changes to occur on the "screen" (which is a field).  Is
>there a way to Revolution to watch for specific areas of the image to be
>pressed (such as the coordinates of a "Send" key, vs. the coordinates of
>an "End" key)?  Keep in mind, this is only one image, not a bunch of
>images.  If this is not possible, do I have to create a group of buttons
>on top of the image that are all set so they are not visible?
>
>Thank you in advance for your help.  I'm happy that a mailing list like
>this exists!
>
>Best regards,
>Jason Silver
>

Hello Jason,

Couldn't restrain myself from posting when I saw this because I did a
mobile phone simulation 10 years ago using HyperCard (the progenitor of
stack/card scripting tools and exemplar of a hypertext application).

That was for a client who was a human factors consultant and mainly related
to working out the interface for SMS text messaging, which was newfangled
at the time. Being boring techy blokes we never imagined for a minute that
the technology would eventually take off as a dating aid;-)

The client told me that the simulation was indeed useful in identifying
problem areas in the interface specification.

I actually wrote it so that complete interface behaviours could be loaded
from a text file. We were thinking there might be lab tests required, and
wanted to be able to easily set up alternate options for comparison. But in
the end that wasn't done.

Was a fun project though, I wish I'd had Revolution to do it in.

Your immediate question has been answered. My application did in fact use
multiple transparent buttons over a single image of a handset. Today, using
Revolution, I think I might do it a bit differently. I might have a single
base image of the handset, and each button would have an "icon" of the
physical control it was over, which seamlessly matched the underlying base
image. It would then be easy to change the icon of each button when it was
clicked (ie hilited) to a separate image that simulated a depressed key or
whatever. You may not have a need for this much prettyness of course.

Each button sent a simple message in response to a mouseup, something like:
on mouseup
  pressedkey "1"
end mouseup
that message was caught by a handler in the stack script which then looked
up the appropriate behaviour. Of course the phone had modes, so the
behaviour depended on the mode it was in and the current status of that
mode.

Well, enough nostalgia already, maybe that gives you some food for thought
though

Martin Baxter




More information about the use-livecode mailing list