use the mouse position.....
I had a similar problem on my drum price list page...
DrumPrices (true sounds yet to be linked but it works)
I wanted a hand to stay in a picture of a drum, under the mouse position. When the mouse was clicked the hand would hit the drum, and play a sound depending on how close to the center of the circle it was.(bass to play at center and treble to play at rim)
I worked out the center of the drum, and made it mouse position 0,0. I found the radius and divided into three.
So then calculate the new mouse position from 0,0 (or the start of your stars pic), and if your mouse moves away from this point it works out its new position relative to the start.
So if your pic has 5 stars, each 10 pixels,
Get your mouse position,
take pic position from mouse position, this makes your mouse position 0,0 when at the top left of your pic
your 'radius' is 50 pixels
On your picture have a mousedown event containing an equation...
x=new position of mouse from (0,0) top of pic
number required = pixels from 0,0 divided by 10.
so if your mouse is above the 3rd star, its x position is 30-39, so divide this by 10, then get the Math.floor(number)
(this makes it a whole number,3) and thats your number.
hope this helps