Stage.align doubt

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

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)… :frowning:

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

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!

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

would have some effect. fool

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…

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! :smiley: