Updating variables

Here’s a tricky question: If I update a variable and then go back in timeline, will the variable have the updated value?

This is a code on a button on frame 3:

on (release) {
	myvar += 1;
	_root.play();
}

Frame 3 sends me to frame 2 again, where I use myvar… It’s kinda working but there are some anomalies going on. I want to know if anyone had an experience like this.