# Dynamic variables?

**URL:** <https://forum.kirupa.com/t/dynamic-variables/84242>\
**Category:** Uncategorized\
**Created:** [March 25, 2005, 5:43pm UTC](https://forum.kirupa.com/t/dynamic-variables/84242 "2005-03-25T17:43:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dshallenberger](https://avatars.discourse-cdn.com/v4/letter/d/ecccb3/32.png) [@dshallenberger](https://forum.kirupa.com/u/dshallenberger)\
**Post date:** [March 25, 2005, 5:43pm UTC](https://forum.kirupa.com/t/dynamic-variables/84242/1 "2005-03-25T17:43:12Z")

</div>

I hope this makes sense…

I have 12 photos that I want to show at random, and they are named photo01.jpg through photo12.jpg. I’ve made clips of each photo and named them the same way. I can generate a random number between 1 and 12, but I can’t seem to get the script to put the random number and a string together. I want to use movie clip ‘drPhoto08’ by combining the string ‘drPhoto’ with the variable containing the random number, but I just can’t seem to get it.

I’ve tried using eval, but that’s totally wrong. I’ve tried ‘newClip = “drPhoto” + rndImage;’, but that didn’t work.

Please help! Thanks so much!

Dan
