Seeking Programming Advice on Drag-and-Drop Interaction with Variables

Feb 22, 2023

Hi,

I am working on creating a custom drag-and-drop interaction for a client where the drag items have an associated price of either time/money and they start with a set budget variable for each. I know how to get the budget to go down based on what drag items are dropped into the drop zone. The desire is for them to be able to freely drag and drop the items before submitting their choices. I am not sure how to get the numbers to change appropriately when drag items are constantly being moved. If it is not possible to freely drag the items back and forth, could a reset button be an option? 

Also, the desire is for the items to be stacked within the drop zone so that the learner can quickly see what they have placed in there and be able to change their mind. Right now, the items snap to the center. I know there is control of this when using the built-in drag-and-drop functionality but am not sure how to achieve this building it from scratch. 

Another desire is to have a ranking variable associated with the draggable items to be able to tell if they chose the best options or the worst options and then tell them their score at the end.

In addition, this should be built to be accessible. 

I am not sure if all of this is achievable. The client would like to have something more dynamic than a simple 
"click-to-reveal" interaction. So if this is in fact not even possible to program, I would love for recommendations on another approach to make this an engaging learning experience. :)

 

Thanks in advance for any assistance/advice, 

Holly

7 Replies
Holly Castellow

Thanks, Walt! The last one you put together is really the desired functionality. If there is a way to have the drag items function the same with keyboard options for accessibility, that would be ideal. If not, I will suggest maybe using this and providing an alternative learning activity for accessibility needs. Truly appreciate you taking the time to review my Storyline file and working on it to help me get the desired functionality! :) 

Holly Castellow

Hey Walt,

Thanks for this. I took a look at it and it is getting to what I am going for. I played around with it too and set the rectangles to show a disabled state if the amount is less than the value of that rectangle and the state of the rectangle is not "Drop Correct." I have found both start doing some wonky things when dragged and dropped back and forth. It is not always adjusting the variable correctly. See Scene 2 of my Storyline file to see what I mean. I came across the same issues when testing out your file too.