尝试调整此处给出的示例
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00002413.html
获取错误
1046:未找到类型或编译时间常数无效。
import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.metadataReceived = function(eventObject:Object):Void {
trace("canSeekToEnd is " + rmys01.metadata.canSeekToEnd);
trace("Number of cue points is " + rmys01.metadata.cuePoints.length);
trace("Frame rate is " + rmys01.metadata.framerate);
trace("Height is " + rmys01.metadata.height);
trace("Width is " + rmys01.metadata.width);
trace("Duration is " + rmys01.metadata.duration + " seconds");
};
rmys01.addEventListener("metadataReceived", listenerObject);
rmys01.contentPath = "rhym01.flv";
var vidsiz:TextField = new TextField();
vidsiz.text = "Video Size " + (rmys01.metadata.width) + " by " + (rmys01.metadata.height);
vidsiz.width = 550;
vidsiz.height = 700;
vidsiz.x = 450;
vidsiz.y = 300;
addChild(vidsiz);
我正在尝试阅读flv视频文件的实际尺寸。
答案 0 :(得分:0)
在示例中,它在开头写为评论:
/ ** 要求: - 舞台上的FLVPlayback组件,实例名称为my_FLVPlybk * /
我认为你错过了这个,并且你没有在舞台上使用实例名称' rmys01',因为我没有看到你在任何地方宣布它。否则看起来很好。
答案 1 :(得分:0)