# String Variables

**URL:** <https://forum.kirupa.com/t/string-variables/2889>\
**Category:** flash\
**Created:** [March 16, 2002, 12:21pm UTC](https://forum.kirupa.com/t/string-variables/2889 "2002-03-16T12:21:43Z")\
**Posts on this page:** 5\
**Page:** 1

<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:** [March 16, 2002, 12:21pm UTC](https://forum.kirupa.com/t/string-variables/2889/1 "2002-03-16T12:21:43Z")

</div>

If i have an ASP page that is returning variables (and I can see them in the debugger) how do i consentrate a string to call that variable?\r\rie:\rvariables being returned are named:\r"res1", “res2”, “res3”…etc\r\rfor (var i = 0; i \< 10; i++) {\ritem.additem(“res” + i);\r}\r\rdo i use eval? that doesn’t seem to work:\reval(“res” + i)\r\rany help much appreciated…

---

<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:** [March 16, 2002, 5:13pm UTC](https://forum.kirupa.com/t/string-variables/2889/2 "2002-03-16T17:13:52Z")

</div>

this line:\ritem.additem(“res” + i);\rshould be this:\ritem.additem(\_root[“res” + i]);\r…i am assuming that ‘additem’ is a function in ‘item’ and that ‘res1’ is on the \_root timeline.\r:) \rjeremy

---

<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:** [March 16, 2002, 8:23pm UTC](https://forum.kirupa.com/t/string-variables/2889/3 "2002-03-16T20:23:30Z")

</div>

Thanks,\r\rI think my biggest problem was that the variables didn’t seem to be loading in time(?)\r\rIf I told the script to play frame 30 where the variables were displayed, nothing would appear in the text boxes…\r\rIf I told the script to play at one frame before the variables were displayed, they would appear…\r\rTiming…timing…timing…\r

---

<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:** [March 16, 2002, 10:45pm UTC](https://forum.kirupa.com/t/string-variables/2889/4 "2002-03-16T22:45:26Z")

</div>

Before playing something, use a false/true check on one last var which lets you check everything has loaded in, like lastVar=1, and if(lastVar==1) play…

---

<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:** [March 17, 2002, 5:00pm UTC](https://forum.kirupa.com/t/string-variables/2889/5 "2002-03-17T17:00:45Z")

</div>

Thanks to my fellow developers for their assistance, and putting up with my baby-step questions.
