Forum Moderators: open
I've got this code in flash:
points=0;
if (drag1.hitTest(_root.hit1)) {
points=points+1;
}
if (drag2.hitTest(_root.hit2)) {
points=points+1;
}
if (drag3.hitTest(_root.hit3)) {
points=points+1;
}
As you can see what I do is repeat the same code many times, which looks kinda funny, because it could be done by a loop. Anyone know how to write one?