Problem with if statement

i’ve got a movie clip(b) that i’m controlling with a different movie clip(a)

i have attached the following code to movie clip(a) in order to get mc(b) to work…but its not…need help!


on (release) {
	if (_root.caseStudy_mc._currentframe == 1) {
		_root.caseStudy_mc.gotoAndPlay("up");
	}
	_root.caseStudy_mc.gotoAndPlay("restore");
}

when i release this mc(a) it only plays “restore”, as if its not even checking the “if” statement to begin with. what am i doing wrong?

thanks