I'd like to build a drag and drop activity as a way of selecting options (setting variables). So for example, I'd have ten drag items (A-J) and one or more drop targets. The user will be asked to select three out of the ten by dragging them down. I'd have three variables, choice1, choice2, choice3 where the selection would be recorded. There would be no right wrong answers. Is there a way to do this?
Yes! You would just need to add a trigger to each object that changes the variable when the object is dragged over or dropped on (depending on how you want the interaction to work) your drop target. I hope that answers your question! If not, let me know.
By default the drag state will be "incorrect" if a user drags an object to a drop target and then removes it. One way to get around this would be to use custom states instead of the default drag and drop states, but you'd have to set up a trigger for each object in order for the states to change (which is why the default drag and drop states are nice - they just work).
If you want to take advantage of the default drag and drop states, you could insert a transparent shape that takes up the space outside the other drag targets and add a trigger that changes the object states to normal when they're dragged over it.
Let me know if any of that is unclear or if you need any further help. :)
5 Replies
Hi Gavin,
Yes! You would just need to add a trigger to each object that changes the variable when the object is dragged over or dropped on (depending on how you want the interaction to work) your drop target. I hope that answers your question! If not, let me know.
Thanks, that's great. What about if I remove the selection, is there a way
to return the variable to blank?
Hi Gavin,
By default the drag state will be "incorrect" if a user drags an object to a drop target and then removes it. One way to get around this would be to use custom states instead of the default drag and drop states, but you'd have to set up a trigger for each object in order for the states to change (which is why the default drag and drop states are nice - they just work).
If you want to take advantage of the default drag and drop states, you could insert a transparent shape that takes up the space outside the other drag targets and add a trigger that changes the object states to normal when they're dragged over it.
Let me know if any of that is unclear or if you need any further help. :)
Thanks for the info. For now, I've added a discrete button to set the variable to blank.
You're welcome! :)
This discussion is closed. You can start a new discussion or contact Articulate Support.