Parent group

Devin Asay devin_asay at byu.edu
Thu Jun 17 09:43:49 EDT 2010


On Jun 17, 2010, at 7:22 AM, Simon Lord wrote:

> In flash there was the notion of asking for the name of _parent to get
> the ID or name of the container movieClip.  I have a scenario where I
> would like to poll a button within a group to tell me which group it's
> in.
> 
> The long way would be to get the long name of target, filter it for a
> string, get the first name in quotes to the right of it etc etc.
> 
> But I'm hoping there is something quicker.
> 
> Ex:
> 
> on mouseDown
>  put the short name of parent
> end mouseDown

Hi Simon,

We have a tool to do that; it's just a difference in terminology:

put the owner of <object>

This will return the name of the group if it's a grouped control, or the name of the card if it's not a grouped control.

HTH


Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list