How to use Radio Buttons to make an object change colours?
I need to make a bouncing ball animation for a uni assignment, and then have 3 radio buttons that you can click to make the ball change to either blue, red or green.
I have put three Radio Button components on the stage with the instance names of "red" "blue" and "green", and the instance name of the object I want to change is "ball".
I know to transform an object's colour you use this code:
var myColorTransform = new ColorTransform ();
myColorTransform.color = 0xFF0000;
ball.transform.colorTransform = myColorTransform;
but how do I "attach" this to the radio button?