# ? using the instance name as counter

**URL:** <https://forum.kirupa.com/t/using-the-instance-name-as-counter/103913>\
**Category:** Uncategorized\
**Created:** [March 10, 2004, 4:02pm UTC](https://forum.kirupa.com/t/using-the-instance-name-as-counter/103913 "2004-03-10T16:02:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DChihorn](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@DChihorn](https://forum.kirupa.com/u/DChihorn)\
**Post date:** [March 10, 2004, 4:02pm UTC](https://forum.kirupa.com/t/using-the-instance-name-as-counter/103913/1 "2004-03-10T16:02:32Z")

</div>

I am using Flash MX  
I have about 100 pictures. I have currently named them P1.jpg, P2.jpg, P3.jpg, etc…

I have created 100 instances of a button (I know I did it the hard way, but I am still a newbie so…) with the instance names being P1, P2, P3, etc…

I have one blank MC in the middle of my page.

I am needing help to figure out the best way to make it where when a button is pressed, the corresponding picture is loaded into the MC.

Thank you for your help.
