FORUMS: list search recent posts

Tooltips for beginners

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ashley M. Kirchner
Tooltips for beginners
on Jun 18, 2010 at 4:24:13 pm

Disclaimer first: I'm a complete Flash newbie ... yesterday was the first time I actually tried creating something in Flash and so far things are going ok. My goal is this:

- display an area map with markers you can hover over (DONE)
- when you hover over a marker a tooltip pops up (DONE)
- depending on the marker, a specific piece of information gets displayed ...

That last one is where I'm stuck. Right now, the markers are all using the same piece of code. I created a movie clip for the tooltip popup. For right now it's a very simple thing, frame one is empty and has a 'stop();' action on it. Frame 2 displays the pop-up graphic.

Each marker is a button and their action is:

on (rollOver) {
on (release, rollOut) {

(where MARKERNAME is a unique name for the tooltip instance)

This is great, the tooltips works when I hover over the buttons, everything's peachy. However, the problem here is that the tooltip clip is reused several times and so is the button. The only thing that changes is their instance name. Consequently, on the tooltip clip, I can't simply add the text I want to display on frame 2 because that would then remain the same across all the tooltips.

Ideally what I want to do is have an array of the actual text that goes on each tooltip and then somehow when a tooltip is triggered, it would then display the proper label.

And that's where I got lost ...

I'm happy to share the flash file with anyone who wants to look at it and give suggestions of how to do this. Like I said, being a complete flash newbie, this part is a little above my level of understanding. Once I see how it's done I can muddle my way through and try to figure it out.

Thanks all!

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved