# String referencing

**URL:** <https://forum.kirupa.com/t/string-referencing/210653>\
**Category:** flash\
**Created:** [December 20, 2006, 6:32pm UTC](https://forum.kirupa.com/t/string-referencing/210653 "2006-12-20T18:32:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![colurblyne](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@colurblyne](https://forum.kirupa.com/u/colurblyne)\
**Post date:** [December 20, 2006, 6:32pm UTC](https://forum.kirupa.com/t/string-referencing/210653/1 "2006-12-20T18:32:17Z")

</div>

Hi, is it possible to assign an Instance Name to a string variable, and use the string variable to access the particular instance’s functions? I’m not sure if that was very clear, so here’s an example:

var instanceNameString = “test\_mc”;  
instanceNameString.gotoAndPlay(1);

How do I code it such that it will work?

And a second question: I’m also trying to use a string variable as a frame label parameter for a gotoAndPlay command. Again, I’m not sure how to explain it clearly, so here’s another example:

var frameLabelString = “contact me”; //“contact me” being a frame label on my timeline  
gotoAndPlay(frameLabelString);

I know that the frame label parameter is supposed to be within " "s, but how do I type it if the frame label is being referenced to a String variable?

Please do help! Thanks!

oh, I don’t know if it matters, but I’m using Flash MX.
