I have 10 different balls all randomly moving around on the screen.
I would like to display the name of a ball (from an array, hopefully, but I'm not sure how to read in array and do that either) and have the user click on the ball whose name is displayed. Then, I need to evaluate the mouse click - did the user click the right ball (give a success sound and blow up the ball) or not (bad sound).
Right now all the balls are instances of one graphic. I can't see how I can evaluate the mouse click to determine whether or not the user has clicked the right ball. The mouse click event only accepts the graphic 'ball', not the instances. I know I can add a custom variable to each ball instance, but I don't see how (with the mouse click) to evaluate whether it is the right one that has been clicked or not. This is probably fairly easy to do (once you know how!).
Any tips on how to do this?