best way to define clickable areas with irregular shapes ?

Eric Chatonet eric.chatonet at sosmartsoftware.com
Fri May 25 10:05:04 EDT 2007


Additional tip:

In the modified image (see below), you can replace all hotspots with  
a solid color: the resulting png will be very light.
In such a case, the blend level of the image will be set to 100 but  
can be changed to another well chosen value to show hotspots if needed.

Le 25 mai 07 à 15:45, Eric Chatonet a écrit :

> Hi JB,
>
> As png images with transparency (alpha channel) receive mouse  
> messages only in non transparent areas, here is a way to do the trick:
> Open your original image in PhotoShop or any image editor you use  
> and erase all non hotspots places then save this modified image as  
> a png.
> Hotspots are now very precise :-)
> Put both images onto a card, the modified one on top:
> Now mousedowns, mouseUps, etc. will only bee sent when done in hot  
> spots.
> If you have many hot spots, you can ensure the process by adding  
> rough invisible graphics including each hotspot and test in  
> addition in which graphic the mouse is within.
> Note that you can set the blendlevel of the modified image to 100,  
> it will be invisible but all will go on to work :-)
>
> Le 25 mai 07 à 15:21, jbv a écrit :
>
>>
>> What is the best way to define clickable maps / areas with irregular
>> shapes
>> on a large background image ?
>> I've tried transparent graphics, and also a "mousemove" handler in  
>> the
>> card
>> script, but nothing seems to work really well...
>>
>> thanks,
>> JB
>
> Best regards from Paris,
> Eric Chatonet.

Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
http://www.sosmartsoftware.com/
eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the use-livecode mailing list