Ralph DiMola wrote:

> How would you use the alpha channel to do this? I just had an image
> and the transparent part of the image did not send a mouseup message.
> I put a button behind the image to solve it. Was there a way I could
> have used the alpha channel to get the mouseup message anywhere in
> the image and still retain the transparency?

An image which appears to the user to have empty regions will have those regions treated as empty by LC's default hit testing. If doing your own hit testing you can adjust the threshold passed to the intersect function, but that's a lot of work compared to just using the best object for the job at hand:

If you need a rectangular clickable area with an image inside it, what you have is a button - you can set the icon of a button to the image you want displayed in it.

It's still two objects, but lets you store the image object in a separate stack where you can keep all of your image assets together, rather than adding an extra object to the UI stack.

Extra bonus points: FWIW when I last tested this (though it's been quite some time ago) buttons rendered much faster than images.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to