Tema: button
Ver Mensaje Individual
  #5 (permalink)  
Antiguo 25/09/2003, 22:08
Avatar de BeN
BeN
 
Fecha de Ingreso: agosto-2003
Ubicación: Mexico, D.F.
Mensajes: 281
Antigüedad: 20 años, 8 meses
Puntos: 0
un amigo me paso esta funcion, es buenisima, solo pegen esto en el primer frame y mas abajo se ve como usarla:

// -----------------------------
// show tooltip over movie clips
// and buttons
// -----------------------------
// revised by b
// -----------------------------
//syntax:
//movieClip.setTooltip(string[,timer,textColor,backgroundColor,borderColor])
// -----------------------------
MovieClip.prototype.setTooltip = function(theText, timer, text_color, bg_color, border_color) {
timer == undefined ? 500 : timer;
var addMsg = function (theOb, theMsg, col, bg_color, border_color, level) {
//trace(theOb);
var x = _xmouse;
var y = _ymouse;
var f = new TextFormat("verdana", 9, col != undefined ? col : 0);
theOb.createTextField('tooltip', 123456, x, y, 150, 20);
with (theOb.tooltip) {
setNewTextFormat(f);
text = theMsg;
selectable = false;
autoSize = true;
background = true;
border = true;
borderColor = border_color != undefined ? border_color : 0;
backgroundColor = bg_color != undefined ? bg_color : 0xFFFFEE;
_y -= _height;
}
clearInterval(theOb.q_t);
};
this.q_t = setInterval(addMsg, timer, this, theText, text_color, bg_color, border_color, this);
};
// --------------------
// unset the tooltip
// --------------------
MovieClip.prototype.unsetTooltip = function() {
this.tooltip.removeTextField();
clearInterval(this.q_t);
};



:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
C O M O U S A R L A

En los eventos de un boton colocar:

on(rollOver){
setToolTip("Probando", 500, null, 0xFFFFFF, 0x00000);
}
on(rollOut){
unsetTooltip();
}
__________________
...everything under the sun is in tune
But the sun is eclipsed by the moon.