Using Switch

I am trying to use switch in a program I’m creating.

I want the user to enter a word into an input box then have the used click on a button. Depending on the input the program will go to another frame, i have used the following code but can’t get it to work.

Note: input box has Var = input

on (release) {
switch (input) {
case 0:
gotoandstop(3); break ;
case 2:
gotoandstop(4); break ;
case 4:
gotoandstop(5); break ;
case 8:
gotoandstop(6); break ;
default:
gotoandstop(7) ;
}
}

always goes to the default.

Any assistance would be greatly appreciated

Regards Rod