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 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...