Media.preferredwidth - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Usage
myMedia.preferredHeight
Description
Property; set according to a FLV file's default height value. This property applies only to FLV
media, because the height is fixed for MP3 files. This property can be used to set the height
and width properties (plus some margin for the component itself ). The default value is
if no FLV media is set.
undefined
Example
The following example sizes a MediaPlayback instance according to the media it is playing
and accounts for the pixel margin needed for the component instance:
if (myPlayback.contentPath != undefined) {
var mediaHeight:Number = myPlayback.preferredHeight;
var mediaWidth:Number = myPlayback.preferredWidth;
myPlayback.setSize((mediaWidth + 20), (mediaHeight + 70));
}

Media.preferredWidth

Applies to
MediaDisplay, MediaPlayback.
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
myMedia.preferredWidth
Description
Property; set according to a FLV file's default width value. The default value is
Example
The following example sets the desired width of the variable
var mediaWidth:Number = myMedia.preferredWidth;
874
Media components (Flash Professional only)
undefined
:
mediaWidth
.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents