# \[Flash 8\] Help with variables as values

**URL:** <https://forum.kirupa.com/t/flash-8-help-with-variables-as-values/170622>\
**Category:** flash\
**Created:** [November 28, 2005, 5:27am UTC](https://forum.kirupa.com/t/flash-8-help-with-variables-as-values/170622 "2005-11-28T05:27:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjonmage](https://avatars.discourse-cdn.com/v4/letter/t/51bf81/32.png) [@tjonmage](https://forum.kirupa.com/u/tjonmage)\
**Post date:** [November 28, 2005, 5:27am UTC](https://forum.kirupa.com/t/flash-8-help-with-variables-as-values/170622/1 "2005-11-28T05:27:26Z")

</div>

I would like to know if there is a way to insert a variable inside “”.

Here is an example to explain what I mean:

First there is a variable:

```auto
var myVariable = [Paris, Tokyo, London]

```

I want this code as it is. I don`t want too change the value to _[“Paris”, “Tokyo”, “London”]_.

Now I want to use this variable to make a button tell the main timeline to go to the frame “Paris”.

In other words the equivalent of

```auto
startButton.onRelease = function() {
this._parent.gotoAndStop("Paris");
};

```

But using a variable I only know how to do this:

```auto
startButton.onRelease = function() {
this._parent.gotoAndStop(myVariable[0]);
};
 
//this equals gotoAndStop(Paris)
 
startButton.onRelease = function() {
this._parent.gotoAndStop("myVariable[0]");
};
 
//this equals gotoAndStop("myVariable[0]")

```

Is there a way to put the value of the variable between “” so that it equals _gotoAndStop(“Paris”)_, without changing the variable code itself?
