Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

_totalframes and _currenframe undefined

Status
Not open for further replies.

j183

Programmer
Mar 8, 2005
4
US
Hi All,

I'm new to Flash (and actionscript) and could really use some help.

I'm trying to read through an array of FLV movies and play each one in sequence in a MediaPlayback component and am using the setInterval function to check when one movie ends (in order to start the next one).

So far, I got the first movie to load and play, but that's where it ends.

I think I have to have a condition in my function that checks for when _totalframes = _currentfarme (when equal, load the next movie).

But before I can do that, I have to be able to see those attributes. When I print them out in my textBox, I get them as undefined.

movieName itself prints out fine, but the frame attributes come out as undefined.

Here's the code:

playMovies = function (){
var movieName = moviesArray [loopcounter];
mediaPlayback.setMedia(movieName , "FLV");
moviesText.text = moviesText.text + " Now Playing: " + movieName + " Total Frames: " + movieName._totalframes + " Frame Loaded: " + movieName._frameloaded + " Current Frame: " + movieName._currentframe;
loopcounter = loopcounter + 1;
clearInterval (timer);
}
timer = setInterval (playMovies, 50);


Any help on this and/or how to do the condition/loop check after, would be greatly appreciated.

thanks again,
john...
 
I'm not on MX2004 and not familiar with FLVs, but I don't think you can get the current frame or total frames of a FLV like that...

You can trace the current frames or total frames of any movie clip in which a video would be embedded, but if this is a external streaming video, then I guess that wouldn't work...

Regards. Affiliate Program - Web Hosting - Web Design
 
Hi,

Thanks for the reply.

I'm not sure that's the case. I get the same results if I do the same thing, but with SWF files.

thanks,
john...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top