Multiple Images on Card

Geoff Canyon gcanyon at
Tue May 21 15:29:26 EDT 2013

On Tue, May 21, 2013 at 8:39 AM, Graham Pearson <gspearson at> wrote:

> when a user hovers over a section of the
> picture, it would change colors and upon clicking a section of the
> picture it would display a new card with detailed information of the
> section of the image selected.

I think you don't need to slice your image to accomplish this. Instead:

1. import the whole image and position as you want
2. create a graphic control. make it a rect, the size you want, with a
color and blendlevel that get you the effect you want when it is positioned
over the image. For example, set it to 255,0,0 and 50 to have it colorize
the image pretty strongly red when the graphic is over it.
3. set the script of the image to something like this:

on mouseMove x,y
   set the topleft of grc 1 to (100 * (x div 100)),(100 * (y div 100))
end mouseMove

The above assumes that the highlight graphic is 100x100 pixels.

Then do whatever math you have to when the user clicks to identify what
section to show info on -- you could store the current section in the
section above, or do it on the fly.

More information about the use-livecode mailing list