# Stage.align doubt

**URL:** https://forum.kirupa.com/t/stage-align-doubt/259821
**Category:** flash
**Created:** [May 8, 2008, 11:30pm UTC](https://forum.kirupa.com/t/stage-align-doubt/259821 "2008-05-08T23:30:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Loyx](https://avatars.discourse-cdn.com/v4/letter/l/e274bd/32.png) [@Loyx](https://forum.kirupa.com/u/Loyx)
#### Post date: [May 8, 2008, 11:30pm UTC](https://forum.kirupa.com/t/stage-align-doubt/259821/1 "2008-05-08T23:30:16Z")

</div>

Hi folks, I’m working in a xml videogallery and I’m using a video component… The problem is that when I go fullscreen the video object loads in the top-left corner of the stage (is a 800x600 movie) tough I publish my movie with 100% x 100% dimensions.

So, I tried to add: **Stage.align=“TL”;** to the function that triggers the fullscreen

```auto
var myListener:Object = new Object();
myListener.onClick = function(eventObject:Object) {
    flvPlayer.toggleSize();
    Stage.align="TL";
};
flvPlayer.addEventListener("onClick",myListener);

```

As you can see after the first fullscreen the stage remains in the Top Left corner. Is there any way to make the stage return to the center? I need to do it when I return from fullscreen to normal mode… or… what can I do? any idea?

I tried to put the gallery inside a MC and center it but still fails cos the video object loads in the registration point of the MC (like in the first example I’ve provided)… ☹

---

<div class="post-metadata">

### Author: ![vamsig](https://avatars.discourse-cdn.com/v4/letter/v/e47774/32.png) [@vamsig](https://forum.kirupa.com/u/vamsig)
#### Post date: [May 9, 2008, 5:07am UTC](https://forum.kirupa.com/t/stage-align-doubt/259821/2 "2008-05-09T05:07:34Z")

</div>

Hi,

You need to make all changes in one by one… That is if you are in full screen you need to write video x and y axis as “0”. And when you return back you have to mansion those settings as it is…

Thanks,  
Vamsi.G

---

<div class="post-metadata">

### Author: ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)
#### Post date: [May 9, 2008, 8:21am UTC](https://forum.kirupa.com/t/stage-align-doubt/259821/3 "2008-05-09T08:21:46Z")

</div>

hmm, i looked into this,  
are you sure you viewing the SWF file, and not the HTML file?  
align only works if you veiwing the SWF file int he browser!

---

<div class="post-metadata">

### Author: ![brndn](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@brndn](https://forum.kirupa.com/u/brndn)
#### Post date: [May 9, 2008, 9:31am UTC](https://forum.kirupa.com/t/stage-align-doubt/259821/4 "2008-05-09T09:31:33Z")

</div>

Stage.scaleMode = “Scale”;  
fscommand(“fullscreen”, true);

would have some effect. fool

---

<div class="post-metadata">

### Author: ![Loyx](https://avatars.discourse-cdn.com/v4/letter/l/e274bd/32.png) [@Loyx](https://forum.kirupa.com/u/Loyx)
#### Post date: [May 9, 2008, 4:10pm UTC](https://forum.kirupa.com/t/stage-align-doubt/259821/5 "2008-05-09T16:10:35Z")

</div>

**_Solved_**

When I tried the first option (put all the player inside a MC) the “registration point” wasn’t properly positioned… Now I’ve put the **Stage.align=“TL”** fixed and I’m repositioning the video holder depending on the value (even or odd) of one variable. It works like a charm…

```auto
var value:Number = 0;

var myListener:Object = new Object();
myListener.onClick = function(eventObject:Object) {	
	++value;
	if (value%2 == 0) {
		_root.videoHolder._x = (Stage.width/2)-(_.root.videoHolder.width/2);
		_root.videoHolder._y = (Stage.height/2)-(_.root.videoHolder.width/2);
		flvPlayer.toggleSize();
	} else{
		_root.videoHolder._x = 0;
		_root.videoHolder._y = 0;
		flvPlayer.toggleSize();
		}
};
flvPlayer.addEventListener("onClick",myListener);

```

Thanx for all the responses guys! 😃
