So, I am making this game where the player can place "boxes" of sorts, and then click on a "material", the cursor would change, then click on the box and it will switch to another frame. And so consecutively until you get and end result

However, after a while working with it, the first "box" (which is used for building a capfire in the game) wouldn't place down. The cursor did not even switch to its alternative shape.

The sole variable used (_root.inUse) works ecelently, and another "box" too. I checked everything, but I can't find why the campfire won't work.

I can't really find what is wrong with my script, and since the game relies heavily on that mechanic, I'm afraid I can't do much if I leave the problem like that. I ask for your help. Please.
I leave the script and the .fla itself for revision.

Cursor(relies mainly on the cursor's function):


onClipEvent (enterFrame) {
//Setting up the cursor
Mouse.hide();
this._x = _root._xmouse;
this._y = _root._ymouse;
//Using the tile-based cursor when a campfire building space is selected
if (_root.inUse == -1) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
//Placing the space for making the campfire
onMouseDown = function () {
if (_root.inUse == -1) {
if (this.hitTest(_root.ground)) {
_root.attachMovie("campfire_build", "campfire", _root.getNextHighestDepth(), {_xthis._x), _ythis._y)});
_root.inUse = 0;
}
_root.getNextHighestDepth();
}
};
//Using the tile-based cursor when a tent building space is selected
if (_root.inUse == -2) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
//Placing the space for making the tent
onMouseDown = function () {
if (_root.inUse == -2) {
if (this.hitTest(_root.ground)) {
_root.attachMovie("tent_build", "tent", _root.getNextHighestDepth(), {_xthis._x), _ythis._y)});
_root.inUse = 0;
}
_root.getNextHighestDepth();
}
};
_root.getNextHighestDepth();
}




Would take much more to write down the whole thing. I hope you can find a solution. Thank you again