labs.insert-title.com

Simple Swish Tooltips

Fully scripted tooltips that can easily be applied to just about any object within your Swish movie.

The Script


function tooltip(str){
    showtt = (!_root.showtt);
    showtext=str;
    }
OnLoad(){

_root.createEmptyMovieClip("holder",0); 
    holder.createTextField("xxx",0, 0,0, 500, 18);
    ref=_root.holder.xxx;
    ref.Text = "tooltip";
    ref.border = false;

}
OnEnterFrame(){
        holder._visible = _root.showtt;
        holder.xxx.Text=_root.showtext;
        holder._X = _xmouse+15;
        holder._Y = _ymouse;        
    
    }

Usage

Plug the code above into the root of your movie, then lay down any objects.. buttons, sprites and add the following to the Rollover and Rollout events


onSelfEvent (rollOver) {
_root.tooltip("TOOLTIP TEXT HERE")
}
onSelfEvent (rollOut) {
_root.tooltip()
}

The Download

Download swish file





Discussion

lou

When you write: "Plug the code above into the root of your movie," Where in the Swish interface is the "root" of the movie? I am not sure where to place the script for the function

Joe Maddalone

Click on your scene (usually, Scene 1) and then click on the tab to switch to "Script" view. Above any other code plug this in.

Raheel

How can I change the color of the tooltip?

loop

Not work at me :?

New comments are currently disabled, you can find me @joemaddalone Comments temporarily disabled for now, you can find me @joemaddalone