# Random Movie Help with Action Scripting

**URL:** <https://forum.kirupa.com/t/random-movie-help-with-action-scripting/108572>\
**Category:** Uncategorized\
**Created:** [April 26, 2004, 7:40pm UTC](https://forum.kirupa.com/t/random-movie-help-with-action-scripting/108572 "2004-04-26T19:40:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sczos911](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@sczos911](https://forum.kirupa.com/u/sczos911)\
**Post date:** [April 26, 2004, 7:40pm UTC](https://forum.kirupa.com/t/random-movie-help-with-action-scripting/108572/1 "2004-04-26T19:40:30Z")

</div>

Thank you so much for the Loading Random Movies tutorial. Awesome - just what I was looking for.

Anyways, I want the random play and then after it is done playing - play another random movie. The user would not need to refresh their browser. I am an Action Script novice and cannot figure out how to do this.

Here is what I have for loading the random movies:

filename = [“fb01.swf”, “fb02.swf”, “fb03.swf”, “fb04.swf”];  
path = “[http://www.myurl.com/flash/](http://www.myurl.com/flash/)”;  
i = filename.length;  
k = Math.floor(Math.random()\*i);  
loadMovie(path+filename[k], movieTarget);

In my brain, I think an unloadMovie should work (but doesn’t) - but maybe I am missing something here. Maybe not having the swf movies loop - or something in the loading movies needs to be there in the form of action scripting. I just don’t know.

Thanks!
