I have a slide show that displays 6 images and is suppose to do a fade in / fade out (not an overlap fade) between each image. The peculiar behavior is that when the movie is tested
locally by using “Test Movie”, the fades occur properly. However when the swf is viewed from the website, during the first cycle of the slideshow, the next image does NOT fade in. After the first cycle, the fade in occurs properly…
http://www.yangwenphotography.com/homepageslideshow.swf
import mx.transitions.Tween;
var nInterval:Number;
var count:Number = 0;
var currentImage:Number = 1;
var imageDuration:Number = 8;
this.createEmptyMovieClip("empty_mc",1);
_root.empty_mc.loadMovie("still_portfolio/0"+currentImage+".jpg");
mpty_mc._alpha=0;
var mcTween:Tween = new Tween( _root.empty_mc, "_alpha", Strong.easeOut, 0, 100, 1.0, true );
function counter(){
count++;
if(count>=imageDuration){
nextMovie(); // nextMovie is another function which does the changing of images.
clearInterval(nInterval);
count = 0;
nInterval = setInterval(counter, 1000);
}
}
nInterval = setInterval(counter, 1000);
function nextMovie(){
currentImage++;
if(currentImage > 6){
currentImage = 1;
}
var mcTween:Tween = new Tween( _root.empty_mc, "_alpha", Strong.easeIn, 100, 0, 1.0, true );
mcTween.onMotionFinished = function() {
_root.empty_mc.loadMovie("still_portfolio/0"+currentImage+".jpg");
var mcTween:Tween = new Tween( _root.empty_mc, "_alpha", Strong.easeOut, 0, 100, 1.0, true );
}
}
thanks
Yang