True/ False statment problem

I have it where i have a little ball, and i push crates along. Im trying ot make it so that when then then crate goes into water, i cant push it anymore.

here is the code i have on the ball:

[FONT=Comic Sans MS][SIZE=3]// This is the true/salse statement for the crate[/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3][COLOR=blue]onClipEvent(load){
crate = true;
}[/COLOR][/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3][/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3]//this moves our character (named ball)[/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3][COLOR=blue]onClipEvent (enterFrame) {
if (Key.isDown(Key.UP)) {
this._y -= 21.15;[/COLOR][/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3]//this is to check if my crate is in the water or not[/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3]//if its not, then i can push it[/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3]//if it is in the water, then i shouldnt be able to push it
[COLOR=blue] if (crate == true){
if (this.hitTest(_root.box)) {
_root.box._y -= 21.15;
}[/COLOR]
// this is what it does if the crate(box) is hitting the water
[COLOR=blue] } else{
_root.crate.gotoAndStop(2);
}
}
}[/COLOR][/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3][/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3]the rest is all the same, just changed for the different directions that your character will move, so i took it out[/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3][/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3][/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3][/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3]ok, now the code i have on the floor (not the water)[/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3][/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3][COLOR=blue]onClipEvent(enterFrame){
if(_root.box.hitTest(this)){[/COLOR][/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3][COLOR=blue][COLOR=black]//this keeps the box normal
[/COLOR] _root.box.gotoAndStop(1);
} else[/COLOR][/SIZE][/FONT]
[FONT=Comic Sans MS][SIZE=3]// if the box isnt hitting the floor, go to the box’s second frame, and make create = false
[COLOR=blue] _root.box.gotoAndStop(2);
crate == false;
}[/COLOR][/SIZE]
[/FONT]
make sense?
if theres something u dont understand, or left out, just ask:s: