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

import mx.transitions.Tween AS 2.0

Estas en el tema de import mx.transitions.Tween AS 2.0 en el foro de Flash y Actionscript en Foros del Web. Hola! Tengo el siguiente flash: El caso que no se como poner el título ("AUDI", en este caso) abajo de la imagen... Este es el ...
  #1 (permalink)  
Antiguo 26/10/2010, 13:37
Avatar de NaRanJiTo78  
Fecha de Ingreso: noviembre-2007
Ubicación: In the BeaCh
Mensajes: 874
Antigüedad: 16 años, 5 meses
Puntos: 10
Pregunta import mx.transitions.Tween AS 2.0

Hola!

Tengo el siguiente flash:



El caso que no se como poner el título ("AUDI", en este caso) abajo de la imagen...

Este es el código que tengo:

Cita:
//
lstThumb.onLoadInit = function(mc:MovieClip) {
mc._parent.pre._visible = false;
var aimg:Tween = new Tween(mc, "_alpha", Regular.easeOut, 0, 100, 10, false);
mc._width = 80;
mc._height = 60;
};
mclThumb.addListener(lstThumb);

//
lstImg.onLoadStart = function(mc:MovieClip) {
mc._alpha = 0;
pre.bar._xscale = 0;
pre._visible = true;
};

lstImg.onLoadProgress = function(mc:MovieClip, loaded:Number, total:Number) {
var pct:Number = (Math.round()*10000);
pre.bar._xscale = pct;
};

lstImg.onLoadInit = function(mc:MovieClip) {
pre._visible = false;
mc._x = (stageWidth-mc._width)/2;
mc._y = (stageHeight-mc._height)/2;
var amc:Tween = new Tween(mc, "_alpha", Regular.easeOut, 0, 100, 1, false);
amc.onMotionFinished = function() {
var cpt:String = new String(fn[randomImagePosition].attributes.caption);
if (cpt == undefined || cpt == "undefined" || cpt == "") {
caption._y = (y=300);
} else {
caption.value = cpt;
alphaTw = new Tween(caption, "_y", Regular.easeOut, caption._y, 20, 1, false);
}
};
};

mclImg.addListener(lstImg);

//
xml.ignoreWhite = true;

xml.onLoad = function(sucess) {
if (sucess) {
fn = xml.firstChild.childNodes;
total = fn.length;
for (var j:Number = 0; j<total; j++) {
var btn:MovieClip = menu.thumb.attachMovie("thumb", "thumb"+j, j);
btn._x = (btn._width+space)*j;
btn.id = j;
btn.onRollOver = function() {
this.border.gotoAndStop(5);
};
btn.onRollOut = function() {
this.border.gotoAndStop(4);
};
btn.onRelease = function() {
loadImg(this.id);
imagenActual = this.id;
};
mclThumb.loadClip(fn[j].attributes.thumb,btn.img);
}
loadImg(randomImagePosition);
} else {
trace("Error!");
}
setInterval(cambiaImagen,6000);
};

xml.load(xmlFile);

function cambiaImagen(){
//var aleatorio:Number = random(total);

if( direccion == 1 ){
if( imagenActual < total ) imagenActual++;
else imagenActual = 0;
}
else{
if( imagenActual > 0 ) imagenActual--;
else imagenActual = total-1;
}
loadImg(imagenActual);
}

function loadImg(id:Number) {
randomImagePosition = id;
for (var j:Number = 16; j<total; j++) {
menu.thumb["thumb"+j].enabled = true;
menu.thumb["thumb"+j].border.gotoAndStop(1);
menu.thumb["thumb"+j].thumbId._visible = false;
}
menu.thumb["thumb"+id].enabled = false;
menu.thumb["thumb"+id].border.gotoAndStop(3);
menu.thumb["thumb"+id].thumbId._visible = true;
menu.thumb["thumb"+id].thumbId.thumbId.text = menu.qtd.text=(randomImagePosition+16)+" OF "+(total);
var cy:Tween = new Tween(caption, "_y", Regular.easeOut, caption._y, -caption._height, 1, false);
var ha:Tween = new Tween(holder, "_alpha", Regular.easeOut, holder._alpha, 20, 1, true);
ha.onMotionFinished = function() {
mclImg.loadClip(fn[id].attributes.src,holder);
};
}

//
Alguien me puede ayudar?

Un saludo, muchas gracias!
  #2 (permalink)  
Antiguo 26/10/2010, 13:58
Avatar de NaRanJiTo78  
Fecha de Ingreso: noviembre-2007
Ubicación: In the BeaCh
Mensajes: 874
Antigüedad: 16 años, 5 meses
Puntos: 10
Respuesta: import mx.transitions.Tween AS 2.0

El título de arriba está definido como "caption"

Etiquetas: import
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 19:39.