Complexity on Drag and Drop

Oct 20, 2017

Hi,

I am having hard time on this scenario they want.

  1. There are 6 drag items.
  2. There are 2 dropzones.
  3. Two of the drag items are correct and can be dragged either of the two dropzones.
  4. Only 1 drag item on a dropzone.
  5. 1 item should return if another item is dragged at the same dropzone.

I attached a sample file. The problem on the file is the item no. 3 of the scenario.

I will appreciate on any suggestions.

Many Thanks,

Wayne

2 Replies
Chino Jose Navarro

Hello Wayne,

For the scenario that you want to setup, it would be better if you use the triggers with conditions function to get multiple correct answers scenario.

Instead of using freeform to give the test results, you would need to create separate layers for each result. You would need to use hotspots as your drop locations and have them have a value variable.
Create a couple of triggers to change the hotspot variables depending on what object is dragged into the hotspot

Ex:
Dragging the right object to the dropzone will have a this trigger.
Rectangle 1 dropped into hotspot/dropzone 1 will change dropzone 1's variable to true.

Since dragging Rectangle 2 to dropzone 1 is also correct, you need another trigger.
Rectangle 1 dropped into dropzone 2 will change dropzone 1's variable to true.

Do this for the remaining rectangles but set it to change variable to false.

Then create a button trigger with a condition that if dropzone 1 and 2 are true, show layer "correct" message. Create another trigger for the same button with a condition that if dropzone 1 or 2 are false, show layer "incorrect".

This solves your 1 issue about multiple correct answers


Now for the issue about stacking of dropped objects in the dropzone. 
Insert a freeform view and just fill in the drop targets. Click on drag and drop options and tick the box for "allow only one item on each target."

Attached is your file that I modified and also a text file with the steps.

Let me know if you have any questions or if you need anything else

Happy course making!

This discussion is closed. You can start a new discussion or contact Articulate Support.