Copy link to clipboard
Copied
Hi, I was just wondering does anyone know what code I would need to add to change the colour of myRedCircle when myBlueSquare is clicked?
The code I have already is below.
import flash.events.MouseEvent;
var myBlueSquare = new BlueSquare();
var myRedCircle = new RedCircle();
myBlueSquare.x= 50;
myBlueSquare.y=350;
myRedCircle.x=300;
myRedCircle.y=350;
myBlueSquare.addEventListener(MouseEvent.MOUSE_DOWN, doClick);
function doClick(e:MouseEvent):void
{
}
Copy link to clipboard
Copied
How is your RedCircle is designed? Does it have different frames showing different colors, or do you intend to just transform its color from one to another using code? If it's the latter, look into the ColorTransform class. If it's the former, explain more about the RedCircle.
Copy link to clipboard
Copied
I just intend to transform it's colour from one to another. Ok I will, thank you!