mdschm2
12-05-2008, 07:28 PM
I'm using an FLVPlayback component to load a specific video file (stored locally) after the user pushes a button. The video file that loads will change depending on which button is pressed. I added an event listener to switch back to the movie clip containing all the buttons once the video had stopped playing.
Here's where it get's weird. One of my FLV files works fine. The video plays and then the program recognizes the file is complete and goes to the previous movie clip.
However, it doesn't do this for any of my other files. It will play the video, but it never recognizes the video has completed. I've tried adding Cue Points, changing the Metadata, and nothing works.
Any help would be appreciated! Thanks!! Code for movie clip holding my playback component is below:
import mx.video.*
var file:String = "videos/" + _global.directive + ".flv"
vid.contentPath = file;
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
trace("Movies Complete");
if(ident == rp){
trace("Correctly Identified RP");
vid_stop_rp.onPress();
}
else if(ident == p2){
vid_stop_p2.onPress();
}
else if(ident == p3){
vid_stop_p3.onPress();
}
else if(ident == p4){
vid_stop_p4.onPress();
}
else if(ident == p5){
vid_stop_p5.onPress();
}
else if(ident == p6){
vid_stop_p6.onPress();
}
else if(ident == p7){
vid_stop_p7.onPress();
}
else if(ident == p8){
vid_stop_p8.onPress();
}
else if(ident == p9){
vid_stop_p9.onPress();
}
else if(ident == p10){
vid_stop_p10.onPress();
}
else if(ident == p11){
vid_stop_p11.onPress();
}
else if(ident == p12){
vid_stop_p12.onPress();
}
}
vid.addEventListener("complete", listenerObject);
Here's where it get's weird. One of my FLV files works fine. The video plays and then the program recognizes the file is complete and goes to the previous movie clip.
However, it doesn't do this for any of my other files. It will play the video, but it never recognizes the video has completed. I've tried adding Cue Points, changing the Metadata, and nothing works.
Any help would be appreciated! Thanks!! Code for movie clip holding my playback component is below:
import mx.video.*
var file:String = "videos/" + _global.directive + ".flv"
vid.contentPath = file;
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
trace("Movies Complete");
if(ident == rp){
trace("Correctly Identified RP");
vid_stop_rp.onPress();
}
else if(ident == p2){
vid_stop_p2.onPress();
}
else if(ident == p3){
vid_stop_p3.onPress();
}
else if(ident == p4){
vid_stop_p4.onPress();
}
else if(ident == p5){
vid_stop_p5.onPress();
}
else if(ident == p6){
vid_stop_p6.onPress();
}
else if(ident == p7){
vid_stop_p7.onPress();
}
else if(ident == p8){
vid_stop_p8.onPress();
}
else if(ident == p9){
vid_stop_p9.onPress();
}
else if(ident == p10){
vid_stop_p10.onPress();
}
else if(ident == p11){
vid_stop_p11.onPress();
}
else if(ident == p12){
vid_stop_p12.onPress();
}
}
vid.addEventListener("complete", listenerObject);