Actionscripted sound fade


function fadeSound(sound:Sound, fadeTo:Number):Void {
    var tmp:MovieClip = _root.createEmptyMovieClip("tmp_sound_fade"+Math.round(Math.random()*10000000), _root.getNextHighestDepth());
    if (sound == null) return;
    var diff:String;
    if (fadeTo<sound.getVolume()) diff = "l";
    if (fadeTo>sound.getVolume()) diff = "m";
    tmp.onEnterFrame = function():Void {
        switch (diff) {
            case "l" :
                sound.setVolume(sound.getVolume()-1);
                break;
            case "m" :
                sound.setVolume(sound.getVolume()+1);
                break;
        }
        if (sound.getVolume() == fadeTo) {
            delete this.onEnterFrame;
            this.removeMovieClip();
        }
    }
}

var mySound:Sound = new Sound();
mySound.attachSound("aww");
mySound.start();
fadeSound(mySound, 75);

_root.onMouseDown = function() {
    fadeSound(mySound, 85);
}

var mySound2:Sound = new Sound(this);
mySound2.attachSound("thememusicyo");
mySound2.start();
fadeSound(mySound2, 25);

for some reason this code I have isnt working correctly… anyone know of a solution?