# Random Pictures

**URL:** <https://forum.kirupa.com/t/random-pictures/23960>\
**Category:** flash\
**Created:** [June 24, 2003, 6:41pm UTC](https://forum.kirupa.com/t/random-pictures/23960 "2003-06-24T18:41:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBV](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@SBV](https://forum.kirupa.com/u/SBV)\
**Post date:** [June 24, 2003, 6:41pm UTC](https://forum.kirupa.com/t/random-pictures/23960/1 "2003-06-24T18:41:30Z")

</div>

Yes i used the search feature and found a topic for it, but the link they said the help was on, did not work…

How can i create random pictures?

---

<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:** [June 24, 2003, 6:55pm UTC](https://forum.kirupa.com/t/random-pictures/23960/2 "2003-06-24T18:55:16Z")

</div>

SBV -

by “random pictures” do you mean displaying a random image or creating a random composition out of various movie clips?

let me know and i’ll help you out.

---

<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:** [June 24, 2003, 7:16pm UTC](https://forum.kirupa.com/t/random-pictures/23960/3 "2003-06-24T19:16:55Z")

</div>

Displaying a random image.

---

<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:** [June 25, 2003, 12:18pm UTC](https://forum.kirupa.com/t/random-pictures/23960/4 "2003-06-25T12:18:26Z")

</div>

Well i think there is a way to do this using arrays, but i dont’ know how…so an idea would be to create a random number and a picture loads up depending on the number…

---

<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:** [June 25, 2003, 1:15pm UTC](https://forum.kirupa.com/t/random-pictures/23960/5 "2003-06-25T13:15:57Z")

</div>

SBV - this link might help…

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

🙂

Cello

---

<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:** [June 25, 2003, 1:54pm UTC](https://forum.kirupa.com/t/random-pictures/23960/6 "2003-06-25T13:54:52Z")

</div>

damm i wanted to see how to do it too but hte second page link don’t work :-\

---

<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:** [June 25, 2003, 10:27pm UTC](https://forum.kirupa.com/t/random-pictures/23960/7 "2003-06-25T22:27:02Z")

</div>

just make sure that all your pics are in MCs. delete all the pics off the main timeline and hit F11. right click each MC and hit linkage. you should see some check boxes. hit export for actionscript and name each MC the same except for a different number at the end ie: pic1, pic2 etc… make sure the numbers are consecutive. then in the main timeline put  
[AS]numPics = 5 //the number of the last pic ie pic5  
picIndex = Math.floor(Math.random() \*numPics)  
\_root.attachMovie(“pic” + picIndex, “whatEverYouWantTheNewPicNamed”,100/_the new depth_/ )  
\_root[“whatEverYouWantTheNewPicNamed”].\_x = 200 //where ever you want the new pic to be placed…  
\_root[“whatEverYouWantTheNewPicNamed”].\_y = 234  
[/AS]

that should work… haven’t tested it though 🙂

---

<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:** [June 25, 2003, 10:54pm UTC](https://forum.kirupa.com/t/random-pictures/23960/8 "2003-06-25T22:54:31Z")

</div>

zylum, excuse me I’m still learning (with quite a bit of hewlp from this place, actually:thumb: )…

The AS above implies an x and y position of the images to be 200 and 234, right ? That can be changed for any project, right?

Thanks!  
Mars

edit: read the comments, Mars…:trout:

---

<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:** [June 26, 2003, 3:50am UTC](https://forum.kirupa.com/t/random-pictures/23960/9 "2003-06-26T03:50:14Z")

</div>

yes it should planet 🙂
