1. About.com
  2. Computing & Technology
  3. Animation

Discuss in my forum

Flash Tip: Expand Your Flash Movie to Fit Any Browser

By , About.com Guide

2 of 2

Details II
Flash Tip: Expand Your Flash Movie to Fit Any Browser
The width and height parameters are usually defined in pixels; without a defining parameter like "px" after it, it defaults to pixels as a unit of measurement and a way to interpret the numeric value.

However, if you add a % sign after the numeric value for the width and height, you can change the interpretation of the value to a percent; the Flash movie will automatically expand to fit a certain percentage of the available window space, regardless of the size of the window--thus removing the fixed size limitation.

To expand to fit the entire window, you can just set both parameters to 100%--though I wouldn't advise it. Because your original movie will have a certain aspect ratio that most likely will not match the aspect ration of the window it's being displayed in, you'd be better off only setting one parameter; most windows are wider than they are tall, so if you want to maximize the size of your Flash movie within the window without distorting it, just set the height to 100% while leaving the width completely blank. Leaving no value in one dimension while setting a value for the other dimension will cause it to automatically expand to fit that single dimension while keeping the aspect ratio as it scales up or down.

©2012 About.com. All rights reserved. 

A part of The New York Times Company.