Is there an easier way?

Hello again and Happy Thanksgiving!
I went missing from the game salad community (the best community on the web) for around 6 months but finally have the time again to begin my work.
Ok, so I'm working on a game and I have this ball that I would like to be different colors when something is pressed.
Here is the code I am using

Is there an easier way to do it? and if so would any of you mind sharing?
I went missing from the game salad community (the best community on the web) for around 6 months but finally have the time again to begin my work.
Ok, so I'm working on a game and I have this ball that I would like to be different colors when something is pressed.
Here is the code I am using

Is there an easier way to do it? and if so would any of you mind sharing?
Comments
and then use change attribute instead of change image and set the image name attribute to "ball"..game.ball..".png"
Name your images 1, 2, and 3. (.png)
and then do this:
`
Load Attribute "game.ball" Attribute "game.ball#"
Change Attribute "self.image" to (game.ball#..".png")
`
(do not use parenthesis, but use the two dots, and the quotes, and the .png)
This should do the trick...
If you want it to constantly check, you can use constrain, or a timer, or put it in some sort of rule, but how it is right now, it will change the image as soon as it loads.
Hope this helps!!!
Happy Thanksgiving!
~CTM
change attribute;
self.color --> R/G/B
Just make the original image as white as you can and use change attribute to change its color..
~CTM