# Need to add variable to path name

**URL:** <https://forum.kirupa.com/t/need-to-add-variable-to-path-name/258305>\
**Category:** Uncategorized\
**Created:** [April 22, 2008, 8:43pm UTC](https://forum.kirupa.com/t/need-to-add-variable-to-path-name/258305 "2008-04-22T20:43:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Slausen](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@Mr\_Slausen](https://forum.kirupa.com/u/Mr_Slausen)\
**Post date:** [April 22, 2008, 8:43pm UTC](https://forum.kirupa.com/t/need-to-add-variable-to-path-name/258305/1 "2008-04-22T20:43:52Z")

</div>

So I have a button that occurs throughout the entire movie on the main timeline. I’m declaring a variable on each frame, so if you hit that button on that frame, it should take that variable and use it in the path to something I wanted turned on via \_alpha = 100.

So, I want it to be something like:

on (release)(  
\_root.movieContainer. + “The variable” +.thingToTurnOn.\_alpha = 100;  
)

So, I’ve never done this before, and I don’t know where to begin, I just know that I want that variable I declared on the main timeline to be used in that path when the button is clicked.
