# Load random .swf

**URL:** <https://forum.kirupa.com/t/load-random-swf/40964>\
**Category:** Uncategorized\
**Created:** [January 23, 2004, 10:27pm UTC](https://forum.kirupa.com/t/load-random-swf/40964 "2004-01-23T22:27:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![breravin](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/breravin/32/410_2.png) [@breravin](https://forum.kirupa.com/u/breravin)\
**Post date:** [January 23, 2004, 10:27pm UTC](https://forum.kirupa.com/t/load-random-swf/40964/1 "2004-01-23T22:27:31Z")

</div>

I have a blank .swf that I want to randomly load several other .swf files. here’s the script I am using, but i do not know why it is not working

[AS]a = [“index1.swf”, “index2.swf”, “index3.swf”, “index4.swf”, “index5.swf”, “index8.swf”];  
r = a[random(a.length)];  
loadMovie(r, 0);[/AS]

I though that was right, but I am obviously mistaked. help?

thanks[list]  
[/list]
