Passing value from checkbox component to loadVars object

Hi, I’ve done a search but can’t find the answer to this.

I want to pass the value of a checkbox in a survey to a loadVars object to be sent to a PHP form.

I have a checkbox on the stage with the instance name button5a. I’ve read that I can’t use getValue for checkboxes, and that I have to use a listener object. So I have:


submit_btn.onRelease = function(){
    var questionVar:LoadVars = new LoadVars();
    questionVar.question5a = "";

var checkboxListener = new Object();
checkboxListener.click = function (evt){
    questionVar.question5a = "Interviews";
}
button5a.addEventListener("click", checkboxListener);

questionVar.sendAndLoad("http://www.mysite/insert.php", questionVar, "POST");
    questionVar.onLoad = function(){
        gotoAndPlay(2);
    }
}

When the checkbox is selected I want to give the loadVars object the information “Interviews”. But it just returns a blank value.

I’ve cobbled this code together from different tutorials and I’m guessing at it really!
Any help on what I should be doing appreciated.