So I have a site whose owner wants pitcures fading in and out on the main page. I have the code that loads the pictures and changes them every 5 seconds, but it is a quick change. How could I fade one picture in while fading another one out? Thanks for the help, and here is my code thus far:
_root.createEmptyMovieClip("pload",1);
//**************************************
//Load XML File
//**************************************
pArray=new Array();
my_xml=new XML();
my_xml.ignoreWhite=true;
my_xml.onLoad = function(success){
if(success){
for(var i=0; i<this.firstChild.childNodes.length; i++){
pArray_l = this.firstChild.childNodes.length;
pArray.push(this.firstChild.childNodes*.attributes.pic);
}
}
load_home();
};
my_xml.load("pic.xml");
//**************************************
//Load Function Definition
//**************************************
function load_home(){
if(delay){
clearInterval(delay);
}
var j=Math.floor(Math.random()*pArray_l);
pload._x=0;
pload._y=0;
pload.loadMovie(pArray[j]);
delay=setInterval(load_home,5000);
}