-
clones
hi im using clones for layers
like layer.clone()
is there a way i can hide/delete all clones at once?
and if not is there a way i can stop it fro m error reporting if the clone dosent exist(i need to hide all my clones but not all of them will be shoing anyway)
-
KoolMoves Moderator
make your clones as an Array that way you can loop through the array to change all the clones.
-
Originally posted by blanius
make your clones as an Array that way you can loop through the array to change all the clones.
sorry to sound dum but i dont understand how u mean
-
KoolMoves Moderator
myclones new Array()
for (idx=0;idx<10;idx++){
myclones[idx]=element("layertoclone").clone();
}
you now have 10 clones of the layer and can refer to them as
myclones[0]
myclones[1]
myclones[2]
...etc....
So you can now set/assign/change the properties of all the clones in a simple loop. For example to hide them all
for (idx=0;idx=myclones.length;idx++){
myclones[idx].hide()
}
see the help regarding for loops and arrays and you should get the idea. See the Clone example as I believe it uses an array just as above so that it can check if any of the clones are out of bounds by looping through them.
-
im surrounded by genius, thanks dude
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|