Using variables to expand capabilities of Drag and Drop?
Apr 18, 2015
Since storyline doesn't support multiple correct drop targets I have come up with this work around:
My project includes 20 items and 5 possible drop targets. Any answer or combination is correct. The goal is to gather information from the learner via drag and drop selection and then show results on the next slide. I have assigned a numeric and T/F variable to each item. These trigger text variables to show the results based on which item is chosen and where it is placed. - it become a little complicated.
The drop targets are set to disappear when an object is dropped on top of one. I did this to avoid the possibility of placing more than one item on each drop target - which would produce inaccurate results. (The option to allow only one item per target did not work. I think this is because 4 of the 5 drop targets are "incorrect" answers.)
I would prefer that the learner be able to rearrange the dropped items and/ or swap them out if they change their mind. Has anyone else tried to gather information this way? I am grateful for any suggestions!
You can view the published demo here: http://www.patriciametzthompson.com/myskills/story.html
10 Replies
Hi Patricia -
I would think that the 1Item per Target option should be exactly what you need and should work fine. What happens when you try to use that option? Can you post the slide for us to take a look?
Chris
Hi Patricia
wouldn't the 'allow only one item' option work for you here?
Sorry Chris, I hadn't refreshed my screen to see you had already responded to Patricia
No, I did try it with "allow only one item in each drop target" selected but it only worked for the "correct" drop target.
In this example I've set the drop targets to become hidden when an object is dropped on top.
here is my .story file.
Hi Patricia -
I simplified your logic a bit and I think this gets to what you are after?
The only tricky part is the state of the drag items. Because there are no right or wrong drag and drop items, none of the drag objects will automatically change to a drop state (the yellowy state). You could add a trigger for each drag object to do that manually each time the object is dropped ("Change state of Leadership to Drop Correct when the user drops a shape on #1Skill and so on) but you would need 5 of those triggers per drag object, AND if the learner drags another item to the same spot and the originally drop item returns to its home place, then the originally dropped item will still be in its yellow dropped state and not look right over in the left-hand area. So you would have to add a lot of triggers to return the drag object to its normal state.
Could you maybe make your book bag a chalk outline of a book bag (with the nice splash of color somewhere else on the screen) so that you don't have to worry about changing the state of each object back and forth to normal and dropped each time something is moved? Then you wouldn't have to do all of the trigger logic just to return the item to its normal state. :-)
Hope this helps.
Chris
No problem Wendy. :-) The more help the merrier.
Wow - thank you Chris! That's way more simple. Unfortunately I need to keep the yellow book bag color. I understand how to add a trigger to change each item to a drop correct state but I can't figure out a way to change them back to the normal chalk board state if returned to its home place.
Glad that helped a little. Those state changes are certainly going to cause you headaches because there are no exposed events (that I know of) that you can use to know when an item has been returned to its original location. Maybe you can make the drop locations a dark area on the book bag, like little black Velcro stickers on the bag? Then the white drop item text would show up fine on the book bag too, and you would not have to change states?
Thanks again for your help! It would be awesome if storyline had a code view (like dreamweaver) so you could get in and edit the action script or java script if needed.
Or at least expose more events, like maybe "dropReturn" in this particular case. Maybe in a future release. :-)
This discussion is closed. You can start a new discussion or contact Articulate Support.