# Creating Multiple Function() with a Loop?

**URL:** <https://forum.kirupa.com/t/creating-multiple-function-with-a-loop/199562>\
**Category:** flash\
**Created:** [September 4, 2006, 2:55am UTC](https://forum.kirupa.com/t/creating-multiple-function-with-a-loop/199562 "2006-09-04T02:55:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nineteen](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nineteen/32/2679_2.png) [@Nineteen](https://forum.kirupa.com/u/Nineteen)\
**Post date:** [September 4, 2006, 2:55am UTC](https://forum.kirupa.com/t/creating-multiple-function-with-a-loop/199562/1 "2006-09-04T02:55:03Z")

</div>

```auto

for (var i:Number = 0; i<12; i++) {
    var myFunction_i:Function = function () {
        trace("This is function "+i);
    };
}

myFunction_5();

```

How do I achieve this?

I’m needing to create identical functions but different ‘i’ Number Variables so that I can call them as shown when I need to.

Please help :D?
