Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/02/2007, 10:10
Natura
 
Fecha de Ingreso: julio-2006
Mensajes: 69
Antigüedad: 17 años, 9 meses
Puntos: 0
Código para cambiar color de texto

Hola a todos, estoy siguiendo un tutorial para hacer "Tooltips", está bastante claro pero como no manejo bien el .as hay algo que no puedo hacer: necesito cambiar el color del texto, quiero que este sea blanco y en el tutorial sale negro.

Veo esto:

Código:
backgroundColor = 0xE1E1E1;
pero es para cambiar el color del fondo del tooltip y acá:

Código:
beginFill(0xFFFFFF, 0);
es para cambiar el color de la sombra, yo le he puesto visibilidad 0 porque no quiero que tenga sombra pero ¿dónde cambio el color del texto? No lo veo por ningún lado. Acá anoto el código completo.

Código:
function init() {   _root.c = _root.getNextHighestDepth();   _root.createEmptyMovieClip("tooltip", _root.c);   
_root.tooltip.createTextField("alt", _root.c+2, 0, 0, 10, 10);   
with (_root.tooltip.alt) {      
autoSize = true;      
border = false;      
background = true;      
backgroundColor = 0xE1E1E1;      
html = true;      
selectable = false;   
}   
_root.formato = new TextFormat();   
_root.formato.font = "tahoma";   
_root.formato.size = "11";   
_root.tooltip.createEmptyMovieClip("sombra", _root.c+1);   _root.tooltip._visible = false;
}
function cambia(texto) {   
_root.tooltip._x = _xmouse+8;   
_root.tooltip._y = _ymouse-18;   
_root.tooltip.onEnterFrame = function() 
{      
_root.tooltip._x = _xmouse+8;      
_root.tooltip._y = _ymouse-18;   
};   
_root.tooltip.alt.text = texto;   
_root.tooltip.alt.setTextFormat(_root.formato);   
_root.tooltip._visible = true;   
with (_root.tooltip.sombra) {      
clear();      
ancho = _root.tooltip.alt._width;      
alto = _root.tooltip.alt._height;      
beginFill(0xFFFFFF, 0);      
moveTo(0, 0);      
lineTo(ancho, 0);      
lineTo(ancho, alto);      
lineTo(0, alto);      
lineTo(0, 0);      
endFill();      
_x = 3;      
_y = 3;   
}
 }
function para() {
   delete _root.tooltip.onEnterFrame;   
_root.tooltip._visible = false;}
Muchas gracias