Question
Get name of instance under mouse
I've got a Mouse listener checking for all the onMouseUps. Is
there a way to find out the name of any instance (if any) that the
mouse is over when it comes up?
The only way that pops into my head is to iterate through all the instances on stage at the moment, if it is a movieclip (the only objects I'm interested in) do a hit test to see if the pointer was on it, and then use its name.
Not to hard, but just wondering if there is a more elegant way that I'm just not seeing.
The only way that pops into my head is to iterate through all the instances on stage at the moment, if it is a movieclip (the only objects I'm interested in) do a hit test to see if the pointer was on it, and then use its name.
Not to hard, but just wondering if there is a more elegant way that I'm just not seeing.