Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I stop text causing a rollover?

Participant ,
Jan 04, 2013 Jan 04, 2013

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.

Image1.jpg

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

TOPICS
ActionScript
755
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 04, 2013 Jan 04, 2013

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.

Translate
LEGEND ,
Jan 04, 2013 Jan 04, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 04, 2013 Jan 04, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 04, 2013 Jan 04, 2013
LATEST

You're welcome.  For a beginner it's not an error... it's a something learned.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 04, 2013 Jan 04, 2013

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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines