Troubles with groups..

jbv jbv.silences at Club-Internet.fr
Wed Nov 19 14:51:11 EST 2003



Stephen,

You could use "the ID of target" to know the ID of the object
being clicked, and then search through a list to know which
group the target belongs to (this can be done easy & fast with
lineoffset for instance)...

You could also change slightly the name of your objects :
for instance : "Front-1" and "Image-1" for group 1, etc.
Then, when trapping the name of the clicked object, it's
quite simple to know which group it belongs to...

Hope that helps,
JB


> Hi All,
>
> I'm sure this is really simple (and has probably been answered many times
> before - and apologies if it has), but a review of the dox doesn't seem to
> help, nor could I find what I was looking for in the archives.
>
> I have a number of groups on a card each of which has a field and and image
> over it (same size). Each group is uniquely named ("group1", group2...) but
> the field and image are the same for each (ie Field "Front" and Image
> "Back").
>
> My problem is with messages.. when the group is clicked, I want to send a
> message to the card giving the group name.
> What seems to happen though is that either the field or image (whichever is
> visible) receives the click, not the group. I then tried putting pass
> MouseUp  into the field and image script - this certainly gives the message
> to the group script, but when the handler in the card is called, the target
> is still the Field or Image not the group.
>
> I need the group name passed up so I know what group the card handler has to
> act on (basically reveal or hide and check the data in the field of the
> specific group), or to be able to mouseUp on the group not image or field
> that comprise the group. Ideally, I would like the same script in each group
> rather than have to put the group name specifically in the group script
>
> Another thought - is the layer number of the group and its object important?
> At the moment layer number of the group is lower than its objects.
>
> Hope this is clear and any help would be appreciated.
>
> Cheers
> Steve
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list