Traffic Light Question

Posted 24 March 2012 - 06:26 AM

Hey guys,

I am having a little problem with my code at the minute. I have my traffic light system set up so that when I click on the "Red" button, the red light lights up and the yellow and green dim down. The thing I want is, I want to be able to click on the circle that the colour is in, and not a button. And I am not too sure on how to do that....

Another feature I am trying to add is that when I click on a colour, it tells you the name of the colour you just clicked on, and what that colour means by the rules of the road. So when the user clicks on the green circle, it will tell them in a textbox that they have clicked on Green, and that it means it is Ok to drive off now, etc... I can do this bit myself I think!

So if somebody could please help me with that, it would be much appreciated!

Re: Traffic Light Question

Posted 24 March 2012 - 11:08 AM

Dangit! Lost a post. Oh well, here it goes again . . .

MouseActionHandler is an example name of a class that you would write to handle mouse actions. You can use that name or any other you like, but if using that name, a skeleton of what that class might look like is here: