import com.mosesSupposes.fuse.*; ZigoEngine.register(Fuse, PennerEasing, FuseFMP); var ph1:MovieClip = this.createEmptyMovieClip("ph1",1) var ph2:MovieClip = this.createEmptyMovieClip("ph2",2) var image:Number = 1; var f:Fuse = new Fuse(); var f2:Fuse = new Fuse(); var slowFadeOut:Object = { alpha:0, duration:3, ease:"easeInQuint" }; var slowFadeIn:Object = { alpha:100, duration:3, ease:"easeInQuint" }; loadPictures(); ph1.shown = true; ph2.shown = true; this.onEnterFrame = function() { loader._visible = true; bTotal = ph1.getBytesTotal(); bLoaded = ph1.getBytesLoaded() percent = bLoaded / bTotal * 100; percent = Math.round(percent); if(isNaN(percent)) { percent = 0; } loader.gotoAndStop(percent); if(percent >= 100) { loader._visible = false; delete this.onEnterFrame; ph1._x = 0; ph1._alpha = 0; f.push({target:ph1, action:slowFadeIn}); f.start(); startSlideShow = setInterval(slideShow, 6000); } } picLoader = setInterval(loadPictures, 1000); function loadPictures() { if(ph1.shown == true) { if(image < 10) { img = "0"+image; } ph1.loadMovie("images/image"+img+".jpg"); trace("Loading image "+img+" to ph 1"); image++; ph1.shown = false; ph1._visible = false; ph1._x = 1000; } if(ph2.shown == true) { if(image < 10) { img = "0"+image; } ph2.loadMovie("images/image"+img+".jpg"); trace("Loading image "+img+" to ph 2"); image++; ph2.shown = false; ph2._x = 1000; } } function slideShow() { if(ph1._x == 0) { trace("pictureswap ph1 with ph2"); ph2._alpha = 0; ph2._x = 0; f.push({target:ph1,action:slowFadeOut,func:'afph1'}); f2.push({target:ph2, action:slowFadeIn}); f.start(); f2.start(); } else if(ph2._x == 0) { trace("pictureswap ph2 with ph1"); ph1._alpha = 0; ph1._x = 0; f.push({target:ph1, action:slowFadeIn}); f2.push({target:ph2, action:slowFadeIn, func:'afph2'}); f.start(); f2.start(); } } function afph1() { trace("Doing AFTERFUSE on PH1"); ph1._x = 1000; ph1.shown = true; loadPictures(); } function afph2() { trace("Doing AFTERFUSE on PH2"); ph2._x = 1000; ph2.shown = true; loadPictures(); }