Forum Discussion
Drag and Drop Problem
Help Please!
I have a problem with a drag-and-drop slide.
The user can drop a coloured ‘example square’ on any of the targets (Rule 1, 2 etc.), and the Rule changes colour to match the example.
I want to stop the user from dropping another drag object onto the same drop zone during the same session. At the moment, the drop zone changes colour as each new drag object is dropped on it 'over the top' of a previous square.
When the user selects 'submit' the appropriate feedback opens – you have scored 1/6, 2/6 etc.
I don’t think I can use a drop correct/incorrect state as any of the example squares can be dropped on any target, and until the user selects ‘submit’, nothing is triggered (I hope this makes some sort of sense).
I have tried putting a 99% transparent block over the drop zone and using a disabled trigger, but neither seems to help.
I don’t want to reset anything; just stop the user from dragging more than one square onto a given drop zone.
Any thoughts or ideas are gratefully received.
Thanks in advance
Michael
- WaltHamiltonSuper Hero
You are on the right track with what you are doing with the drag items, you just need to extend it to the targets, too.
Duplicate a target and align it with the original and behind it. When a drag item is dropped on the target, change the state of the second target, and hide the original. It will look like the drag was dropped, but will not accept any drop item.
In the sample, I set up rule 1 and example 1 that way.
Just my opinion, but if I were doing it, I would set the drag items to return if dropped outside any target.
- MichaelOSull894Community Member
Hi Walt,
I really appreciate the input - the return if dropped outside any target, certainly helps the look and feel. I'll try it all out.
- MichaelOSull894Community Member
Hi (Again) Walt,
I have just spent several frustrating hours trying to replicate your solution. I can see what you've done, but I can't replicate it.
It seems a really elegant and simple solution (especially with the 'Return an item' option ticked, but I can't see what I am doing wrong. I have duplicated and resaved the Rule 1 (Rule 11) image and the triggers and adjusted the settings but...
I realise it's difficult for you to comment, but is there something obvious I am missing?
Thanks and Regards Michael
- WaltHamiltonSuper Hero
If you attach your .story file, I'll take a look at it.
- MichaelOSull894Community Member
Hi Walt,
Once again, I really appreciate your response and help.
The client has changed their specifications and how they want the D&D to function.
So at the moment, the simpler (original) version is what they want.
Kind Regards
Michael
- NidiaLisethRodrCommunity Member
Hello Michael, Have you tryed to configure the Drag and Drop Options in the DESIGN tab? You can select the box "Allow only one item in each drop target". Hope this can help.
- WaltHamiltonSuper HeroYou're welcome. PIAWYC (Pass it along when you can).