Published in: ActionScript
This is a XML based slideshow that uses FuseKit for transitions.
import com.mosesSupposes.fuse.*; ZigoEngine.register(Fuse, PennerEasing, FuseFMP); function loadXML(loaded) { if (loaded) { xmlcontent = this.${1:firstChild}; loadPics(); } else { trace("file not loaded!"); } } xmlData = new XML(); xmlData.ignoreWhite = true; xmlData.onLoad = loadXML; xmlData.load(${2:"$3"}); function loadPics(){ if(picsint) clearInterval(picsint); if(!nexti) nexti = 0; targetpic = xmlcontent.{$4:childNodes[nexti].firstChild.nodeValue}; thepic_mc = ${5:pic_mc}.createEmptyMovieClip("thepic_mc", $5.getNextHighestDepth()); thepic_mc._x = 0; thepic_mc._y = 0; var my_mcl:MovieClipLoader = new MovieClipLoader(); var mclListener:Object = new Object(); mclListener.onLoadStart = function(target_mc:MovieClip) { trace("loading pic"); } mclListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) { } mclListener.onLoadComplete = function(target_mc:MovieClip) { } mclListener.onLoadInit = function(target_mc:MovieClip) { trace("load init"); picsint = setInterval(loadPics,${6:5000}); var f:Fuse = new Fuse(); f.push({target:target_mc, ${7:brightOffset}:${8:100}, time:0}); f.push({target:target_mc, $7:${9:0}, time:${10:2}, ease:"easeOutQuad"}); f.start(); } mclListener.onLoadError = function(target_mc:MovieClip, errorCode:String) { trace("error loading movie: " + errorCode); loadPics(); } my_mcl.addListener(mclListener); my_mcl.loadClip(targetpic, thepic_mc); nexti++; if(nexti >= xmlcontent.childNodes.length) nexti = 0; }
Comments
Subscribe to comments
You need to login to post a comment.

is there a link to the XML file associated with this?