# Call variable in path?

**URL:** <https://forum.kirupa.com/t/call-variable-in-path/217577>\
**Category:** flash\
**Created:** [February 28, 2007, 2:21am UTC](https://forum.kirupa.com/t/call-variable-in-path/217577 "2007-02-28T02:21:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sogj](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/sogj/32/3189_2.png) [@sogj](https://forum.kirupa.com/u/sogj)\
**Post date:** [February 28, 2007, 2:21am UTC](https://forum.kirupa.com/t/call-variable-in-path/217577/1 "2007-02-28T02:21:07Z")

</div>

I want to create a variable that I can call in a path. For instance:

```auto
var myVar = "varHome";

```

Then, to use in code:

```auto
_root.mcContent.varHome.gotoAndPlay(1);

```

Can you do that? This way obviously doesn’t work (because I’ve tried it). Is it possible at all?

Thanks!  
:tie: sogj
