Making an object permeable for events?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Making an object permeable for events?
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
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
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Making an object permeable for events?
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
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
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 9729
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Making an object permeable for events?
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
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?
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.
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Making an object permeable for events?
Hi Ken,
If i understand what you want the stack in attachment maeby help you.
Best regards
Jean-Marc
If i understand what you want the stack in attachment maeby help you.
Best regards
Jean-Marc
- Attachments
-
- getUnderlyingObject.livecode.zip
- (1.42 KiB) Downloaded 212 times
https://alternatic.ch
Re: Making an object permeable for events?
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
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