hi

hope someone can help me...I am getting so confused at the moment.

I have a function which fades one mc's alpha to 0 and once it has reached 0 it fades mc two to an alpha of 100. This did work fine until I realised that I had only been testing it between two mc's and now that I have five mc it wont work.

any ideas....my script is:

function:

function fadeContent(targetA, targetB, destinationA, destinationB, fadespeed) {
targetA.onEnterFrame = function() {
var targAa = destinationA-targetA._alpha;
targAb = (targAb+targAa)/fadespeed;
targetA._alpha += targAb;
if (Math.round(targAa) == 0 && Math.round(targAb) == 0) {
delete targetA.onEnterFrame;
targetB.onEnterFrame = function() {
var targBa = destinationB-targetB._alpha;
targBb = (targBb+targBa)/fadespeed;
targetB._alpha += targBb;
if (Math.round(targBa) == 0 && Math.round(targBb) == 0) {
targetA = targetB;
delete targetB.onEnterFrame;
}
};
}
};
}

can someone please help me.