# Playing multiple copies of the same swf at the same time

**URL:** <https://forum.kirupa.com/t/playing-multiple-copies-of-the-same-swf-at-the-same-time/190762>\
**Category:** flash\
**Created:** [June 14, 2006, 3:27pm UTC](https://forum.kirupa.com/t/playing-multiple-copies-of-the-same-swf-at-the-same-time/190762 "2006-06-14T15:27:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zervez](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zervez/32/2497_2.png) [@zervez](https://forum.kirupa.com/u/zervez)\
**Post date:** [June 14, 2006, 3:27pm UTC](https://forum.kirupa.com/t/playing-multiple-copies-of-the-same-swf-at-the-same-time/190762/1 "2006-06-14T15:27:34Z")

</div>

I have a problem with Playing multiple copies of the same swf at the same time.

The thing is that I want to have a button and when pressing the button I want to load a swf file. I want the file to load at diffrent position everytime and I also want it to remain visible when Im pushing the button another time for another copy.

I got this code so far but it only plays one copy of the swf at the time.

but.onPress = function () {

\_root.createEmptyMovieClip(“samlat”,1);

```
    samlat.loadMovie("kanin.swf");

    
         var xrandom = Math.round(Math.random()*300);
         var yrandom = Math.round(Math.random()*300);
     
            samlat._x = xrandom ;
            samlat._y = yrandom ;

```

}

how should the code look like? I have tried with loadMovieNum but then I cant position the swf.

I also tried this

but.onPress = function () {  
var nr = Math.round(Math.random()\*300);

```
    trace(nr.toString());
    namn="samlat";
    nummer=nr.toString();

```

\_root.createEmptyMovieClip(namn+nummer,1);

```
    namn+nummer.loadMovie("kanin.swf");

    
         var xrandom = Math.round(Math.random()*300);
         var yrandom = Math.round(Math.random()*300);
     
            namn+nummer._x = xrandom ;
            namn+nummer._y = yrandom ;

```

but then no swf at all shows up.

any idea what to do??
