DIFFICULT QUESTION :Need help using variables to control gotoandplay

I have made a small flash site, using the following “system”

on site are buttons to content screens. The buttons should change the variable “but” to the buttons name. and give the movie the order to go on playing (standstill when content screens are visible). When a certain frame is reached (end of fade out) the playmarker should jump to a different location depending what the variable “but” contains. The timeline looks like this : using 2 content screens as example.

1—5----10—15—20—25—30—35—40—45—50—55—60—65—
fade in home…home…fade out home…fade in info …info… fadeout info…

example scripts for 2 buttons : home and information

-home :
on (press) {
but = “home”;
}
on (release) {
play();
}

-information :
on (press) {
but = “info”;
}
on (release) {
play();
}

The script to redirect the play marker is on an empty keyframe and looks like:

if (but = “home”) {
gotoAndPlay(1);
}
if (but = “info”) {
gotoAndPlay(35);
}

This doesn’t seem to work, the movie doesn’t jump depending what button you pushed, it just plays on straight. I also found that you should “declare” a variable, But where must i do that? Anywhere at the beginning of the movie? In the same movie-clip or just in the same scene somewhere?