outside your on EnterFrame
[CODE]var hitting:Boolean=false;
CODE]
within your hitTest
Code:
if (!hitting) {
score++;
score_txt.text=score;
hitting=true;
}[/
when you stop hitTest set hitting back to false
so i guess you would have something like this
Code:
var hitting:Boolean = false;
score = 0;
mc.onPress = function() {
this.startDrag();
this.onEnterFrame = function() {
if (this.hitTest(target)) {
if (!hitting) {
score++;
score_txt.text = score;
hitting = true;
}
} else {
hitting = false;
}
};
};