Forum Discussion
Magic JavaScript switch?
- 8 months ago
I made a JS solution for this. It's a bit long to explain here... so I made a blog post: https://blog.reviewmyelearning.com/randomizing-drag-and-drop-objects-in-storyline-using-javascript
And you play with a demo here: https://gforce.reviewmyelearning.com/course-review/671ab86f1dbcddb3bb7e9ab4
Tried it, and some weird jumping when dropping wrong. Spots jumping 1 rectangle down, as they should stay where dropped... Allthough the principle probably is a solution. Getting sets that are correct/wrong and then changing z-indexes. But i do think this is too much work for a default that should be available in Storyline standard. If i want a drag/drop like this...i forget the Storyline default drag/drop and create a completely custom one with Javascript.
Codepen always helps ( GSAP and ChatGPT too ;-)
https://codepen.io/MischaX/pen/GzvVwz
https://codepen.io/stevewojcik/pen/LeOVRK
https://codepen.io/jaredsmith07/pen/BaNmWoe