Friends,

This little bit of code is in a click event handler that among many other things is supposed to load and unload an image. Well, it loads the image just fine, but on the second click through the image remains. What am I missing?

Thanks.

Actionscript Code:
switch (clickNumber) {
        case 0 :
            var mainImageLoader:Loader = new Loader();
            mainImageLoader.load(new URLRequest("large/"+logoArray[firstCard]+".jpg"));
            addChild(mainImageLoader);
            mainImageLoader.x = 640;
            mainImageLoader.y = 65;
            clickNumber++;
            break;
        case 1 :
            removeChild(mainImageLoader);
            break;
        default :
            trace("ERROR: Not 0 or 1");
    }