Hit test problem

could any one help please
im doing a quizz and im having problems keeping score the students must dragg 16 to the log but for each frog they dragg to the log they get 100 points and i can’t get that to happen I belive the problem is in the variables but can’t figure it out
help is greatly apreciate thanks :A+: :slight_smile:

PS here is the fla
http://www.geocities.com/cardjorg/test2.fla

I’m sorry, I had to erase all of your actions and start all over again. You can look over the actions I put, they’re all pretty self explanitory - I think. If you have questions, lemme know!! :beam:

http://www.freddythunder.com/test/frogger.fla

thanks a lot !!
but there is still a problem , i tried this last time but i couldn’t figure out a condition so if you dragged a frog out of the log it would take off the 100 points given or if you pressed it won’t add 100 more any ideas??:wink: :ch: :rambo:

On ALL of your frogs, add this line in the if statement:
else { _root.textbox -= 100; }
Should look like voila:


on(press){
	this.startDrag(true);
}
on(release){
	stopDrag();
	if (this.hitTest(_root.woodlog)){
		_root.textbox += 100;
		this._y = _root.woodlog._y;
	} else {
		_root.textbox -= 100;
	}
}

Tell your students I said hi!!

but if you press in the frog inside the target area it adds 100
and the same thing happens when you clik the frog outside the target area

Okay, this will take more code. How many times do you anticipate the frogs to move? Is it just on the log, then you’re done, or on the log, then off the log? Give me a little plot-line of what you want done.

just in to the log but you see they are first grade students and i belive some are going to have trouble to count and will want to dragg out some or add more frogs

Holy crap, I did it. I thought it would be a lot harder that what I did, so, here ya go:

http://www.freddythunder.com/test/frogger.fla

:beam:

thanks alot it worked perfectly!!!
the students liked

Just helpin’ the kids - it’s what I do…:stuck_out_tongue: