5/21/2010 6:05:16 PM
Title:
stageScaleMode
in my project i use fullscreen mode, i want my stage dimensions to be fixed whether user's screen is 1024 x 768 or other.
for example:
my dimension is 800 x 600, and the user use 1024 x 768 , what is the code could i use to make my stage dimension fixed and be at the center of screen
5/21/2010 9:05:32 PM
you can set the property to No_SCALE ,this will make your flex swf never scale and stay at a fixedsize.
stage.scaleMode= StageScaleMode.NO_SCALE;
To keep you flash movie in the center you can use javascript, in javascript you have to put the swf movie inside a div layer and then. position it according to the size of browser.
i.e
browserwidth= 1024
yourmovie= 800
your x position for div containing swf would be
myswfDiv=(1024-800)/2;
This will position your movie to center.
Rayan
Points: 700
Posts:0
5/22/2010 8:21:31 AM
use div with align center attribute to align flash movie to center
<div align="center" width="100%">
//flash html here
</div>
Tyson
Points: 680
Posts:0
5/22/2010 8:25:11 AM
you can use center tag in html to align your movie to center of html page
<HTML>
<HEAD>
<TITLE>test</TITLE>
</HEAD>
<center>
<BODY>
<!-- place your embed and object tag of swf movie in the body-->
</BODY>
</center>
</HTML>