# \[Flash5\]Using Variable as Movie Clip Name

**URL:** <https://forum.kirupa.com/t/flash5-using-variable-as-movie-clip-name/9038>\
**Category:** flash\
**Created:** [December 3, 2002, 4:18pm UTC](https://forum.kirupa.com/t/flash5-using-variable-as-movie-clip-name/9038 "2002-12-03T16:18:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![donaloh](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/donaloh/32/116_2.png) [@donaloh](https://forum.kirupa.com/u/donaloh)\
**Post date:** [December 3, 2002, 4:18pm UTC](https://forum.kirupa.com/t/flash5-using-variable-as-movie-clip-name/9038/1 "2002-12-03T16:18:15Z")

</div>

Hello All:  
I want to cycle through several movie clips for a training application. I plan to use an array to hold the clip names, and a variable (CurrentClip) to set visibility and allow me to use a single pause/ play button throughout.

For the visibility, I’ve found that…  
[COLOR=royalblue]CurrentClip.\_visible = false;[/COLOR] does NOT work.  
But…  
[COLOR=royalblue]setProperty (CurrentClip, \_visible, false);[/COLOR] does work.

However, for the pause/play function…  
[COLOR=royalblue]CurrentClip.stop();[/COLOR] does NOT work.

Seems like it’s looking for a clip with the literal name “CurrentClip” instead of the variable value.

How do I get around this? Is there an alternative way to call the MovieClip.stop() method that will allow me to use a variable for the clip name?

Many thanks,  
donaloh

---

<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:** [December 3, 2002, 4:32pm UTC](https://forum.kirupa.com/t/flash5-using-variable-as-movie-clip-name/9038/2 "2002-12-03T16:32:56Z")

</div>

that if they are located at the main timeline (\_root)

=)

---

<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:** [December 3, 2002, 4:40pm UTC](https://forum.kirupa.com/t/flash5-using-variable-as-movie-clip-name/9038/3 "2002-12-03T16:40:22Z")

</div>

Thanks for the post, but that didn’t do it.

I got the solution off-thread, using…  
this[CurrentClip].stop();  
instead of…  
CurrentClip.stop();

Many thanks,  
donaloh
