Input text/codes to Jump

I’m trying to make a movie so that when you enter a certain code or word it will jump to a certain part of the movie to play a video. I can’t seem to get it to work. it will jump to a place no matter what i have for my code in my input text box. This is my code on my button to submit.

on (release) {
if (answer = “dog”) {
gotoAndPlay(5);

}

}

answer is my instance name of my input text box and dog would be my code in this example

also i want to be able to have different words or codes go to different sections to play certain parts of my flash movie.

could anyone possibly help and tell me what is wrong or what i need to do

Thank you,

Jake