[AS2] setting and passing a variable problem

hey people,

im trying to set up a variable passing system where once the user clicks a button it sets a variable and then once the movie hits a certain frame an if statement checks the variable and sends the user off in the direction depending on what the variable is.

here is the code on the button

[COLOR=Red]on(release) {
set(“global”, “variable1”);
}[/COLOR]

and here is the if statement

[COLOR=Red]if (global = “variable1”){
gotoAndPlay(“here”);
} else if (global = “variable2”){
gotoAndPlay(“thisplace”);
}[/COLOR]

the code seems to be working on the first part as the movie goes to the “here” part but i cant get it to go to the “thisplace” section. am i doing something wrong?

any help would be appreciated

thanks!