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 = myPlayback.preferredHeight;
var mediaWidth = 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 = myMedia.preferredWidth;
Media.progress
Applies to
MediaDisplay, MediaPlayback
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
listenerObject = new Object();
listenerObject.progress = function(eventObject){
// insert your code here
}
myMedia.addEventListener("progress", listenerObject)
532
Chapter 6: Components Dictionary
undefined
:
mediaWidth
.
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?