I did this little AS3 tutorial for a slide show using XML. It works but the fade time speeds up till it finally doesn't fade at all. The code is :
Code:
// import tweener
import caurina.transitions.Tweener;

const TIMER_DELAY:int = 5000;
const FADE_TIME:int =	5;

var currentContainer:Sprite;
var intCurrentSlide:int = -1;
var intSlideCount:int;
var slideTimer:Timer;
var sprContainer1:Sprite;
var sprContainer2:Sprite;
var slideLoader:Loader;
var strXMLPath:String = "slideshow-data.xml";
var xmlLoader:URLLoader;
var xmlSlideshow:XML;


function init():void {
	xmlLoader = new URLLoader();
	xmlLoader.addEventListener(Event.COMPLETE, onXMLLoadComplete);
	xmlLoader.load(new URLRequest(strXMLPath));
	
	slideTimer = new Timer(TIMER_DELAY);
	slideTimer.addEventListener(TimerEvent.TIMER, switchSlide);
	
	sprContainer1 = new Sprite();
	sprContainer2 = new Sprite();
	mcSlideHolder.addChild(sprContainer1);
	mcSlideHolder.addChild(sprContainer2);
	
	currentContainer = sprContainer2;
	
}
	
function onXMLLoadComplete(e:Event):void {
	xmlSlideshow = new XML(e.target.data);
	intSlideCount = xmlSlideshow..image.length();
	switchSlide(null);
}
	
function fadeSlideIn(e:Event):void {
	currentContainer.addChild(slideLoader.content);
	mcInfo.lbl_loading.text = "";
	Tweener.addTween(currentContainer, {alpha:1, time:FADE_TIME, onComplete:function() { slideTimer.start(); }});
}

function switchSlide(e:Event):void {
	if(slideTimer.running)
		slideTimer.stop();
	
	if(intCurrentSlide + 1 < intSlideCount)
		intCurrentSlide++;
	else
		intCurrentSlide = 0;
	if(currentContainer == sprContainer2)
		currentContainer = sprContainer1;
	else
		currentContainer = sprContainer2;
	currentContainer.alpha = 0;
	mcSlideHolder.swapChildren(sprContainer2, sprContainer1);
	slideLoader = new Loader();
	slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fadeSlideIn);
	slideLoader.load(new URLRequest(xmlSlideshow..image[intCurrentSlide].@src));
}

init();
and you can view it here http://www.justjunk4sale.com/lawrenc...idRoofing.html


Any ideas?