# Loading different movies into main movie

**URL:** <https://forum.kirupa.com/t/loading-different-movies-into-main-movie/249841>\
**Category:** Uncategorized\
**Created:** [January 23, 2008, 12:30am UTC](https://forum.kirupa.com/t/loading-different-movies-into-main-movie/249841 "2008-01-23T00:30:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nejdeoto](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nejdeoto](https://forum.kirupa.com/u/nejdeoto)\
**Post date:** [January 23, 2008, 12:30am UTC](https://forum.kirupa.com/t/loading-different-movies-into-main-movie/249841/1 "2008-01-23T00:30:25Z")

</div>

hi, i have problem with one flash movie  
i can load different movies but i need load concrete movie on first vistitng  
i load different movies with this code:  
choice = Math.round(Math.random()\*5);  
switch (choice) {  
case 0 :  
location.loadMovie(“media/image0.swf”);  
break;  
case 1 :  
location.loadMovie(“media/image1.swf”);  
break;  
case 2 :  
location.loadMovie(“media/image2.swf”);  
break;  
case 3 :  
location.loadMovie(“media/image3.swf”);  
break;  
case 4 :  
location.loadMovie(“media/image4.swf”);  
break;  
case 5 :  
location.loadMovie(“media/image5.swf”);  
break;  
}

but i need, when i first open this movie on page, must be here loaded for example image0.swf  
and then it continues loading different movies (image1- 5.swf)

thanks for all
