header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
osama
Points:0
Posts:0

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



1
Friend
Points: 710
Posts:0
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.

2
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>

3
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>


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 0+2 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions