# Variable problem

**URL:** <https://forum.kirupa.com/t/variable-problem/102372>\
**Category:** Uncategorized\
**Created:** [February 23, 2004, 5:34am UTC](https://forum.kirupa.com/t/variable-problem/102372 "2004-02-23T05:34:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wild\_honey](https://avatars.discourse-cdn.com/v4/letter/w/c6cbf5/32.png) [@wild\_honey](https://forum.kirupa.com/u/wild_honey)\
**Post date:** [February 23, 2004, 5:34am UTC](https://forum.kirupa.com/t/variable-problem/102372/1 "2004-02-23T05:34:14Z")

</div>

hi there,

I try to include a variable in gotoandplay(); like:

on (press) {  
gotoAndPlay(\_root.strScene, 1);  
}

it gives me an error and say it must be quted, i tryed everything and im sick of it and i will breack my pc and shoot my self if no one helped me :sketchy:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 23, 2004, 7:47am UTC](https://forum.kirupa.com/t/variable-problem/102372/2 "2004-02-23T07:47:05Z")

</div>

The first parameter is a _string_ holding the name of the scene to go to. So try this:

```auto

on (press) {
gotoAndPlay("strScene", 1);
}

```

Or … now that I think about it, are you trying to make the movieclip strScene to gotoAndPlay frame 1 instead of the scene strScene ? If so, use this:

```auto

on (press) {
_root.strScene.gotoAndPlay(1);
}

```

🙂
