Forum Discussion
Drag and drop button states not returning to normal state when dropped outside drop target and snapping back to original position
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
- DianeFallier-0cCommunity Member
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.
- DawnChamberlin-Community Member
Well the "Try Again" seems to interfere with the "Return item to start point..." selection for the drag button. But thanks for getting the Try Again screen to show when the button is not dropped on the target. Hopefully, someone can figure this out.
Hi Dawn,
When you add additional triggers to a drag and drop that'll overwrite the built-in functionality of the drag and drop for things like the snap back option.
I'll be curious to hear how others in the community have handled a similar design!
- WendyFarmerSuper Hero
Hi Ashley
I think Walt did a good example of this using hotspots to return the drag items - can't put my finger on the post with the example...sorry.
- DawnChamberlin-Community Member
Thank you everyone for trying to assist. Fortunately, I was finally able to create the right triggers to achieve the behavior I needed.
Awesome. Thanks for the update, Dawn :)
- NadiaPicco-d87bCommunity Member
Hi Dawn,
Would you be able to share your solution to this problem? Also trying to solve for this issue. Any ideas you might be able to share would be much appreciated. - GerryMcAteer-86Community Member
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
- PatriceLynn-0c5Community Member
THANK YOU GERRY!!!
- DawnChamberlin-Community Member
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.
Related Content
- 3 months ago
- 3 months ago
- 29 days ago