Is it possible to add a counter to a drag and drop activity so that, with each correct drop, the counter increments? I have reviewed the counter tutorial (nice), but I am not sure how to apply to drag and drop (tutorial demonstrates counter incrementing when user clicks a button).
Here is one quick example that shows a counter being set based on correct or incorrect drag-and-drops. Each drag object has two triggers, one that increases the counter when the object is dropped on the correct target; the other decreases the counter when the object is dropped incorrectly. There are lots of variations on this theme, but it might give you some ideas.
I appreciate that this is a very old thread, but hopefully someone can pick this up.
In the examples provided above, the same problem I am having is being replicated.
When you move the dragable object away from the drop target and move it back, the counter is updated.
I have build a drag and drop interaction where multiple correct items need to be dropped on a single drop target. I have set up a number variable and a trigger to subtract 1 each time one of the correct objects is dropped on my single drop target. However, I don't want the same behaviour in the examples shared above to be replicated, with the counter being updated if one of the correct objects is moved out and then back into the same drop target area.
Is there any way to either lock the dragable items to the drop target when the state of the dragable object is correct? Or perhaps there is another variable I can add so that a dragable object with a drop correct state is only counted the first time the state changes to drop correct?
I suspect that the problem is caused by incrementing the count, rather than counting. I don't know about counting the first drop, but here is a sample that counts correctly. It does that by ignoring moving on and off, and only counts what the final disposition is when Submit is clicked.
5 Replies
Here is one quick example that shows a counter being set based on correct or incorrect drag-and-drops. Each drag object has two triggers, one that increases the counter when the object is dropped on the correct target; the other decreases the counter when the object is dropped incorrectly. There are lots of variations on this theme, but it might give you some ideas.
Hi Michael
I am unable to view or open this file, are you able to explain here how you did this?
Hi Karin!
This thread is a bit dated, but this file downloaded for me. Uploading for you again to see if it works for you :)
Hello,
I appreciate that this is a very old thread, but hopefully someone can pick this up.
In the examples provided above, the same problem I am having is being replicated.
When you move the dragable object away from the drop target and move it back, the counter is updated.
I have build a drag and drop interaction where multiple correct items need to be dropped on a single drop target. I have set up a number variable and a trigger to subtract 1 each time one of the correct objects is dropped on my single drop target. However, I don't want the same behaviour in the examples shared above to be replicated, with the counter being updated if one of the correct objects is moved out and then back into the same drop target area.
Is there any way to either lock the dragable items to the drop target when the state of the dragable object is correct? Or perhaps there is another variable I can add so that a dragable object with a drop correct state is only counted the first time the state changes to drop correct?
Thanks,
Reuben
I suspect that the problem is caused by incrementing the count, rather than counting. I don't know about counting the first drop, but here is a sample that counts correctly. It does that by ignoring moving on and off, and only counts what the final disposition is when Submit is clicked.
This discussion is closed. You can start a new discussion or contact Articulate Support.