Scoring - gotoAndStop

Can someone please just chec over my code :puzzled:

Am not sure why it doesn’t work - I realise it is messy…

Basically I want my game to go to the next frame when I get a certain score. But it won’t :frowning:

Thankyou in advance for any help :slight_smile:

onClipEvent (enterFrame) {
this.onPress = function() {
startDrag(this);
};
this.onRelease = onReleaseOutside = function() {
stopDrag();
if (this.hitTest(_root.dropD) == true) {
this._x = 329.2;
this._y = 68;
_root.Dtick._visible = true;
_root.dropD._visible = false;
this._visible = false;
_root.ansD._visible = true;
if (_root.total==100) {
gotoAndStop(2);
} else {
this._x = 201.5;
this._y = 68;
}
};
}