Page 1 of 1
Making an object permeable for events?
Posted: Fri Feb 03, 2012 12:06 pm
by kcorey
Hi All,
I have an image that I'd like to use to highlight the user's last choice. It' an image that just adds a glow.
However if I put it on top, it eats all events so the object behind it isn't getting the event...so when the user clicks on the glowing past choice, nothing happens.
I was told to set a field to transparent for events I set the disabled to true. That was great for the field, but it doesn't seem to work for the image.
Anyone?
-Ken
Re: Making an object permeable for events?
Posted: Fri Feb 03, 2012 2:40 pm
by jmburnod
Hi Ken,
You can store the name of the last chooses object in a local variable or write a function to get the name of the objects behind your image and send the message to this object
Best regards
Jean-Marc
Re: Making an object permeable for events?
Posted: Fri Feb 03, 2012 2:43 pm
by dunbarx
Pass the messages you want to the underlying object:
On mouseup
send "mouseUp" to theUnderlyingObject"
end mouseUp
This was a thread somewhere just a few weeks ago. Making objects transparent does not permit messages to pass through them. There is no "messageTransParent" property.
Craig Newman
Re: Making an object permeable for events?
Posted: Sat Feb 04, 2012 11:57 am
by kevin11
I had a similar problem the other day. I resolved it by putting the objects in a group, and on a click (which is presumably returning your glow image), getting the owner of the glow image, which is the group. And then taking action based on what group had been clicked. Hope this helps.
Re: Making an object permeable for events?
Posted: Sat Feb 04, 2012 12:27 pm
by jmburnod
Hi Ken,
If i understand what you want the stack in attachment maeby help you.
Best regards
Jean-Marc
Re: Making an object permeable for events?
Posted: Mon Feb 06, 2012 8:46 am
by kcorey
Thanks for all your answers!
Actually, someone pointed out that though an image doesn't have a "enabled" checkbox in the IDE, you can still set the property via code:
set the disabled of image "blah" to true
Which accomplishes all that I needed.
-Ken