我在FlashPlayer 11.1 的AS3发布中遇到FLVPlayback完整事件的问题
问题是,在视频开始几秒钟后,就会触发完整的事件,而问题总是在播放视频播放列表几小时后才会出现。
这里的一些代码:
var my_player:FLVPlayback = new FLVPlayback();
function makePlayer():void{
my_player.scaleMode = "exactFit";
my_player.x = video_x;
my_player.y = video_y;
my_player.width = video_width;
my_player.height = video_height;
if(bBordi)
my_player.mask = mask_mc;
video.addChild(my_player);
my_player.source = my_path + my_videos[nVideo].@URL;
my_player.addEventListener(fl.video.VideoEvent.COMPLETE, completePlay);
my_player.volume=video_volume;
}
function completePlay(e:fl.video.VideoEvent):void
{
if(!my_player.stopped)
return;
trace("VIDEO ENDED: " + my_path + my_videos[nVideo].@URL)
nVideo++;
if(nVideo >= my_total)
nVideo = 0;
playPlayer();
}
function playPlayer():void{
my_player.source=(my_path + my_videos[nVideo].@URL);
my_player.play();
}
FlashPlayer11.8发布解决了问题。