Problem accessing variables

I am making a jigzaw and when all the pieces are put in the right place, another movie clip will be played.

All pieces are buttons placed in different movieclips. The movieclips are then placed in scene 1.

In frame 1, I’ve written
_global.var1=0;

In frame 2, I’ve put movieclip1, and in movieclip1 I’ve placed button1, with the following actionscript:

on (press) {
startDrag ("_root.movieclip1");
}
on (release) {
stopDrag ();
if(_x>380 && _x<410 && _y>240 && _y<290){
_x = 395.9;
_y = 270.9;
button1.enabled = false;
_global.var1=1;
}
}

However, when the piece is in the right place, and the if-statement has been activated, _global.var1 is still 0 when I trace it in frame2. I can’t understand why, can someone please help?