Hi guys,
I’m a new on Action script 3.0.
I would like ask about slide image show animation.
The slide show is a part of one big site. And following scripts are main code of slide show that somebody already made that we decompiled flash swf. We lost the original fla file in 4 years ago and we can’t find the flasher who made this site.
Then we have to edit this file now.
I want to add alpha “fade in” , “fade out” function when images play.
I don’t know how to add alpha fade animation with this.
Please help me and my team. Thank you. :
import gs.TweenLite;
import gs.easing.*;
import flash.events.MouseEvent;
import flash.utils.setTimeout;
import flash.utils.setInterval;
import flash.utils.clearInterval;
var idx:int;
var timeshift:int = 6000;
var sto:uint;
btn_1.addEventListener( MouseEvent.CLICK , moveFun );
btn_2.addEventListener( MouseEvent.CLICK , moveFun );
btn_3.addEventListener( MouseEvent.CLICK , moveFun );
swfIni();
function moveFun( e:MouseEvent ):void{
switch(e.target.name.substr(4)){
case "1":
gotoAndStop(1);
clearInterval(sto);
idx = 2;
sto = setTimeout(gogo,timeshift);
break;
case "2":
gotoAndStop(2);
clearInterval(sto);
idx = 3;
sto = setTimeout(gogo,timeshift);
break;
case "3":
gotoAndStop(3);
clearInterval(sto);
idx = 1;
sto = setTimeout(loop,timeshift);
break;
}
}
function loop() : void
{
dispatchEvent(new Event(Event.COMPLETE));
}
function swfIni() : void
{
clearInterval(sto);
idx = 1;
gogo();
}
function gogo( ) : void
{
gotoAndStop(idx);
clearInterval(sto);
idx++;
if(idx > 3){
idx = 1;
sto = setTimeout(loop,timeshift);
}else{
sto = setTimeout(gogo,timeshift);
}
}
stop();