Hide everything on a layer?

Is there a AS code to hide everything on a layer?
I tried masking but when I go to a section where its not masked the MC’s reset to normal.

Thanks,
Limitlis