# Stuff outside the stage when resizing

**URL:** <https://forum.kirupa.com/t/stuff-outside-the-stage-when-resizing/57677>\
**Category:** flash\
**Created:** [July 15, 2004, 8:30am UTC](https://forum.kirupa.com/t/stuff-outside-the-stage-when-resizing/57677 "2004-07-15T08:30:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucasc](https://avatars.discourse-cdn.com/v4/letter/l/6a8cbe/32.png) [@lucasc](https://forum.kirupa.com/u/lucasc)\
**Post date:** [July 15, 2004, 8:30am UTC](https://forum.kirupa.com/t/stuff-outside-the-stage-when-resizing/57677/1 "2004-07-15T08:30:09Z")

</div>

Hey guys,

When setting the HTML publish settings to percent, why does the published page show stuff that is outside the stage (but in the work area)???

Is there any way to publish the animation showing only the stuff on the stage and not anything outside it??

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 15, 2004, 11:37am UTC](https://forum.kirupa.com/t/stuff-outside-the-stage-when-resizing/57677/2 "2004-07-15T11:37:02Z")

</div>

Your width and height don’t atake up the whole page

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 15, 2004, 12:37pm UTC](https://forum.kirupa.com/t/stuff-outside-the-stage-when-resizing/57677/3 "2004-07-15T12:37:59Z")

</div>

Yes, do this:

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:

```auto

_root.attachMovie("stage_maskMC", "maskMC", 1);
with (_root.maskMC) {
          _width = [movie width];
          _height= [movie height];
          _x = Stage.width / 2;
          _y = Stage.height / 2;
}
_root.setMask("maskMC");

```

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:

```auto

_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:

```auto

// first frame of your movie
fscommand("allowscale", false);

```

There are many more fscommands, too. It all depends on what you need to accomplish.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 15, 2004, 12:38pm UTC](https://forum.kirupa.com/t/stuff-outside-the-stage-when-resizing/57677/4 "2004-07-15T12:38:21Z")

</div>

How i do it is make a mask to show what you want but if there is another way to do it (a better way) please tell.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2004, 12:02am UTC](https://forum.kirupa.com/t/stuff-outside-the-stage-when-resizing/57677/5 "2004-07-16T00:02:03Z")

</div>

wow, thanks a lot newhopekenny, that was perfect.

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)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2004, 4:09am UTC](https://forum.kirupa.com/t/stuff-outside-the-stage-when-resizing/57677/6 "2004-07-16T04:09:05Z")

</div>

isn’t one of the publish settings “exact fit”, why wouldn’t you just use that?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2004, 1:23pm UTC](https://forum.kirupa.com/t/stuff-outside-the-stage-when-resizing/57677/7 "2004-07-16T13:23:44Z")

</div>

D’fferent strokes, d’fferent folks I guess – but that is a really good question.

If you’re just placing your SWF inside of a web page, I’d strongly suggest using pixel width/height for accuracy and cross-browser stability.
