Create a MC called “stage_mask” and make sure the registration point is in the center. Inside the stage_mask MC draw a square (any width/height) with any stroke/fill color.
Right-click the stage_mask MC in the library and select “Linkage…”. In the linkage dialogue make sure that “Export for ActionScript” is checked (it will automatically check “Export in First Frame”) and set “stage_maskMC” as the linkage identifier.
Now, go to the first frame of your movie and insert a layer called “Actions”. Insert the following code:
The only thing left to do is take your desired display area (namely your movie’s width and height) and set the x/y of the mask to that width/height. You COULD do something like:
_width = Stage.width;
_height = Stage.height;
But as soon as someone resizes your movie, your stage dimensions are going to change and then they’d be able to see things outside of the artboard – negating any good this script would’ve done.
Another thing to check out is the fscommand allowscale. It’ll keep your SWFs from being automatically resized:
// first frame of your movie
fscommand("allowscale", false);
There are many more fscommands, too. It all depends on what you need to accomplish.
While i’m on the subject, how come the HTML resizing doesn’t work with firefox?? It’s fine in IE, but in FireFox It shows the animation smaller (rather than bigger)