# ENTER\_FRAME multiple copy of one instance?

**URL:** <https://forum.kirupa.com/t/enter-frame-multiple-copy-of-one-instance/301586>\
**Category:** flash\
**Created:** [December 11, 2009, 5:42pm UTC](https://forum.kirupa.com/t/enter-frame-multiple-copy-of-one-instance/301586 "2009-12-11T17:42:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![crack](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@crack](https://forum.kirupa.com/u/crack)\
**Post date:** [December 11, 2009, 5:42pm UTC](https://forum.kirupa.com/t/enter-frame-multiple-copy-of-one-instance/301586/1 "2009-12-11T17:42:00Z")

</div>

first of all hi to all 🙂

i’m new to as3 and i need help with something i’ve been struggling for some time now

i would like to add multiple copies of one instance “mytocka\_mc” to stage using ENTER\_FRAME

here is the code that does all i need except leaving multiple copies of myTocka\_mc on stage

I was googling and found it got something to do with arrays  
i think i should create an array and on every ENTER\_FRAME copy my original instance, push copied instance to array and at the end add whole array to the stage but i really dont know how to do that

thank you in advance 🙂

ps  
sorry for bad english

```auto

kreni_btn.addEventListener(MouseEvent.CLICK, kreniClick);
stani_btn.addEventListener(MouseEvent.CLICK, staniClick);

var go:Boolean = true;
var counter:Number = 0;
var xBrzina:Number = 15;
var tockaGrafax:Number = 0;

myTocka_mc.x = 25;
go = false;

myTocka_mc.addEventListener(Event.ENTER_FRAME, vxplus);
function vxplus(ev:Event):void 
{

    if (go) 
    {
        counter++;
        tockaGrafax += xBrzina;
        myTocka_mc.x = tockaGrafax;
        

        
        if (counter > 30) 
        {
            counter = 0;
            go = false;
        }
    }
}

function kreniClick(event:MouseEvent):void 
{
    counter = 0;
    go = true;
    tockaGrafax = 25;
    myTocka_mc.x = 25;
}
function staniClick(event:MouseEvent):void 
{
    tockaGrafax = 25;
    myTocka_mc.x = 25;
    counter = 0;
    go = false;
}

```
