fancier loop mechanism in movieplayer