Hi,
i’m trying to created a seamless loop of fading images using actionscript. With the AS i’m using it fades out the last image then fades in the first image again so there is a gap between the last and the first image.
I’d like the last image to fade into the first image seamlessly without a gap.
I’m using tweenlite but would take suggestions of other options
Below is my code:
import gs.TweenLite;
function startShow():Void {
image1._alpha = 0; // start faded down
TweenLite.to(image1, 1, {_alpha:100});
TweenLite.to(image1, 1, {_alpha:0, delay:3, overwrite:false});
image2._alpha = 0; // start faded down
TweenLite.to(image2, 1, {_alpha:100, delay:3, overwrite:false});
TweenLite.to(image2, 1, {_alpha:0, delay:6, overwrite:false});
image3._alpha = 0; // start faded down
TweenLite.to(image3, 1, {_alpha:100, delay:6, overwrite:false });
TweenLite.to(image3, 1, {_alpha:0, delay:9, overwrite:false});
image4._alpha = 0; // start faded down
TweenLite.to(image4, 1, {_alpha:100, delay:9, overwrite:false});
TweenLite.to(image4, 1, {_alpha:0, delay:12, overwrite:false});
image5._alpha = 0; // start faded down
TweenLite.to(image5, 1, {_alpha:100, delay:12, overwrite:false});
TweenLite.to(image5, 1, {_alpha:0, delay:15, overwrite:false, onComplete:startShow, onCompleteScope:this});
}
startShow();