# Dynamic LoadVars

**URL:** https://forum.kirupa.com/t/dynamic-loadvars/103671
**Category:** Uncategorized
**Created:** [March 8, 2004, 3:23am UTC](https://forum.kirupa.com/t/dynamic-loadvars/103671 "2004-03-08T03:23:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jkielisz](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@jkielisz](https://forum.kirupa.com/u/jkielisz)
#### Post date: [March 8, 2004, 3:23am UTC](https://forum.kirupa.com/t/dynamic-loadvars/103671/1 "2004-03-08T03:23:17Z")

</div>

Hello everyone. Thanks in advance for any help. I am working on a project where I need to check if my loaded variables contains a certain variable name. Basically i want to do the following:  
I have an string that contains a name;  
I want to pass the value of the string to my loadvars variable.  
If a variable with this name exists, I want the data to be displayed in a text box

Here is some code that I am using:

\_global.getcaptions = new LoadVars();

stuff=“test”;

\_root.caption.text=\_global.getcaptions.stuff;

I think the trouble is that the call to getcaptions is treating stuff as a variable name instead something which holds another variable. How do I pass dynamic variable names to a LoadVars variable?

Thanks again for any help
