User Guide

Media components (Flash Professional only) 517
Media.autoSize
Applies to
MediaDisplay, MediaPlayback
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
myMedia.autoSize
Description
Property; a Boolean value that determines the size of the media-viewing portion of the
MediaDisplay or MediaPlayback component.
For the MediaDisplay component, the property behaves as follows:
If you set this property to true, Flash displays the media at its preferred size, regardless of the
size of the component. This implies that, unless the MediaDisplay instance size is the same as
the size of the media, the media will either spill out of the instance boundaries or not fill the
instance.
If you set this property to false, Flash uses the instance size as much as possible, while
honoring the aspect ratio. If both
Media.autoSize and Media.aspectRatio are set to false,
the exact size of the component is used.
For the MediaPlayback component, the property behaves as follows:
If you set this property to true, Flash displays the media at its preferred size unless the media
playback area is smaller than the preferred size. If this is the case, Flash shrinks the media to fit
inside the instance and respect the aspect ratio. If the preferred size is smaller than the media
area of the instance, part of the media area goes unused.
If you set this property to false, Flash uses the instance size as much as possible, while
honoring the aspect ratio. If both
Media.autoSize and Media.aspectRatio are set to false,
the media area of the component is filled. This area is defined as the area above the controls (in
the default layout), minus a surrounding 8-pixel margin that makes up the edges of the
component.
The default value is
true.
Example
The following example indicates that the control is not played back according to its media size:
myMedia.autoSize = false;
See also
Media.aspectRatio