# Instance names

**URL:** <https://forum.kirupa.com/t/instance-names/269852>\
**Category:** Uncategorized\
**Created:** [September 2, 2008, 1:45pm UTC](https://forum.kirupa.com/t/instance-names/269852 "2008-09-02T13:45:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![22celin\_b](https://avatars.discourse-cdn.com/v4/letter/2/2acd7d/32.png) [@22celin\_b](https://forum.kirupa.com/u/22celin_b)\
**Post date:** [September 2, 2008, 1:45pm UTC](https://forum.kirupa.com/t/instance-names/269852/1 "2008-09-02T13:45:29Z")

</div>

Hi,

I have a function called by an interval which is working just fine but I can’t seem to reference the instance outside of this function

Here is my code

var myInterval:Number = setInterval(this, “my\_function”, 1500);

function my\_function():Void {  
myLevel++;  
attachMovie(“my\_mc”,“my\_mc”+myLevel,myLevel);  
this[“my\_mc”+myLevel].\_x = 400;  
}

and this is what I am trying to do with it in another function but it doesn’t work.

if (this[“my\_mc”+myLevel].hitTest(\_root.my\_hit\_area)) {

// do something here

}

If anyone knows how I can pick up on the instances of the movie clip in this hit test function I would really appreciate it.

Thanks
