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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I scale my movie right

Status
Not open for further replies.

Sahi

Programmer
Jan 2, 2002
13
0
0
NL
I'm creating a Flash-demo. The demo is working fine. Now I'm publishing it in HTML. Now I want my movie to scale nicely no matter what resolution view it in. I am currently using WIDTH=100% and HEIGTH=100%, but I would like height to be 100% and width to scale depending on height. Because if I make width 100% my movie gets a sort of sidebars in the color of the movie-background. I would like these to disappear. Can anyone help me?
 
Dependnig on your target browser(s) you can write in a dynamic height / width for the Flash movie based on the current browser width in javascript.

Something like:

theWidth = screen.wdith;
theHeight = screen.height;
myHeight = (do any math you need to);
myWidth = (do any math you need for the width);

document.write('<embed src=&quot;mymovie.swf&quot; width=' + myWidth + ' height=' + myHeight +'>');

I forget the correct syntax for IE and Netscape, because I'm rusty with javascript, bu I did something like that a few years ago and it worked great.

HTH.
-vedder
-- like what you see? I need a job =)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top