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:
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.