Skip to main content
Known Participant
April 22, 2008
Question

Where do I go from here - FLV component cuepoints

  • April 22, 2008
  • 1 reply
  • 276 views
Hello,
I am still having trouble with cue points. I don't know what I'm supposed to put in the component inspector area...I just have four cuepoints named slide2a, slide2b, slide2c, and slide2d. I have corresponding movieclips with the same instance names. I want the movieclips to play when the video reaches a certain time. Pleaaaase help???

Here is what I have so far....


//
/**
FLV variables
*/
import mx.video.*;
my_FLVPlybk.playPauseButton = my_plypausbttn;
my_FLVPlybk.forwardButton = nextbtn;
my_FLVPlybk.backButton = backbtn;
// listeners for the play/pause, next, and back buttons
//
var listenerObject:Object = new Object();
listenerObject.stateChange = function(eventObject:Object) {
if (my_FLVPlybk.paused)
(mcs[currentSlide]).stop();
};
my_FLVPlybk.addEventListener("stateChange", listenerObject);
//
// listener for next button pressed
//
var listenerObject:Object = new Object();
listenerObject.slideNext = function(eventObject:Object) {
if (nextbtn.press)
(mcs[nextSlide]).gotoAndPlay(2);
};
my_FLVPlybk.addEventListener("slideNext", listenerObject);
//
// listener for back button pressed
//
var listenerObject:Object = new Object();
listenerObject.slideBack = function(eventObject:Object) {
if (backbtn.press)
(mcs[previousSlide]).gotoAndPlay(2);
};
my_FLVPlybk.addEventListener("slideBack", listenerObject);
//
//movieclip array and cue point created
//
var mcs:Array = new Array(slide2a, slide2b, slide2c, slide2d);
var currentSlide:Number = 0;
var listener:Object = new Object();
listener.cuePoint = function(evt:Object):Void {
trace(mcs[currentSlide]);
currentSlide++;
}
videoPlayer.addEventListener("cuePoint", listener);
stop();

Thanks for any help!!
This topic has been closed for replies.

1 reply

eapreAuthor
Known Participant
April 22, 2008
Oh, I forgot to mention, I have a stop action on the movieclip's first frame, and the second frame has a play action, that's why I have:

if (backbtn.press)
(mcs[previousSlide]).gotoAndPlay(2);


...and the movieclips are all sitting on a different layer on the same frame and timeline as the actionscript.