1. Home
  2. Computing & Technology
  3. Animation

Flash Tip: Expand Your Flash Movie to Fit Any Browser

By Adrien-Luc Sanders, About.com

2 of 2

Details II

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.

Explore Animation
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Flash Tip: Expand Your Flash Movie to Fit Any Browser

©2009 About.com, a part of The New York Times Company.

All rights reserved.