Fading between frames

Hi again, my next problem is I want to have a function which I can call as
fadebgto(framelabel);

I found a function in the help, and have started to adapt it, below is as far as I’ve got, thing is it just runs as opposed to running when called as a function. (Function assumes the graphic in the frames, in the bg movieclip have an alpha of 0.


var alpha_interval:Number = setInterval(fadeImage, 50, bg);
function fadebgtoage(current_mc:MovieClip,target_frame:MovieClip):Void {
    current_mc._alpha -= 5;
    
    if (current_mc._alpha <= 0) {

        current_mc.gotoAndStop(target_frame);
        current_mc._alpha += 5;
        
        if(current_mc._alpha = 100){
        clearInterval(alpha_interval);
        }
    }
}

help appreciated!

anyone have any ideas?