Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/12/2012, 19:59
peruweb
 
Fecha de Ingreso: mayo-2012
Mensajes: 7
Antigüedad: 12 años, 6 meses
Puntos: 0
Galeria de imagenes

Buenas noches con todos, espero que me puedan ayudar. en esta animación

http://www.ffiles.com/flash/photo_galleries/aires_photo_gallery_v3_2841.html

al pasar el cursor por las thumbnails y moverla hacia arriba desaparecen, pero al moverlas hacia abajo no desaparecen, lo que quiero es que tambien desaparescan. gracias por sus aportes
codigo actionscript:



import mx.transitions.Tween;
import mx.transitions.easing.*;

var lstThumb:Object = new Object();

var mclThumb:MovieClipLoader = new MovieClipLoader();

var lstImg:Object = new Object();

var mclImg:MovieClipLoader = new MovieClipLoader();

var stageHeight:Number = 520

var stageWidth:Number = 900;

var space:Number = 10;

var speed:Number = 1;

var xmlFile:String = "aires.xml";

var xml:XML = new XML(xmlFile);

var idAtual:Number = new Number();

var total:Number = new Number();

maskMc._width = stageWidth;

maskMc._height = stageHeight;

this.setMask(maskMc);

nextBtn._x = (stageWidth-space);

nextBtn._y = (stageHeight-nextBtn._height)/2;

prevBtn._x = space;

prevBtn._y = (stageHeight-prevBtn._height)/2;

pre._x = (stageWidth-pre._width)/2;

pre._y = (stageHeight-pre._height)/2;

menu._y = (stageHeight-10);

caption._y = (-caption._height);

//
lstThumb.onLoadInit = function(mc:MovieClip) {
mc._parent.pre._visible = false;
var aimg:Tween = new Tween(mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
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(loaded/total*100);
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, true);
amc.onMotionFinished = function() {
var cpt:String = new String(fn[idAtual].attributes.caption);
if (cpt == undefined || cpt == "undefined" || cpt == "") {
caption._y = (-caption._height);
} else {
caption.value = cpt;
var cy:Tween = new Tween(caption, "_y", Regular.easeOut, caption._y, 0, 1, true);
}
};
};

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(2);
};
btn.onRollOut = function() {
this.border.gotoAndStop(1);
};
btn.onRelease = function() {
loadImg(this.id);
};
mclThumb.loadClip(fn[j].attributes.thumb,btn.img);
}
loadImg(idAtual);
} else {
trace("Error!");
}
};

xml.load(xmlFile);

function loadImg(id:Number) {
idAtual = id;
for (var j:Number = 0; 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=(idAtual+1)+" OF "+(total);
var cy:Tween = new Tween(caption, "_y", Regular.easeOut, caption._y, -caption._height, 1, true);
var ha:Tween = new Tween(holder, "_alpha", Regular.easeOut, holder._alpha, 0, 1, true);
ha.onMotionFinished = function() {
mclImg.loadClip(fn[id].attributes.src,holder);
};
}

//
nextBtn.onRelease = function() {
idAtual>=total-1 ? idAtual=0 : idAtual++;
loadImg(idAtual);
};

prevBtn.onRelease = function() {
idAtual<=0 ? idAtual=(total-1) : idAtual--;
loadImg(idAtual);
};

//
this.onEnterFrame = function() {
if (!menu.hitTest(_root._xmouse, _root._ymouse)) {
var bm:Tween = new Tween(menu, "_y", Regular.easeOut, menu._y, (stageHeight-20), 1, true);
menu.thumb.scroll = false;
} else {
var bm:Tween = new Tween(menu, "_y", Regular.easeOut, menu._y, (stageHeight-menu._height), 1, true);
menu.thumb.scroll = true;
}
with (menu.thumb) {
if (_width>stageWidth) {
if (menu.thumb.scroll == true) {
_x = _x+((0-(_root._xmouse/stageWidth*(_width-stageWidth+10)-(1-_root._xmouse/stageWidth)*10))-_x)*speed/100;
}
} else {
_x = (stageWidth-_width)/2;
}
}
};

Stage.scaleMode = "noScale";
Stage.align = "TL";

Última edición por peruweb; 06/12/2012 a las 12:08