As far as masking all the layers goes, you can simply draw a mask the exact same dimensions of the stage, place it as the top layer, turn it into a mask, which will mask only the one layer below it, then drag all other layers up one so they are also masked.
Now, I am not sure if resizing the swf will cause a problem. I sort of think it will, however. If it does, you might try to set the mask up dynamically in an ENTER_FRAME event, which sets its dimensions to that of the stage. This way, if the size of the stage or swf is altered, the mask reacts accordingly.