If your clips were numbered named (mc1, mc2, mc3, etc...), you could easily go through a for loop to make them all (or only some) invisible and/or visible again.
If it's just as a starting point, they can all be made invisible to start with, by adding the following on their first frame's...
Thanks for the answer. The clips all have meaningfull names and for maintenance reasons these names will have to stay.
At all costs I want to avoid having code inside clips. Again for maintenance reasons. This is company policy as on the next release this job will be someone elses responsibility and all code must be easy to find as well as fully documented.
All primary clips lie on the root although some clips have secondary and tertiary clips nested.
Essentially I require a button which when clicked will make all clips currently on stage invisible. Sort of like a refresh button on a game.
Turning them back on depending on user interaction is a part I dont have to worry about as existing code will take care of that.
for(item in _root)
if(typeof _root[item] == "movieclip"
_root[item]._visible = false;
try and see if thats all you need
if not then you will need some more loops
for(items in _root.mcname)
if(typeof _root[items] == "movieclip"
_root.mcname[items]._visible = false;
all code i guess could go inside a series of nested loops....if an item is a movieclip start a new loop for that clip and so on ....probably only worth doing if the number of clips is large
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.