MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 566

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
*/
my_FLVPlybk.load("http://www.helpexamples.com/flash/video/cuepoints.flv");
var listenerObject:Object = new Object();
listenerObject.ready = function(eventObject:Object) {
if (eventObject.target.contentPath == "http://www.helpexamples.com/
flash/video/cuepoints.flv") {
//this fires after the first flv is ready
my_FLVPlybk.activeVideoPlayerIndex = 1;
my_FLVPlybk.load("http://www.helpexamples.com/flash/video/
plane_cuepoints.flv");
} else {
//this fires after the second flv is ready
eventObject.target.activeVideoPlayerIndex = 0;
eventObject.target.play();
eventObject.target.activeVideoPlayerIndex = 1;
eventObject.target.play();
var layerOnTop:MovieClip = eventObject.target.getVideoPlayer(1);
layerOnTop._alpha = 75;
layerOnTop._visible = true;
}
}
my_FLVPlybk.addEventListener("ready", listenerObject);
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object) {
//based upon the cue name, bring one or the other to the front
if (eventObject.info.name == "point1") {
trace(eventObject.info.name + " : 0 to front");
eventObject.target.bringVideoPlayerToFront(1);
} else if (eventObject.info.name == "point2") {
trace(eventObject.info.name + " : 1 to front");
eventObject.target.bringVideoPlayerToFront(0);
}else if (eventObject.info.name == "point3") {
trace(eventObject.info.name + " : 0 to front");
eventObject.target.bringVideoPlayerToFront(1);
}
}
my_FLVPlybk.addEventListener("cuePoint", listenerObject);
564
FLVPlayback Component (Flash Professional Only)

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents