Forum Discussion
Return item to start point if dropped outside any drop target
Good afternoon,
I have a drag-and-drop activity set up on a Freeform slide.
I have the "Return item to start point if dropped outside any drop target" setting enabled.
I would like to set up a trigger/action where an object changes states when the dragged item is returned to its start point.
How can I do this?
Any help is appreciated!
Thanks,
Nora
Hi Nora,
Thanks for reaching out!
You can achieve this by changing the state of the object when the object is dropped on the incorrect target. I've created a sample file where the color of the apple is dimmed when it's dropped on the incorrect target. To do this, I added a Drop Incorrect state and a Drop Correct state.
Please let me know if you have additional questions and I'll be happy to help! You can also share your file with us here or privately in a support case for further troubleshooting. We'll delete it from our systems once troubleshooting is complete!
- NoraMurphySi952Community Member
Thank you for the response Kelly! It's a little tricky because my drag and drop activity does not have correct or incorrect answers. Any drop target is acceptable for any draggable object, so I don't think I can define correct/incorrect states on the draggable objects. And, it's actually the drop target that needs to change its state when the draggable item returns to its starting location. As a workaround, I've added a transparent rectangle over most of my screen and added a trigger to change the state of the drop target when the draggable object is dragged over the rectangle, but it's not working perfectly. Appreciate your response.
- WaltHamiltonSuper Hero
I would remove the rectangle, and set the form view to have no correct targets. Then create a trigger: Change state of drop target when dragged object is dropped on target. The difficulty with that is that for every target you want to change its state, you have to create a trigger for each item that can be dropped on it. That’s the price you pay to change the target’s state.
- NoraMurphySi952Community Member
Thanks Walt. I've done what you suggested for the initial state change of the drop target. But I need the drop target to return to Normal state when the draggable object returns to its start point. Having the transparent rectangle means I can make a trigger for this to happen when the object is dragged over the rectangle. However, if the draggable object returns to its start point because it was "bumped" out of the drop target by another draggable object, my trigger doesn't fire, because it was never dragged over the rectangle. It's a tricky one.
Hi Nora,
I agree with Walt. You are also welcome to share your Storyline project privately in a support case if that works better for you.
- WaltHamiltonSuper Hero
Every time you post, there is a new addition to what you want. This is getting way too complex. Please attach your .story file here, so someone can look at it, and list ALL of what you want to happen in one place.