Drag and drop button states not returning to normal state when dropped outside drop target and snapping back to original position

Sep 18, 2019

I am totally stumped. I have created a drag and drop button that changes states per hover and drag. If the button is dropped outside the drop zone it snaps back to the correct position, but is showing the "selected" state. I need it to return back to the normal state. Also, my custom "Try Again" layer is not showing when the button is incorrectly dropped outside the drop zone. I have attached a sample file to help illustrate the issues.

10 Replies
Diane Fallier

I added 2 triggers to handle the scenario when the button is dropped outside the drop target. One of them changes the state of the button to normal and the other shows the layer.

I don't know how to move the button back to it's original position. Maybe someone else knows how to do that.

Gerry McAteer

Here is another way to return dragged objects to the original starting point for multiple retry attempts without having to use a variable:

1. place an add motion animation onto each drag object.

2. set the start and end points to the same point (when the drag object is in its original spot)

3. set duration to 00.10

4. on the Try Again layer - and on the Try Again button set a new trigger for each of the drag objects. (Move 'object' on LineMotionPath1 when the user clicks Try Again button

and that's all you need to do! :)

cheers Gerry

Dawn Chamberlin

Hi An Wang,

I don't remember exactly what I did as this was so long ago. However, I have added the "Fixed" sample that behaves the right way. I believe in order to get it to work to allow it to freely drop and stay in the location where the participant dropped it (wrong target), I right clicked on the drag object and set "Drag and Drop" to "Drag return." Take a look at the triggers and variables to see what I did for the states too.