Codeing problem

ok another day another problem but its all part of the learing process… the file attached pretty much explains what is going wrong here… basically ive got a button on rollOver and rollOut sets x to = 1 or 2

on(rollOver){
_root.x = 1;
}
on(rollOut){
_root.x = 2;
}

when x = 1 a movie is ment to trigger and the same as when x = 2 (the same movie)… trouble is x=2 works but x=1 doesn’t … the x = 1 code seems to acivate a gotoAndStop effect as apposed to the gotoAndPlay i should activate…

onClipEvent (enterFrame) {
if(_root.x==1) {
this.gotoAndPlay(31);
}
if(_root.x==2) {
this.gotoAndPlay(1);
}
}

and i really cant understand y not… it should work in theory… check the attached example file to see more in depth whats going on…confusing…

thanks