removeMovieClip()

My Code:


//Pic Number
var picNumber:Number = 1;
preload.onLoadComplete = function(targetMC:MovieClip) {
    hideLoad();
    var myPic = "pic"+picNumber+"_mc";
    targetMC.active = true;
    targetMC.onRelease = function() {
        if(this.active == true) {
            _root.attachMovie("myPic", myPic, _root.getNextHighestDepth());
            targetMC.active = false;
        }
        else {
            _root.myPic.removeMovieClip();
            targetMC.active = true;
        }
    }
    picNumber++;
    play();
};

How can I make ‘myPic’ work as the Variable Name - Not the Instance Name…
Eg: myPic should = pic1_mc, the instance name… But instead it thinks myPic is the instance name when it isn’t :frowning:

Anyone able to help please?