# Resizing In Full Screen

**URL:** <https://forum.kirupa.com/t/resizing-in-full-screen/186085>\
**Category:** Uncategorized\
**Created:** [April 18, 2006, 10:55pm UTC](https://forum.kirupa.com/t/resizing-in-full-screen/186085 "2006-04-18T22:55:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![drexp2000](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@drexp2000](https://forum.kirupa.com/u/drexp2000)\
**Post date:** [April 18, 2006, 10:55pm UTC](https://forum.kirupa.com/t/resizing-in-full-screen/186085/1 "2006-04-18T22:55:41Z")

</div>

[http://www.h2.com.tw/eng/indexpc.htm](http://www.h2.com.tw/eng/indexpc.htm)

In that website, how do they keep some of the movieclip items locked on the edge of the screen? When you resize your screen, the items on the edges are the ones that moves correspondingly. And the fillers are near the middle part. How cool! BUT HOW?

Thanks.

Andre

---

<div class="post-metadata">

**Author:** ![Breen](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@Breen](https://forum.kirupa.com/u/Breen)\
**Post date:** [April 19, 2006, 10:58am UTC](https://forum.kirupa.com/t/resizing-in-full-screen/186085/2 "2006-04-19T10:58:47Z")

</div>

Since Flash 8 (and 7, not sure) you have a Stage object, to which you can add listeners that respond to the onResize event. That way you can react to stage resize events in any way you like.

Should you be using an older version you can use the event in javascript which responds to a window resize (which is about the same) to call a flash function to react in the same manner.

---

<div class="post-metadata">

**Author:** ![drexp2000](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@drexp2000](https://forum.kirupa.com/u/drexp2000)\
**Post date:** [April 19, 2006, 2:53pm UTC](https://forum.kirupa.com/t/resizing-in-full-screen/186085/3 "2006-04-19T14:53:40Z")

</div>

> [@Breen](#):
>
> Since Flash 8 (and 7, not sure) you have a Stage object, to which you can add listeners that respond to the onResize event. That way you can react to stage resize events in any way you like.
> 
> Should you be using an older version you can use the event in javascript which responds to a window resize (which is about the same) to call a flash function to react in the same manner.

Thank you for your reply, could you or anyone give a quick actionscript write up on this? :goatee:  
Thanks.

---

<div class="post-metadata">

**Author:** ![Neolumi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neolumi/32/1306_2.png) [@Neolumi](https://forum.kirupa.com/u/Neolumi)\
**Post date:** [April 19, 2006, 3:53pm UTC](https://forum.kirupa.com/t/resizing-in-full-screen/186085/4 "2006-04-19T15:53:54Z")

</div>

Hey, basically what you want to do is make use of the stage height/width property. For example I have a gradient background that changes size according to stage size:

---

<div class="post-metadata">

**Author:** ![Neolumi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neolumi/32/1306_2.png) [@Neolumi](https://forum.kirupa.com/u/Neolumi)\
**Post date:** [April 19, 2006, 3:55pm UTC](https://forum.kirupa.com/t/resizing-in-full-screen/186085/5 "2006-04-19T15:55:10Z")

</div>

Hey, basically what you want to do is make use of the stage height/width property. For example I have a gradient background that changes size according to stage size:

onClipEvent (enterFrame) {  
this.\_width = Stage.height;  
this.\_height = Stage.height;  
}

---

<div class="post-metadata">

**Author:** ![drexp2000](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@drexp2000](https://forum.kirupa.com/u/drexp2000)\
**Post date:** [April 19, 2006, 4:53pm UTC](https://forum.kirupa.com/t/resizing-in-full-screen/186085/6 "2006-04-19T16:53:40Z")

</div>

> [@Neolumi](#):
>
> Hey, basically what you want to do is make use of the stage height/width property. For example I have a gradient background that changes size according to stage size:
> 
> onClipEvent (enterFrame) {  
> this.\_width = Stage.height;  
> this.\_height = Stage.height;  
> }

Thanks for the reply, this is being discussed as well in the actionscript forum: [kirupaForum](http://www.kirupa.com/forum/showthread.php?t=216488)

So my code would be something like this:

this.\_x = Stage.width;  
this.\_y = Stage.height;

But wouldn’t that only align it to one corner? How about the other corner?

---

<div class="post-metadata">

**Author:** ![Neolumi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neolumi/32/1306_2.png) [@Neolumi](https://forum.kirupa.com/u/Neolumi)\
**Post date:** [April 19, 2006, 8:54pm UTC](https://forum.kirupa.com/t/resizing-in-full-screen/186085/7 "2006-04-19T20:54:39Z")

</div>

you want it to be in the enterframe event thing, that way if you resize your browser window it updates.

the location of anything can be controlled by movieclipname.\_x and .\_x, and considering you know the size of your stage you can position anything where you like. If you wanted something at the bottom left of the screen the movieclip actionscript would be:

onClipEvent (enterFrame) {  
this.\_x = 0;  
this.\_y = (Stage.height - this.\_height);  
}
