Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/12/2005, 17:20
Avatar de julio archila
julio archila
 
Fecha de Ingreso: marzo-2005
Ubicación: Quetzaltenango, Guatemala
Mensajes: 272
Antigüedad: 19 años, 1 mes
Puntos: 0
Hola fastlane.

aca como hacer un tooltip

crea un archivo .as y colocale este codigo :

Código:
function init() {
	_root.c = _root.getNextHighestDepth();
	_root.createEmptyMovieClip("tooltip", _root.c);
	_root.tooltip.createTextField("alt", _root.c+3, 0, 0, 10, 10);
	with (_root.tooltip.alt) {
		autoSize = true;
		border = false;
		background = false;
		backgroundColor = (0x666666);
		html = true;
		selectable = false;
	}
	_root.formato = new TextFormat();
	_root.formato.color = "0xffffff";
	_root.formato.bold = false;
	_root.formato.font = "FFF Galaxy";
	_root.formato.size = "8";
	_root.tooltip.createEmptyMovieClip("sombra", _root.c+1);
	_root.tooltip.createEmptyMovieClip("fondo", _root.c+2);
	_root.tooltip._visible = false;
}
function cambia(texto) {
	_root.tooltip._x = _xmouse+4;
	_root.tooltip._y = _ymouse-24;
	_root.tooltip.onEnterFrame = function() {
		_root.tooltip._x = _xmouse+4;
		_root.tooltip._y = _ymouse-24;
	};
	_root.tooltip.alt.text = texto;
	_root.tooltip.alt.setTextFormat(_root.formato);
	with (_root.tooltip.sombra) {
		clear();
		ancho = _root.tooltip.alt._width;
		alto = _root.tooltip.alt._height;
		beginFill(0x000000, 30);
		moveTo(0, 0);
		lineTo(ancho+3, 0);
		lineTo(ancho+3, alto+3);
		lineTo(16, alto+3);
		lineTo(0, alto+7);
		lineTo(0, alto+3);
		lineTo(0, 0);
		endFill();
		_x = 0;
		_y = 0;
	}
	with (_root.tooltip.fondo) {
		clear();
		ancho = _root.tooltip.alt._width;
		alto = _root.tooltip.alt._height;
		lineStyle(1, 0xffffff, 100);
		beginFill(0x006699, 50);
		moveTo(0, 0);
		lineTo(ancho, 0);
		lineTo(ancho, alto);
		lineTo(15, alto);
		lineTo(-2, alto+6);
		lineTo(0, alto);
		lineTo(0, alto);
		lineTo(0, 0);
		endFill();
		_x = 0;
		_y = 0;
	}
	_root.tooltip._visible = true;
}
function para() {
	delete _root.tooltip.onEnterFrame;
	_root.tooltip._visible = false;
}
lo guardas y luego en tu pelicula en la linea de tiempo colocas este codigo:

Código:
#include "tooltip.as"
/// inicio de la funcion de "tooltip" ///
init();
luego en cada boton colocas este codigo :

Código:
on(rollOver){
cambia(" Tu Texto Aqui ");
}
on(rollOut){
para();
}
espero te sea de mucha ayuda....

saludos ...
__________________
Julio Archila