Transparent, clickable graphics

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AlexAdams
Posts: 38
Joined: Sat Jan 17, 2009 8:49 pm
Contact:

Transparent, clickable graphics

Post by AlexAdams » Thu Feb 19, 2009 9:53 pm

I need to create graphics (polygons, rectangles, ovals, etc) that are transparent, but can register mouse events anywhere in their area (the area that would be filled, if there was a fill).

My experience is that when the opaque property is set to true the graphic is selectable this way, but it has a fill color and when the opaque property is set to false, the graphic is only selectable on its lines.

How do I get around that?

What am I missing? It seems like a simple feature to expect, but I don't see it.

Currently I am using this to provide clickable hot spots over large images, but will want to use it on cards with only graphics as well.

Thanks in advance,

Alex
Alex Adams
(a)2 Technology Parnters
alex@a2technology.com
www.a2technology.com
www.promisstudio.com
831-726-8013

AlexAdams
Posts: 38
Joined: Sat Jan 17, 2009 8:49 pm
Contact:

Post by AlexAdams » Thu Feb 19, 2009 10:37 pm

I got it. blendLevel
Alex Adams
(a)2 Technology Parnters
alex@a2technology.com
www.a2technology.com
www.promisstudio.com
831-726-8013

mroam
Posts: 11
Joined: Tue Nov 27, 2007 8:11 pm
Contact:

Transparent, clickable graphics

Post by mroam » Thu Feb 19, 2009 10:51 pm

Hmm... I've just tried opaque graphics and buttons with high blendlevel (99/100, use inspector) and they are clickable within their interior, while looking very see-through. Only problem is that their border is transparent also: I guess you could group them with a non-opaque polygon that provides the look of the outline.

edljr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 56
Joined: Sun Oct 26, 2008 6:47 am
Contact:

Re: Transparent, clickable graphics

Post by edljr » Sat Mar 14, 2009 6:00 pm

mroam wrote:Hmm... I've just tried opaque graphics and buttons with high blendlevel (99/100, use inspector) and they are clickable within their interior, while looking very see-through. Only problem is that their border is transparent also: I guess you could group them with a non-opaque polygon that provides the look of the outline.
I drag an "image area" object from the toolbar onto my card. In the properties, you can deselect "show border." This gives you a clear (completely invisible) img that can capture mouseDown, mouseUp, mouseEnter, mouseLeave, etc.

Post Reply