# Join Variables to return a third?

**URL:** https://forum.kirupa.com/t/join-variables-to-return-a-third/273149
**Category:** flash
**Created:** [October 12, 2008, 6:39am UTC](https://forum.kirupa.com/t/join-variables-to-return-a-third/273149 "2008-10-12T06:39:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nikneven](https://avatars.discourse-cdn.com/v4/letter/n/41988e/32.png) [@nikneven](https://forum.kirupa.com/u/nikneven)
#### Post date: [October 12, 2008, 6:39am UTC](https://forum.kirupa.com/t/join-variables-to-return-a-third/273149/1 "2008-10-12T06:39:50Z")

</div>

I’ve got 3 variables called pSize1 = 15, pSize2 = 16, pSize3 = 17. I have some radio buttons that have the data: 1, 2, 3. depending on what radio button is pressed, I need to trace the data in either pSize1, pSize2, or pSize3.

So, if they user presses the first radio button, it returns data 1, how can I combine that with “pSize” to return 15, and not “pSize1”.

What i have tried so far:

```auto
var listenerObject:Object = new Object();
listenerObject.click = function(eventObj:Object):Void {
	thisSize = eventObj.target.selectedRadio.data
	trace("pSize"+thisSize)
};

sizeGroup.addEventListener("click",listenerObject);

```

that returns “pSize1” not 15.

Where have i gone so horribly wrong?  
Any help would be greatly appreciated.
