Copy link to clipboard
Copied
I have a map which has red button symbols on it.
When a user rolls over the button symbol, text appears describing the location.
The problem is that the text placed in the OVER event of the button causes that area of the map to also act as a hotspot area.
In the above example - the text appeared as soon as the mouse hovered over the text area instead of just the button area.
How can I prevent this as I would like to make this more elaborate.
Thank you in advance
If you put the text only in the over frame and have the rest of the button contents defined for the hit frame, the text should not be involved with the rollover.
Another approach would be to have the text as a separate object (MovieClip or Sprite) and control its visible property based on rollover and rollout of the button.
Copy link to clipboard
Copied
If you put the text only in the over frame and have the rest of the button contents defined for the hit frame, the text should not be involved with the rollover.
Another approach would be to have the text as a separate object (MovieClip or Sprite) and control its visible property based on rollover and rollout of the button.
Copy link to clipboard
Copied
Thank you for the feedback
Actually I had not set the hit event in some cases and the text was also present in those also, so the text area in the said hit event also acted as the hit area.
Purely a beginners error! Surely...
Thank you
Copy link to clipboard
Copied
You're welcome. For a beginner it's not an error... it's a something learned.
Copy link to clipboard
Copied
You need separate text as a Object and point as another Object, both in the same Moviclip (myMC)
where point have a name like pnt then
myMC.pnt.addEventListener(MouseEvent.ROLL_OVER, actionOver)
instead
myMC.addEventListener(MouseEvent.ROLL_OVER, actionOver)
Find more inspiration, events, and resources on the new Adobe Community
Explore Now