Changing var value problem

I can´t belive it my third post en the same day (must be somekind of record).
My problem this time is the change of a variables value. Changing the value with an on (Press) in a button like this in the contact button.

[AS]
on (press) {
loadswf == contact;
gotoAndPlay(2);

}
[/AS]

in the second frame I have the following code

[AS]

if (loadswf == forum) {
loadMovie(“forum.swf”, “holder”);
}
if (loadswf == first) {
loadMovie(“first.swf”, “holder”);
}
if (loadswf == contact) {
loadMovie(“contact.swf”, “holder”);
}
[/AS]

The problem is that it doesn´t work the way I´d like it only loads the last statement (in this case the contact.swf ) and I can´t find the problem so i turn to the almighty kirupa once again.

Attching the fla

Ok, well I didn’t check out your .fla, but I can point out what I think may be the problem right now…

[AS]if (loadswf == forum) {
loadMovie(“forum.swf”, “holder”);
}
if (loadswf == first) {
loadMovie(“first.swf”, “holder”);
}
if (loadswf == contact) {
loadMovie(“contact.swf”, “holder”);
}[/AS]

It is assuming forum, first, and contact are variables not words. To identify them as strings you need to put them in double quotes… also an if/else string would be better in this situation…[AS]if (loadswf == “forum”) {
loadMovie(“forum.swf”, “holder”);
} else if (loadswf == “first”) {
loadMovie(“first.swf”, “holder”);
} else if (loadswf == “contact”) {
loadMovie(“contact.swf”, “holder”);
}[/AS]

The same double quotes thing goes with assigning the value to the variable, you must use loadswf = “name”, the double quotes are important in this case.

THX lost I am still pretty new and have this annoying tendency to forget the “small” things. Of course string = “”. **** wish I could us some extra RAM on my brain to speed this learning process.

THX again :slight_smile:

LOL, if only they sold RAM for brains, that would rock.