Page 1 of 1

assign an event to hide layers

Posted: 07 Nov 2012, 21:59
by MarkyBoy
I have a number of initially hidden objects on layer2, at various points these objects become visible depending on user input... So, my question is; it it possible to assign an event to hide all objects on layer2 in one go... I have tried a script hiding each object one at a time but this is very laborious and as there are about 30 items the script becomes very large, if I can hide all objects in layer2 with a single line script, that would be ideal.
Any suggestions welcomed!

assign an event to hide layers

Posted: 07 Nov 2012, 22:17
by MarkyBoy
Or... It could be a command to reset all items in a layer? Is there something that could do that?

assign an event to hide layers

Posted: 08 Nov 2012, 02:29
by Matthias Guenther (Quark)
Hi Mark,
layers won't work. Have you tried groups?
Thanks
Matthias

assign an event to hide layers

Posted: 08 Nov 2012, 03:14
by MarkyBoy
Hi Matthias... Ah yes, that would work because you can assign visibility of an object on it's own and then if it is grouped you can show/hide the whole group... Now, why didn't I think of that! :-) Thank you!

assign an event to hide layers

Posted: 08 Nov 2012, 03:49
by MarkyBoy
Hi Matthias, that doesn't seem to work... I have grouped images 1, 2 and 3 and then when you click on a thumbnail for image 1 I have the event set on click down to hide the group and on click up to show image 1, but nothing happens. I have both image 1 and the group set to initially hidden, do I need to have a script instead to hide the group and then add a delay or something?... Confused, because this should work!

assign an event to hide layers

Posted: 08 Nov 2012, 04:18
by Matthias Guenther (Quark)
Hi Mark,
I just tried it myself and it worked for me.
Are you using another event to trigger the show? A hidden object of coruse cannot trigger anything.
And are you showing objects that are within the group individually or just the whoel group together?
Thanks
Matthias

assign an event to hide layers

Posted: 08 Nov 2012, 04:24
by MarkyBoy
Hi Matthias,
Thank you... I am showing objects within the group individually.
what I'd like to achieve is when you click the thumbnail for image1, then a large image1 is shown... When you click the thumbnail for image2 then image1 disappears and a large image2 is shown.... I could do a hide image1 event on thumbnail image2 but I have about 30 images, so I have grouped all the large images and set an event to hide the group on the click down of each thubnail and then on the click up to display the relevant large image, but it seems once the group is hidden once then individual objects do not want to re-appear..?
Thanks
Mark