# \[As3\] Variable name from another variable

**URL:** <https://forum.kirupa.com/t/as3-variable-name-from-another-variable/211052>\
**Category:** flash\
**Created:** [December 26, 2006, 3:24pm UTC](https://forum.kirupa.com/t/as3-variable-name-from-another-variable/211052 "2006-12-26T15:24:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Broly](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@Broly](https://forum.kirupa.com/u/Broly)\
**Post date:** [December 26, 2006, 3:24pm UTC](https://forum.kirupa.com/t/as3-variable-name-from-another-variable/211052/1 "2006-12-26T15:24:41Z")

</div>

Hi all,  
I’m new in this forum 🙂  
I’ve a problem in the Actionscript 3 Flash 9 Alpha.

I’m trying to give to a variable a name taken from another variable, for example

a = “pippo”  
this[a] = 10  
trace(pippo)

and this

b=1  
this[“pippo”+b] = 10  
trace(pippo1)

works in Actionscript 2…but it doesn’t work in Actionscript 3.  
I tried in many ways but it doesn’t work ☹

Any help will be appreciated 🙂

Thanks!
