# Random Images, random positions?

**URL:** <https://forum.kirupa.com/t/random-images-random-positions/2226>\
**Category:** flash\
**Created:** [May 9, 2002, 4:46pm UTC](https://forum.kirupa.com/t/random-images-random-positions/2226 "2002-05-09T16:46:04Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [May 9, 2002, 4:46pm UTC](https://forum.kirupa.com/t/random-images-random-positions/2226/1 "2002-05-09T16:46:04Z")

</div>

Hey there.

I want to add some depth to my background and what I was thinking was to have a simple animation appear at random each time a differant size, position angle ect, and if possible have it attach the animation more the once at a time.

Cheers.

---

<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:** [May 9, 2002, 4:51pm UTC](https://forum.kirupa.com/t/random-images-random-positions/2226/2 "2002-05-09T16:51:12Z")

</div>

use a for loop to attach multiple movies at once, and just give them random everything

say you wanted to attach 10 movies::

for(ii=0;ii\<=10;ii++){  
attachMovie (“bubble”, “copy”+ii, ii)  
\_root[“copy”+ii].\_x = Math.random()\*MovieWidth  
\_root[“copy”+ii].\_y = Math.random()\*MovieHeight  
\_root[“copy”+ii].\_rotation = Math.random()\*360  
etc…etc…  
}
