MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 644

Components language reference
Table of Contents

Advertisement

Drag an FLVPlayback component to the Stage, and give it an instance name of
my_FLVPlybk. Then add the following code to the Actions panel on Frame 1 of the
Timeline:
/**
Requires:
- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
*/
import mx.video.*;
// turn off autoSize and maintainAspectRatio
my_FLVPlybk.autoSize = false;
my_FLVPlybk.maintainAspectRatio = false;
// play this FLV
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/
clouds.flv";
// add a cue point
my_FLVPlybk.addASCuePoint(3, "switch_here");
var listenerObject:Object = new Object();// create listener
listenerObject.cuePoint = function(eventObject:Object):Void {
// add a second video player
my_FLVPlybk.activeVideoPlayerIndex = 1;
// play this FLV
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/
water.flv";
// change size of this video player
my_FLVPlybk.setSize(240, 180);
my_FLVPlybk.visibleVideoPlayerIndex = 1; // make it visible
my_FLVPlybk.play(); // play VLV
};
// add listener for cuePoint event
my_FLVPlybk.addEventListener("cuePoint", listenerObject);
listenerObject.resize = function(eventObject:Object):Void {
// display location and dimensions
trace("Video player is #" + my_FLVPlybk.activeVideoPlayerIndex);
trace("X coordinate is: " + eventObject.x);
trace("Y coordinate is: " + eventObject.y);
trace("Width is: " + eventObject.width);
trace("Height is: " + eventObject.height);
};
// add listener for resize event
my_FLVPlybk.addEventListener("resize", listenerObject);
See also
FLVPlayback.activeVideoPlayerIndex
FLVPlayback.maintainAspectRatio
FLVPlayback.preferredWidth
FLVPlayback.width
642
FLVPlayback Component (Flash Professional Only)
,
FLVPlayback.preferredHeight
,
FLVPlayback.setSize()
,
,
FLVPlayback.x
FLVPlayback.y
,
FLVPlayback.autoSize
,
FLVPlayback.state
,
FLVPlayback.height
,
,
,

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?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents