PDA

View Full Version : Slide Show Flicker


mrand01
10-16-2003, 03:22 PM
I'm working on a slide show presentation, and I'm having a little problem. Each "slide" is a seperate .swf being loaded into an empty movieclip. There is a flicker between slides. I'm assuming this is because when you load another .swf into the empty clip, it unloads the old one, then loads the new one (if only it did this in reverse order...). The flicker is small, but still unacceptable. How can I get rid of this? There has to be a way to load another .swf and see no flicker.

The_Protector
10-16-2003, 03:37 PM
How about using two holders?....so one can be loading while the other is displayed..then just swap depths....

mrand01
10-16-2003, 03:44 PM
lol just thought of that, trying it now

EDIT: tried it, didn't work, I may be doing something wrong, check this out, its my loadSlide() function, does this look right?


function loadSlide(slideNumber, bgNumber) {
myProgress = slideNumber;
progress_txt.text = myProgress;
switch (bgNumber) {
case 1:
PPT_mc.bg1_mc._visible = false;
PPT_mc.bg2_mc._visible = true;
case 2:
PPT_mc.bg1_mc._visible = true;
PPT_mc.bg2_mc._visible = false;
}
PPT_mc.pl_mc._visible = true; //Set bottom movieclip visible to true
PPT_mc.fg_mc.swapDepths(PPT_mc.pl_mc); //Swap the depths of the two (am i doing this right?)
PPT_mc.fg_mc.loadMovie("slides/slide" + slideNumber + ".swf"); //load new movie into top level
PPT_mc.fg_mc.onLoad = function() {
PPT_mc.pl_mc._visible = false; //once its loaded, make bottom one invisible again.
}
sendToASP();
}

The_Protector
10-16-2003, 04:34 PM
hmm hard to tell without the fla...is it working at all?

mrand01
10-16-2003, 04:35 PM
sure, the slides switch, but you can still see the transition. I want it to be as fluid as possible. I'd send you the .fla, but it would be useless. It requires the 47 slide .swfs, 4 asp scripts, etc. Its pretty complex.

The_Protector
10-16-2003, 04:41 PM
Oh OK..well, I'll try to put together a quick example when i get home, hopefully that will help :)

mrand01
10-16-2003, 04:48 PM
that would be awesome, thanks mang

The_Protector
10-16-2003, 10:25 PM
Here's a quick example..probably could be more clean...


_root.createEmptyMovieClip("clip1",1);
_root.createEmptyMovieClip("clip2",2);
_root.clip1.swapDepths(10);//place clip1 in front to start
_root.current = _root.clip2;//set clip2 to accept next image
_root.n = 0;

imageArray = ["test1.jpg","test2.jpg","test3.jpg"];

loadNextImage = function(){
_root.current.loadMovie(imageArray[n]);
_root.onEnterFrame = function(){
if(_root.current.getBytesLoaded() == _root.current.getBytesTotal() && _root.current.getBytesTotal() > 4){
_root.current.swapDepths(10);
if(_root.current == _root.clip1){
_root.current = _root.clip2;
}else{
_root.current = _root.clip1;
}
delete _root.onEnterFrame;
}

}
if(_root.n+1==_root.imageArray.length){
_root.n = 0;
}else{
_root.n++
}
}

setInterval(loadNextImage,5000);




EDIT: The key is to make sure the image is done loading before swappong depths...