# Using variables as movieclips

**URL:** <https://forum.kirupa.com/t/using-variables-as-movieclips/155996>\
**Category:** flash\
**Created:** [July 21, 2005, 7:28pm UTC](https://forum.kirupa.com/t/using-variables-as-movieclips/155996 "2005-07-21T19:28:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoirWD](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@NoirWD](https://forum.kirupa.com/u/NoirWD)\
**Post date:** [July 21, 2005, 7:28pm UTC](https://forum.kirupa.com/t/using-variables-as-movieclips/155996/1 "2005-07-21T19:28:45Z")

</div>

Whats up everyone,

I need to know how I would use a variable as a movieclip, like me expain with an example:

currentMovie = “MovieClipName”;

\_root.currentMovie.gotoAndPlay(2);

I want to have ‘MovieClipName’ to be the movieclip that plays.  
But obviously AS 2 things I’m asking for ‘currentMovie’ to play but its just a variable.

How can I implement this? Help Please?

Thanks.  
Noir
