# Evaluating a variable to a MC name

**URL:** <https://forum.kirupa.com/t/evaluating-a-variable-to-a-mc-name/235502>\
**Category:** Uncategorized\
**Created:** [August 12, 2007, 1:06am UTC](https://forum.kirupa.com/t/evaluating-a-variable-to-a-mc-name/235502 "2007-08-12T01:06:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gnaws](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@Gnaws](https://forum.kirupa.com/u/Gnaws)\
**Post date:** [August 12, 2007, 1:06am UTC](https://forum.kirupa.com/t/evaluating-a-variable-to-a-mc-name/235502/1 "2007-08-12T01:06:35Z")

</div>

I’m trying to define a target using a variable name. For example, whenever a MC lands on spot “Hot”, it sets a var = myname. I want to tell the nested movie (“prog”) inside “myname” to go to the next frame.

This is what I have that isn’t working:

```auto
on (press){
        bag.myname.prog.gotoAndStop(5);
}

```

I’ve also had no luck with:

```auto
on (press){
        bag.eval(myname).prog.gotoAndStop(5);
}

```

}
