rename a system variable?

Hi all, i want to resize transform.localScale.x or Y or Z, depending on user input, it works with 3 if statements to select x/y/z, but if i try the following, it uses the wrong variable. Is it possible to select x/y/z using an array?

			var cls1  = [   childs[ws].transform.localScale.x , childs[ws].transform.localScale.y , childs[ws].transform.localScale.z ];
			cls1 [userSelectorSlider % 3]  *= 2;
             // it doesnt resize the gameobject because cls1[] is a variable.

this works:

			if (userSelectorSlider  % 3 ==   0)   {    childs[ws].transform.position.x *= 2;  } // Yodamod
			if (userSelectorSlider % 3 ==   1)   {    childs[ws].transform.position.y *= 2;        }//best sym axis = y
			if (userSelectorSlider % 3 ==   2)   {   childs[ws].transform.position.z *= 2;        }

Your code is… interesting. It’s pretty hard to even say what language it’s meant to be written in.
For starters, you should type all your variables - if cls and cls1 are meant to be Vector3s, then declare them as such - at the moment they’re just generic arrays (which, as you’ve noticed, you cannot simply multiply).

var cls1 : Vector3 = new Vector3(   childs[ws].transform.localScale.x , childs[ws].transform.localScale.y , childs[ws].transform.localScale.z);
// Can't work out what you're trying to do with the sizemod.
cls1 *= 2.0f;

Your code is quite odd, but I think you want something along the lines of:

var selection : int = userSelectorSlider % 3;
var position : Vector3 = childs[ws].transform.position;
position[selection] *= 2;
childs[ws].transform.position = position;

My javascript is quite rusty so some of the syntax might be a bit off.