Page 1 of 1

can a group receive mouse messages

Posted: Sun Jan 04, 2015 6:41 am
by mattmaier
I followed along with a couple lessons on making scrolling groups. I swear to Gosh at one point my experimental group did everything I wanted it to. Specifically, I could click anywhere inside it, drag the mouse, and the group would scroll appropriately. Now the same group won't do that anymore. I have to click on one of the objects inside the group and then I can scroll the group around.

This is the code in my group script. It doesn't mention anything about the script only actually receiving the mouse messages when you click on an object in the group, but they did expand their objects to cover the whole area, so maybe they didn't think of it.
http://lessons.runrev.com/m/4071/l/4442 ... chitecture

This discussion addresses the topic. Their conclusion was that a group simply won't get mouse messages, even if it's opaque. You have to create an object that covers the whole area so that it can receive mouse messages on behalf of the group. Or something like that.
http://comments.gmane.org/gmane.comp.id ... ser/197152

Is that accurate, or is there a way to make the group itself receive mouse messages when I click inside the group, but outside of any of the objects in the group?

Re: can a group receive mouse messages

Posted: Sun Jan 04, 2015 10:25 am
by jmburnod
Hi,
You have to create an object that covers the whole area so that it can receive mouse messages on behalf of the group. Or something like that.
Yes, that is the only way I know to do that.
This LC behavior in this case gives many advantages 8)
Best regards
Jean-Marc

Re: can a group receive mouse messages

Posted: Sun Jan 04, 2015 2:39 pm
by WaltBrown
Jean-Marc,
For what it's worth, I created a group of three fields with lockText true in each field. I put a simple on mouseUp script in the group (not the fields). The group got the message. If the fields were lockText set false it did not get the message.
Walt

Re: can a group receive mouse messages

Posted: Sun Jan 04, 2015 3:39 pm
by jmburnod
Hi Walt
If the fields were lockText set false it did not get the message
Yes. Field unlocked text doesn't receive mouseup