I'm trying to swap two variables in ActionScript.
I tried using:
a = 42
b = 50
tempvar = a
a = b
b = tempvar
to switch, but this doesn't work because the variables still reference the original value, so if I set b = a, and then change a, b changes as well.
in ruby, you have clone(), but I don't know a similar method for AS3.
Help?