# Var snd:Sound = new this\["snd" + VariableValue\]();

**URL:** <https://forum.kirupa.com/t/var-snd-sound-new-this-snd-variablevalue/331735>\
**Category:** Uncategorized\
**Created:** [October 9, 2013, 12:17am UTC](https://forum.kirupa.com/t/var-snd-sound-new-this-snd-variablevalue/331735 "2013-10-09T00:17:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nightkarnation](https://avatars.discourse-cdn.com/v4/letter/n/a5b964/32.png) [@nightkarnation](https://forum.kirupa.com/u/nightkarnation)\
**Post date:** [October 9, 2013, 12:17am UTC](https://forum.kirupa.com/t/var-snd-sound-new-this-snd-variablevalue/331735/1 "2013-10-09T00:17:17Z")

</div>

Hey guys,  
I have a simple question…

I want to create a sound variable depending on the numeric value of another int variable…  
meaning: automatize the currentSnd variable depending of the soundValue  
example:

```auto

var soundValue:int;
soundValue = 3;
var currentSnd:Sound = new this["snd" + soundValue] (); //<--- not working, but something like this
//instead of the working code:
// var currentSnd:Sound = new snd3 ();

```

(snd1, snd2, snd3, etc…are already exported to actionscript with those names…)

Thanks a lot in advance!  
Cheers,
