for (PRInt32 i = 0; i < initMovieCount; i ++)
while (curIndex < mMovies.Count())
nsMovieSoundRequest::TaskActiveMovies(PRBool *outAllMoviesDone){  PRBool    allMoviesDone = PR_FALSE;  allMoviesDone = TaskOneMovie(mMovie);  PRInt32 initMovieCount = mMovies.Count();  PRInt32 curIndex = 0;    for (PRInt32 i = 0; i < initMovieCount; i ++)  {    Movie   thisMovie     = (Movie)mMovies.ElementAt(curIndex);    PRBool  thisMovieDone = TaskOneMovie(thisMovie);        if (thisMovieDone)    // remove finished movies from the array    {      mMovies.RemoveElementAt(curIndex);      ::DisposeMovie(thisMovie);      // curIndex doesn't change    }    else    {      curIndex ++;    }     allMoviesDone &= thisMovieDone;  }    *outAllMoviesDone = allMoviesDone;  return noErr;  }