# How to name MC instances?

**URL:** <https://forum.kirupa.com/t/how-to-name-mc-instances/168075>\
**Category:** flash\
**Created:** [November 3, 2005, 7:00pm UTC](https://forum.kirupa.com/t/how-to-name-mc-instances/168075 "2005-11-03T19:00:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![InclininWirefrE](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@InclininWirefrE](https://forum.kirupa.com/u/InclininWirefrE)\
**Post date:** [November 3, 2005, 7:00pm UTC](https://forum.kirupa.com/t/how-to-name-mc-instances/168075/1 "2005-11-03T19:00:21Z")

</div>

Wud gr8ly appreciate if some1 can advise me about a better way to refer to newly created instances in the function ‘Move’ below:

```php

interval = setInterval(CreateBullet, maxTime*Math.random()); 
function CreateBullet() { 
    clearInterval(interval); 
    bulletName = "car"+bulletCount; 
    newBullet_mc = _root.attachMovie("car", bulletName, bulletCount); 
    newBullet_mc._x = startX; 
    newBullet_mc._y = startY; 
    newBullet_mc.onEnterFrame = Move; 
    bulletCount++; 
    interval = setInterval(CreateBullet, maxTime*Math.random()); 
} 

function Move() { 
        if (this._y >= 318){this._y -= 1;} 
} 

```

My problem arises since all newly created instances of ‘car’ are referred to as ‘this.’. So if I want, for example, instances whose y-position is \>= 318 to move in a certain way, every other instance, whether or not \>= 318, also starts moving!!: (

So…can I use “car”+bulletCount, for instance, in ‘Move’ in a ‘for’ loop to deal with only the instances I want to??

lk forward in anticipation!
