Quiz text box HELP

Hi, creating a quiz and with one question i have a text feild for an answer using the text input component

the code on the frame for this is as follows

function score7() {
    AnswerQ7 = Q7_txt.text;
    if (AnswerQ7 == "gotoAndStop(5)" ) {
        userScore++;
    }
}

with the component labled Q7_txt the userScore does not update on the next frame?
what can i do ? any other code to use ?