PDA

View Full Version : how to get the length of a streamed MP3?


koogakid
04-17-2003, 10:12 AM
Hi there,

Could someone enlighten me on how to use the server-side Stream.length(name) to access the length of a streaming MP3 (or .flv file)

At the moment I've managed to get an MP3 stream playing, which I can fast forward or rewind, but I'd like to be able to get the length of the track.

In the Flash Comm help files it states :


function onProcessCmd(cmd){
var streamLen = Stream.length("mp3:beethoven");
trace("Length: " + streamLen + "\n");
}

But it's not clear whether this needs to be placed in the main.asc file on the server (as Stream is a server-side object) or within the flash movie.

I've tried both so far with no result, other than

"length : "

Any help would be greatly appreciated,

koogakid