Dynamic Tooltip

Tuesday, July 14th, 2009 | Game Examples AS2, Interface

This is a dynamic tooltip window script that sizes and positions itself based on tooltip content size and location on the screen. It calculates it’s own size and current location, and if outside of the stage, reposition itself to remain always visible.

Download Fla Sample

Download Fla Sample


Tags: , , , , ,

12 Comments to Dynamic Tooltip

StapledPuppet
August 4, 2009

There is one small problem which I notice, if you click and drag, the box stays on the cursor.

pradvan
August 4, 2009

Thanks Stapled, I updated the fla with a fix.

StapledPuppet
August 4, 2009

Sweet, thanks :)

gotbitey
August 5, 2009

I got a question… How do you make the boxes a link to another scene without the tooltip from the original box appear

pradvan
August 5, 2009

Hi gotbitey,

You can call the hideTooltip() function to hide the tooltip, before you use gotoAndStop to go to a different scene.

marion
September 21, 2009

Thanks for sharing this script. I’ve been able to adapt it on a movie I’m working on and it works well. However, I’m using attachMovie from a main .fla to bring this second movie in and I’m not sure how I should adapt the script so that it works from a different _root. I’ve tried this and _parent but neither worked.

marion
September 21, 2009

Don’t worry about my previous comment. I don’t think I’ve changed the script at all but today it’s working fine. Thanks you.

pradvan
September 21, 2009

Glad to hear that marion :)

jameldj
October 20, 2009

Hello,

the dynamic Tooltip (DT) is great and very useful for many applications. As a newbie, I start learning flash using AS3. I would like to work on the DT to treat it as a class or package. Any hint, advise or link to help me accomplish this task will be extremely appreciated.

I thank you in advance for your help.

Jamel

pradvan
October 25, 2009

jameldj,

It shouldn’t be too hard to convert this to AS3. Just use addChild instead of attachMovie to show/hide the tooltip.

JFlash
April 5, 2010

Hey, thanks alot for providing these.

One question, I’ve never really done it but how important is it to do this:

delete tootip_mc.onEnterFrame;
removeMovieClip(tooltip_mc);

Instead of just doing this:

removeMovieClip(tooltip_mc);

Cheers.

pradvan
April 6, 2010

Hi JFlash,
I believe that doing just removeMovieClip(tooltip_mc) would remove the onEnterFrame as well.

Leave a comment

You must be logged in to post a comment.