0
votes

Trying to adapt this example given here

http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00002413.html

Getting Error

1046: Type was not found or was not a compile time constant void.

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);

im trying the read the actual Dimension of the flv video file.

2

2 Answers

0
votes

In the example it's written as a comment in the beginning:

/** Requires: - FLVPlayback component on the Stage with an instance name of my_FLVPlybk */

I assume you are missing this and you don't have the component on stage with instance name 'rmys01', as I don't see you declaring it anywhere. Otherwise looks fine.

0
votes

import mx.video.*;

So, do you work on AS3 project or AS2?

For AS3 project you should adapt this Tutorial.