# Attaching movie clips

**URL:** <https://forum.kirupa.com/t/attaching-movie-clips/64786>\
**Category:** Uncategorized\
**Created:** [September 20, 2004, 1:38am UTC](https://forum.kirupa.com/t/attaching-movie-clips/64786 "2004-09-20T01:38:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xavier](https://avatars.discourse-cdn.com/v4/letter/x/2bfe46/32.png) [@Xavier](https://forum.kirupa.com/u/Xavier)\
**Post date:** [September 20, 2004, 1:38am UTC](https://forum.kirupa.com/t/attaching-movie-clips/64786/1 "2004-09-20T01:38:44Z")

</div>

Hi guys, i am trying to attach some movie clips and i manage to attach them in random positions but i dont know how to place them all inside my maze, any help? i got the fla file for it.

---

<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:** [September 20, 2004, 1:53am UTC](https://forum.kirupa.com/t/attaching-movie-clips/64786/2 "2004-09-20T01:53:22Z")

</div>

Not 100% sure what you mean, but if you change your random placement line to:

for(i=0; i\<5; i++) {  
attachMovie(“rect”, “rect”+i, i);  
\_root[“rect”+level].\_x = int(Math.random()\*440+50);  
\_root[“rect”+level].\_y = int(Math.random()\*240+50);  
level++;  
}

They all stay in the maze

---

<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:** [September 20, 2004, 2:06am UTC](https://forum.kirupa.com/t/attaching-movie-clips/64786/3 "2004-09-20T02:06:58Z")

</div>

erm… i want them to stay in the maze and place only in the places where my ball can move, thats wat i mean. after i change to urs, they stay in the map but are inside the walls also.
