# Using an instance name to call a variable

**URL:** <https://forum.kirupa.com/t/using-an-instance-name-to-call-a-variable/239773>\
**Category:** flash\
**Created:** [September 25, 2007, 8:24pm UTC](https://forum.kirupa.com/t/using-an-instance-name-to-call-a-variable/239773 "2007-09-25T20:24:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanbez](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@seanbez](https://forum.kirupa.com/u/seanbez)\
**Post date:** [September 25, 2007, 8:24pm UTC](https://forum.kirupa.com/t/using-an-instance-name-to-call-a-variable/239773/1 "2007-09-25T20:24:21Z")

</div>

Hello Everybody

I am using Flash2004 MX

I thought this would be simple, but it hasn’t been.

I have a seris of hidden MCs named star1, star2 etc.

I want them to become visible when I call this function.

star\_fn = function() {  
starcount++  
starshow=(“star” + starcount)  
starshow.\_visible=true  
}

But it is not working.

I thought maybe it was like converting variable info to a number format, but using a text scenario instead. However, I am not sure how to do this.

Thoughts?

Thanks a bunch

Sean
