# Random, repeating loadMovie

**URL:** <https://forum.kirupa.com/t/random-repeating-loadmovie/176133>\
**Category:** flash\
**Created:** [January 20, 2006, 4:51pm UTC](https://forum.kirupa.com/t/random-repeating-loadmovie/176133 "2006-01-20T16:51:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stopsatgreen](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/stopsatgreen/32/2091_2.png) [@stopsatgreen](https://forum.kirupa.com/u/stopsatgreen)\
**Post date:** [January 20, 2006, 4:51pm UTC](https://forum.kirupa.com/t/random-repeating-loadmovie/176133/1 "2006-01-20T16:51:47Z")

</div>

Hi,

I need to come up with a script that loads movies in a random order.

I have 3 movies:

loader.swf  
one.swf  
two.swf

loader.swf uses a script to randomly loadMovie one of one.swf and two.swf. That works fine, but the movie that is loaded just loops continuously. What I need is a script that, when the movie finishes playing once, returns to loader.swf and plays another one randomly (eventually there will be more than two choices).

I’m new to actionscript, so help will be VERY gratefully received.
