I am creating a slide show in MX 2004 that fades images in and out as you go to the next slide. When you move through it somewhat quickly, it works fine. However, if you wait say 20+ seconds to view the next slide, the fading out image flickers on its way out.
The images are linked movie clips which are entered into an array. My code is on all on the first layer (except for the empty movie clips), and the alpha tween is done via actionscipt.
Here is a sample of my code:
[color=Red]
//BEGIN IMAGE FADE-IN
// THIS FUNCTION LOADS THE NEXT MOVIE AND FADES IT IN
function fadeNextSlide(){
if (slides._alpha > 0){
setProperty(slides, _alpha, 0);
}
slides.attachMovie(slideShow*, “slide”, 1);
slides.setAlpha = 100;
theLast = i;
i++;
}
//END IMAGE FADE-IN
//THIS FUNCTION TELLS THE LAST IMAGE TO FADE OUT
function fadeLastSlide(){
if (lastImage._alpha < 100){
thisAlpha = getProperty(lastImage, _alpha);
lastImage._alpha = thisAlpha;
}
lastImage.attachMovie(slideShow[theLast], "slideOut", 1);
lastImage.setAlpha = 0;
}
//END IMAGE FADEOUT
function viewNext(){
if (i < slideShow.length){
fadeLastSlide();
fadeNextSlide();
}
}
//BUTTON CONTROLS
playButton.onRelease = function(){
viewNext();
}
[/color]
Here is the code on the empty move clips “lastImage” and “slides”:
[color=Red]
onClipEvent(enterframe){
// See if the aDest has been changed
if (this._alpha != setAlpha) {
this._alpha += (setAlpha+this._alpha)*.01;
}
}
[/color]
I cannot figure this out for the life of me. I’ve tried compressing the images, changing the time intervals of which the alpha properties change, and fading them in and out of 99%. Would anyone be able to explain what is happening and whether or not there is a fix for this? It just doesn’t make sense to me.
Thanks!