Page 1 of 1

Cloning Groups / Images

Posted: Sat Jan 22, 2011 4:34 am
by cruddydan
I have 2 cards in my stack: "Main" and "Images". I have put some groups, which contain images, onto the "Images" card. From script, I want to copy those groups onto the "Main" card. I am able to Clone the groups successfully, but the clones show up on the "Images" card. How do I get the cloned groups to the "Main" card?

Re: Cloning Groups / Images

Posted: Sat Jan 22, 2011 9:11 am
by kray
cruddydan wrote:I have 2 cards in my stack: "Main" and "Images". I have put some groups, which contain images, onto the "Images" card. From script, I want to copy those groups onto the "Main" card. I am able to Clone the groups successfully, but the clones show up on the "Images" card. How do I get the cloned groups to the "Main" card?
The following assuues you have a group with images on the "Images" card named "myGroup":

Code: Select all

copy group "myGroup" of card "Images" to card "Main"

Re: Cloning Groups / Images

Posted: Sun Jan 23, 2011 8:34 am
by cruddydan
That worked fine, kray, except that the new group "MyGroup" on card "Main" does not respond to any mouse or touch events. I can see new group, but my mouseDown script (which is in the stack) doesn't execute when I click on the new group. I know the mouseDown script works because it fires when I click a button on "Main".

Do groups not respond to "clicks"? Is there some property to make the group "clickable"?

Re: Cloning Groups / Images

Posted: Sun Jan 23, 2011 3:39 pm
by kray
Groups do not respond to mouse events unless you are clicking on some other object inside the group (in which case the target object will get the event and if it is not handled by the target object then the group gets a shot at it).

The way to fake it is to make a transparent button inside the group that is the same size as the group (minus any margins), with no script of its own so the group will get the event.