# Using Variable in gotoAndPlay!?! NEED HELP ASAP!

**URL:** <https://forum.kirupa.com/t/using-variable-in-gotoandplay-need-help-asap/163398>\
**Category:** flash\
**Created:** [September 22, 2005, 2:50am UTC](https://forum.kirupa.com/t/using-variable-in-gotoandplay-need-help-asap/163398 "2005-09-22T02:50:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fidelity88](https://avatars.discourse-cdn.com/v4/letter/f/7feea3/32.png) [@Fidelity88](https://forum.kirupa.com/u/Fidelity88)\
**Post date:** [September 22, 2005, 2:50am UTC](https://forum.kirupa.com/t/using-variable-in-gotoandplay-need-help-asap/163398/1 "2005-09-22T02:50:49Z")

</div>

Hello everyone,  
Im working on a flash menu right now and I wan to create a dynamic gotoAndPlay. but I need to insert a variable into the target path right now here is what Im doing.

```auto
 MyVar="FirstMC";
_root.Nav.MyVar.gotoAndPlay("out");

```

and right now Flash doesn know what to do with it… I would like to make this variable global also which is nothing more than throwing the \_global command before my variable right? Anyway I need help fast! The project deadline is fast approaching!  
Thanks!  
Fidelity88
