Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java, screenWidth=screen.availWidth but my swf movie is not in proport

Status
Not open for further replies.

mjay1

Technical User
Sep 25, 2004
2
GB
I am imbedding a swf movie file in dreamweaver and when it opens it is in proportion but if you drag the browser window to a larger size the movie dose not stay in proportion.


screenWidth=screen.availWidth;
screenHeight=screen.availHeight;

if (screenWidth<=780) w=screenWidth-10;
else w=780;

h=w*7/10;

x=(screenWidth-w-10)/2;
y=(screenHeight-h-40)/2;

if (x<0) x=0;
if (y<0) y=0;

Dose anyone have any idears, im pulling my hair out so any help would be much apreceated.
 
Rather than go through all that trouble set your swf to be 100% for with and height. Then make sure that you have no Param for the "SCALE" setting in your embed tags (or in Dreamweaver make sure you have selected "default" in the Scale settings in the Properties for the flash movie.

It will then size proportionally when the window size is changed.

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top