If statement help

Hi guys!

I’m looking for a wee bit of help for a game I’m doing if someone could spare me a minute?
Basically, its a gambling game of chance and I want it to go to a random frame which will play a movie when the button “one” or the button “two” is pressed.

so on each button, I have the code:

on(release){
	myChoice = "one";
//pick a random frame to land on
	var maxChoice = 3;
	var n = Math.ceil(Math.random()*maxChoice);
	_root.gotoAndPlay(n+2);
}

The variable “one” is “two” on button two, but its the same code other than that.

So it picks a random frame to go to, plays the movie, and at the end of it, I want it to pick either win or lose depending on whether what button the person presses is the same as the random movie which has played. So on the last frame of each movie(code varies for each different outcome), I put this:

stop();
if(myChoice="two"){
	_root.gotoAndPlay("lose")
}

if(myChoice="one"){
	_root.gotoAndPlay("won")
}

I just dont ‘get’ it. Every time I publish it, it always goes to whatever if statement is at the top rather than actually deciding whether it was right or not. So if I swap them round, it just goes to the “won” frame.

Sorry for a rather long-winded explanation for something that is probably very simple!

Thanks in advance x