# Dynamicaly loading .jpgs or .swfs

**URL:** <https://forum.kirupa.com/t/dynamicaly-loading-jpgs-or-swfs/8397>\
**Category:** Uncategorized\
**Created:** [November 20, 2002, 2:38am UTC](https://forum.kirupa.com/t/dynamicaly-loading-jpgs-or-swfs/8397 "2002-11-20T02:38:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashermx](https://avatars.discourse-cdn.com/v4/letter/f/e5b9ba/32.png) [@flashermx](https://forum.kirupa.com/u/flashermx)\
**Post date:** [November 20, 2002, 2:38am UTC](https://forum.kirupa.com/t/dynamicaly-loading-jpgs-or-swfs/8397/1 "2002-11-20T02:38:05Z")

</div>

I found a tute to radomly load jpgs using the switch and case actions. How can I randomly load external .swfs or internal .jpgs using arrays and the math random function?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 20, 2002, 4:47am UTC](https://forum.kirupa.com/t/dynamicaly-loading-jpgs-or-swfs/8397/2 "2002-11-20T04:47:31Z")

</div>

lol thats quite a large question. first you would need to understand arrays and how they work and then how to apply them.

here’s a tutorial on this site that loads a random background for the swf movie by picking a number from an array and loading the corresponding file. you should be able to adapt this to your purpose.

if you have problems, post more specific questions here. thanks.

hope this helps.  
good luck =)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 20, 2002, 5:02am UTC](https://forum.kirupa.com/t/dynamicaly-loading-jpgs-or-swfs/8397/3 "2002-11-20T05:02:52Z")

</div>

u didnt give a link shuga!!  
what a horrible teacher you are!  
haha

oh, btw, could you send me the .fla of your footer, i would like to pick it apart and make my own - i like it alot!  
thx

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 20, 2002, 5:05am UTC](https://forum.kirupa.com/t/dynamicaly-loading-jpgs-or-swfs/8397/4 "2002-11-20T05:05:18Z")

</div>

omgosh … i thought i put the link in there … lol

[http://www.kirupa.com/developer/mx/loadingrandombackground.asp](http://www.kirupa.com/developer/mx/loadingrandombackground.asp)

there you go.

and here’s a link to the discussion about how my footer came about. with source flas. the code was thanks in part to both lostinbeta and h88 … thanks guys!

[http://www.kirupaforum.com/showthread.php?s=&threadid=9089](http://www.kirupaforum.com/showthread.php?s=&threadid=9089)

enjoy

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 20, 2002, 12:33pm UTC](https://forum.kirupa.com/t/dynamicaly-loading-jpgs-or-swfs/8397/5 "2002-11-20T12:33:06Z")

</div>

Thanks Shuga.

I saw that tute and like it. I know how to use arraws to display random words or phrases in a dynamic text box. I would like to se them to display random files. I just can’t seem to tie the random array selection with the load movie or target.
