Foros del Web » Creando para Internet » Flash y Actionscript »

cambiar el color de Etiquetas

Estas en el tema de cambiar el color de Etiquetas en el foro de Flash y Actionscript en Foros del Web. Hola a todos: Necesito vuestra ayuda, tengo unas etiquetas que aparecen cuando paso el cursor por unos puntos (estos puntos son clip de peliculas co ...
  #1 (permalink)  
Antiguo 15/01/2007, 07:50
 
Fecha de Ingreso: enero-2007
Mensajes: 4
Antigüedad: 17 años, 3 meses
Puntos: 0
cambiar el color de Etiquetas

Hola a todos: Necesito vuestra ayuda, tengo unas etiquetas que aparecen cuando paso el cursor por unos puntos (estos puntos son clip de peliculas co n nombre de instancia area2_mc), para que aparezcan las etiqetas escribo estas acciones.

Cita:
this.area2_mc.onRollOver = function() {
myToolTip.show("Área II. Etnografía local");
planoA2_mc.gotoAndPlay("play");
area2_mc.useHandCursor=false;
}
this.area2_mc.onRollOut = function(){
myToolTip.ocultar();
planoA2_mc.gotoAndStop("stop");
}
Mi problema es que quiero que cambien el color en cada clip de pelicula, y no se como hacerlo.
Las etiquetas son un clip de pelicula (myToolTip), y la linea de tiempo de este clip tengo estas acciones.

Cita:
fadeVel = 20;
maxAlpha = 100;
shadow = true;
embedFonts = false;
shadowX = -2;
shadowY = 2;
//
//
//--
myToolTip = this;
line = [[l1, m1, r1], [l2, m2, r2], [l3, m3, r3]];
col = [[l1, l2, l3], [m1, m2, m3], [r1, r2, r3]];
//
align = function () {
for (h=0; h<2; h++) {
obj = (h) ? col : line;
for (i=0; i<obj.length; i++) {
for (j=0; j<obj[i].length; j++) {
if (h) {
obj[i][j]._x = obj[i-1][j]._x+obj[i-1][j]._width;
} else {
obj[i][j]._y = obj[i-1][j]._y+obj[i-1][j]._height;
}
}
}
}
};
size = function (arg1, arg2) {
for (i=0; i<col[1].length; i++) {
col[1][i]._width = arg1-col[0][0]._width/2-col[2][0]._width/2;
}
for (i=0; i<line[1].length; i++) {
line[1][i]._height = arg2-line[0][0]._height/2-line[2][0]._height/2;
}
};
show = function (arg, arg2) {
if (arg) {
myToolTip.swapDepths(_parent.getNextHighestDepth() );
trace(myToolTip.getDepth());
clearInterval(fade);
textBoxMc.textBox.background = false;
textBoxMc.textBox.border = false;
textBoxMc.textBox.html = true;
textBoxMc.textBox.wordWrap = false;
textBoxMc.textBox.multiline = true;
textBoxMc.textBox.htmlText = arg;
textBoxMc.textBox.autoSize = true;
textBoxMc.textBox.embedFonts = embedFonts;
textBoxMc._visible = (embedFonts) ? 1 : 0;
textBoxMc._x = Math.round(line[0][0]._width/2)+3;
textBoxMc._y = Math.round(line[0][0]._height/2);
size(Math.round(textBoxMc.textBox._width)+6, Math.round(textBoxMc.textBox._height));
align();
if (shadow) {
makeShadow();
} else {
removeShadow();
}
position();
drag = setInterval(position, 20);
myToolTip._alpha = 0;
myToolTip._visible = 1;
fade = setInterval(fadeIn, 20);
useTimer = false;
if (arg2) {
useTimer = true;
iniTimer = getTimer();
timer = arg2;
}
}
};
hide = function () {
clearInterval(drag);
clearInterval(fade);
myToolTip._alpha = maxAlpha;
fade = setInterval(fadeOut, 20);
useTimer = false;
};
position = function () {
myToolTip._x = Math.round((_root._xmouse+myToolTip._width>Stage.w idth+4) ? _root._xmouse-myToolTip._width : _root._xmouse);
myToolTip._y = Math.round((_root._ymouse+myToolTip._height+23>Sta ge.height+4) ? _root._ymouse-myToolTip._height : _root._ymouse+23);
if (getTimer()-iniTimer>=timer && useTimer) {
hide();
}
};
fadeIn = function () {
if (myToolTip._alpha+fadeVel>=maxAlpha) {
myToolTip._alpha = maxAlpha;
clearInterval(fade);
textBoxMc._visible = 1;
} else {
myToolTip._alpha += fadeVel;
}
};
fadeOut = function () {
myToolTip._alpha -= fadeVel;
textBoxMc._visible = (embedFonts) ? 1 : 0;
if (myToolTip._alpha<=0) {
clearInterval(fade);
myToolTip._visible = 0;
}
};
makeShadow = function () {
depth = 0;
for (i=0; i<line.length; i++) {
for (j=0; j<line[i].length; j++) {
depth++;
obj[i][j].swapDepths(100+depth);
obj[i][j].duplicateMovieClip("sh"+depth, depth);
myColor = new Color(myToolTip["sh"+depth]);
myColor.setRGB(0x000000);
myToolTip["sh"+depth]._alpha = 20;
myToolTip["sh"+depth]._x += shadowX;
myToolTip["sh"+depth]._y += shadowY;
}
}
textBoxMc.swapDepths(200);
};
removeShadow = function () {
depth = 0;
for (i=0; i<line.length; i++) {
for (j=0; j<line[i].length; j++) {
depth++;
myToolTip["sh"+depth].removeMovieClip();
}
}
textBoxMc.swapDepths(200);
};
colorTransform = function (a1, a2, a3, a4, a5, a6, a7, a8) {
for (i=0; i<line.length; i++) {
for (j=0; j<line[i].length; j++) {
my_color = new Color(line[i][j]);
myColorTransform = new Object();
myColorTransform = {ra:a1, rb:a2, ga:a3, gb:a4, ba:a5, bb:a6, aa:a7, ab:a8};
my_color.setTransform(myColorTransform);
}
}
};
resetColor = function () {
colorTransform(100, 0, 100, 0, 100, 0, 100, 0);
};
defaultSettings = function () {
fadeVel = 20;
maxAlpha = 100;
shadow = true;
embedFonts = false;
shadowX = -2;
shadowY = 2;
};
function ocultar(){
Out();
}
function Out(){
this._visible=false;
}
textBoxMc.textBox._x = textBoxMc.textBox._y=textBoxMc._x=textBoxMc._y=0;
myToolTip._x = Math.round(myToolTip._x);
myToolTip._y = Math.round(myToolTip._y);
myToolTip._xscale = myToolTip._yscale=100;
myToolTip._visible = 0;
Espero que puedan ayudarme, muchas gracias, Maite

Última edición por MaiteG; 15/01/2007 a las 09:16
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:16.