0

我想使用视频的当前时间来管理所有视频。例如,我有一些提示点,我选择它,视频现在从这个提示点播放,10 秒后视频转到其他部分,一切都取决于视频的当前时间。我不在网络上使用它,所以我的视频没有加载(我的意思是像 bytesLoaded 这样的 VideoProgressEvent 属性对我没有帮助)。是否可以在动作脚本 3.0 中做到这一点?另一个问题是我是否可以在提示点之间添加一些过渡。

    import fl.video.*;

// Video component instance name
var flvControl:FLVPlayback = display;
var flvSource:String = "myMovie.flv";

// Set video
flvControl.source = flvSource;



var myTextFormat:TextFormat = new TextFormat();
myTextFormat.size = 20
btn1.setStyle("textFormat", myTextFormat);
btn2.setStyle("textFormat", myTextFormat);
btn3.setStyle("textFormat", myTextFormat);
btn4.setStyle("textFormat", myTextFormat);
display.autoPlay = false;


// Add seek to time code
function seekToTimeHandler1(event:MouseEvent):void
{
   var sec:Number = 15;
   flvControl.seek(sec);
}
btn1.addEventListener(MouseEvent.CLICK, seekToTimeHandler1);

// Add seek to time code
function seekToTimeHandler2(event:MouseEvent):void
{
   var sec:Number = 61;
   flvControl.seek(sec);
}
btn2.addEventListener(MouseEvent.CLICK, seekToTimeHandler2);

// Add seek to time code         
function seekToTimeHandler3(event:MouseEvent):void
{
   var sec:Number = 63;
   flvControl.seek(sec);
}
btn3.addEventListener(MouseEvent.CLICK, seekToTimeHandler3);

// Add seek to time code
function seekToTimeHandler4(event:MouseEvent):void
{
   var sec:Number = 80;
   flvControl.seek(sec);
}
btn4.addEventListener(MouseEvent.CLICK, seekToTimeHandler4);
4

0 回答 0