Need help on randomizing movie file on browser reload

Hello all,\r\rI’m a newbie at programming and had performed serveral search on the net without much useful results. For all you programmer guru out there, please lend me a hand if you can.\r\rI am using flash version 5.0. I have 7 flash movie files within one working flash file and only 4 movie files gets display on an HTML page at a time. I need a script that will randomize the appearance of the movie files each time the browser gets refresh. But the script should only randomize 2 of the 4 movie files.\r\rSo for example, say I have movie files named 1 to 7. On browser load, I have movie file, 1,2,3 and 4 displayed. Now when a user refresh browser, I want movie file, 1 and 4 to be replaced by either movie file 5,6, or 7 (ie. random diplay of file)\r\rThis might sounds confusing or I might not be explaining it well, but if you go to you will see what I mean. Look at the Case studies section, there are 4 movie files being displayed.\r\rMuch, much, much thanks for any help provided. \r\rScript can be sent to: [email protected] (if u wish).\r\r\rSincerely,\r\rChi Huynh\r

here’s a quick and simple method.\r\rmake one big flash movie which will contain the four randomly loaded movies.\r\rmake an empty movie. put four copies of it on the stage corresponding to where you want the loaded movies to be.\r\rname them “targ0” “targ1” “targ2” “targ3”\r\rin frame one put this code, where mcArray contains the names of the swfs you want to load:

 \r\r\r\rmcArray = ["m1.swf","m2","m3","m4","m5","m6","m7"];\r\r\r\rfor(j=0;j<4;j++){\r\r   var r = random(mcArray.length);\r\r   loadMovie(mcArray[r],"targ"+i);\r\r   mcArray.splice(r,1);\r\r}

\rthere you go. totally untested, but the theory is sound. ; )

there is also a post in the Best of Forum that explains how to do this. you might try that too.

Geez, thanks guys for the help. \r\rHonestly I didn’t think I will get any response back so soon =)\r\rI do not know much about scripting but I will give it a try.\r\rHave a great day.