Forum Discussion
Magic JavaScript switch?
- 7 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
I might have developed something similar a while back. It was an experiment that I had to stop working on due to time constraints. It's a basic drag-and-drop interaction where drag items appear in a random sequence order based on their z-index. The script used identifies all elements with a "data-acc-text" attribute that contains the word "DRAG" and treats them as draggable items. It generates a random z-index for each drag item, which determines the stacking order. This randomization is done each time an object "disappears" and then "reappears" (when one item disappears, the script assigns a new z-index to all items before showing the next item). Please check the attached video for a brief demonstration. However, I'm not entirely sure if this is exactly what you're looking for.