Script works 70% of the time!

:h: The following script works 70% of the time. I don’t have a clue as to why.

In a child MC for a button

_root.msgReveal(thisLocation+".Remove", true, false, true, "msgHide", false, thisLocation+".Remove");

Root

function msgReveal(msgString:String, btn1B:Boolean, btn2B:Boolean, btn3B:Boolean, command1:String, command2:String, command3:String) {
    msg.messageBox._visible = true;
    msg.messageBox.textF.htmlText = msgString;
    msg.messageBox.btn1._visible = false;
    msg.messageBox.btn2._visible = false;
    msg.messageBox.btn3._visible = false;
    if (btn1B) {
        msg.messageBox.btn1._visible = true;
    }
    if (btn2B) {
        msg.messageBox.btn2._visible = true;
    }
    if (btn3B) {
        msg.messageBox.btn3._visible = true;
    }
    msg.messageBox.btn1.onRelease = function() {
        this._parent._parent._parent.msg.messageBox.textF.text = command1;
        this._parent._parent._parent.callFunction(command1);
        //root[command1]();
    };
    msg.messageBox.btn2.onRelease = function() {
        this._parent._parent._parent.msg.messageBox.textF.text = command2;
        this._parent._parent._parent.callFunction(command2);
        //root[command2]();
    };
    msg.messageBox.btn3.onRelease = function() {
        this._parent._parent._parent.msg.messageBox.textF.text = command3;
        this._parent._parent._parent.callFunction(command3);
        //root[command3]();
    };
}
function callFunction(callUpon:String):Void {
    //root[callUpon]();
    eval(callUpon)();
    msg.messageBox.textF.text = callUpon;
}
function msgHide() {
    msg.messageBox._visible = false;
    msg.messageBox.textF.htmlText = "";
    msg.messageBox.btn1._visible = false;
    msg.messageBox.btn2._visible = false;
    msg.messageBox.btn3._visible = false;
}