# \[FlashLite 2.1 ActionScript\] How to load movie clips into random positions?

**URL:** https://forum.kirupa.com/t/flashlite-2-1-actionscript-how-to-load-movie-clips-into-random-positions/306913
**Category:** flash
**Created:** [March 24, 2010, 1:32pm UTC](https://forum.kirupa.com/t/flashlite-2-1-actionscript-how-to-load-movie-clips-into-random-positions/306913 "2010-03-24T13:32:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![B\_Ball](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@B\_Ball](https://forum.kirupa.com/u/B_Ball)
#### Post date: [March 24, 2010, 1:32pm UTC](https://forum.kirupa.com/t/flashlite-2-1-actionscript-how-to-load-movie-clips-into-random-positions/306913/1 "2010-03-24T13:32:38Z")

</div>

Hello,

I have three movie clips on my stage. Their names in my library are _a1\_mc_, _a1\_mc2_, and _a1\_mc3._ Each of those movie clips on my stage has a different instance name. All of these are connected with an actionscript in the same file.

Now, I’d like the movie clips to appear at a random position every time, they are loaded.

I already tried to make a new array and solve this issue with the sort() command. However, that did not work out properly.

The positions and instance names of the movie clips on my stage are as follows:

_ **a1\_mc** _  
instance name on stage: a1  
position on stage: X = 20.0 | Y = 140.0

_ **a1\_mc2** _  
instance name on stage: a2  
position on stage: X = 20.0 | Y = 200.0

_ **a1\_mc3** _  
instance name on stage: a3  
position on stage: X = 20.0 | Y = 260.0

I’d be grateful if anyone could help me out here.

Thank you very much in advance.

With kind regards,  
B-Ball
