Tuesday, September 28, 2010

Easiest XML Slideshow Creator

SOURCE : http://www.flashmadblog.com/2010/09/25/easiest-xml-slideshow-creator/

AS3 XML Slideshow class by flashmad

Hi this is one of my class files i usually use. Just 3 lines of code makse an xml slideshow/fadeshow with editable speed and delay. What you need to do is import my class and write the code as below

import com.flashmadlab.imgFader;
var m:MovieClip = new imgFader(“images.xml”,2,3);
addChild(m);

And your as3 xml slideshow is ready if you have the images.xml is set in the below format


flash_images/1.jpg
flash_images/2.jpg

Below is the documented code and You can download the source files here : 3lineSlider_src


import com.flashmadlab.*;
var m:MovieClip = new imgFader(“images.xml”,2,5,{type:”slide”,width:null,height:null,preloader:null}); // type:”fade” or “slide” or “pngFade”
addChild(m);
//imgFader(xmlName:String,fadeDuration:Number,delayBetweenSlides:Number,[params]);
//type:”slide” can have 3 values
//type:”fade” for fading images instead sliding
//type:”pngFade” for png file fadeshow
//width:null can be replaced with a number ie:width:300 height can also be a number
//preloader:specify a movieClip name and it will scale on imageLoade Prgress.

And The demo here http://flashmadblog.com/preview_src/slideshow/

No comments:

Post a Comment