best way to define clickable areas with irregular shapes ?
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Fri May 25 09:45:08 EDT 2007
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.
----------------------------------------------------------------
http://www.sosmartsoftware.com/
eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------
More information about the use-livecode
mailing list