# Generate names m001, m002, .. m010, m011 .. m100, m101

**URL:** <https://forum.kirupa.com/t/generate-names-m001-m002-m010-m011-m100-m101/290451>\
**Category:** flash\
**Created:** [June 15, 2009, 9:06am UTC](https://forum.kirupa.com/t/generate-names-m001-m002-m010-m011-m100-m101/290451 "2009-06-15T09:06:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThinkKirupa](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@ThinkKirupa](https://forum.kirupa.com/u/ThinkKirupa)\
**Post date:** [June 15, 2009, 9:06am UTC](https://forum.kirupa.com/t/generate-names-m001-m002-m010-m011-m100-m101/290451/1 "2009-06-15T09:06:16Z")

</div>

Hi,

I’m having about 100 objects that I want to name using a for-loop. The problem is I want them named in a particular way. I don’t want the names to be  
**NOT!** _m1, m2, m3 … m10, m11, m12, … m100_  
but _m001, m002, m003 … m010, m011, m012, … m100_.  
Is there an easy way to do this? I think if there were a way to say the number should be 3 digits long so it adds the '0’s.

I want to be able to call them by their name in a for-loop later.

```auto

for ( var i = 0; i < 100; i ++ )
{
     m+i.play();
}

```

Help appreciated!
