我尝试在Flash CC Pro上创建一个按钮,以跳转到我导入的FLV视频的特定点。
在Flash CS上我知道我可以在FLV中添加提示点,然后使用动作脚本跳转到提示点。但是我在Flash Pro CC上看到你无法添加这些提示点,所以我该如何设置动作呢?
谢谢!
答案 0 :(得分:0)
在Flash Pro CC中不推荐使用UI添加/删除提示点。
您需要使用Actionscript添加或删除提示点并寻找特定的提示点。
示例代码:
// Requires an FLVPlayback instance called my_FLVPlybk on Stage
import fl.video.*;
import fl.video.MetadataEvent;
//my_FLVPlybk.source = "http://www.helpexamples.com/flash/video/cuepoints.flv"
var cuePt:Object = new Object(); //create cue point object
cuePt.time = 2.5;
cuePt.name = "ASpt1";
cuePt.type = "actionscript";
my_FLVPlybk.addASCuePoint(cuePt);//add AS cue point
// add 2nd AS cue point using time and name parameters
my_FLVPlybk.addASCuePoint(5, "ASpt2");
my_FLVPlybk.addEventListener(MetadataEvent.CUE_POINT, cp_listener);
function cp_listener(eventObject:MetadataEvent):void {
trace("Elapsed time in seconds: " + my_FLVPlybk.playheadTime);
trace("Cue point name is: " + eventObject.info.name);
trace("Cue point type is: " + eventObject.info.type);
}