Change variable when object is dragged off?

Sep 05, 2013

Hi - I've created a drag and drop activity on a 'Multiple Response' quiz slide. 

There are four drag objects, 10 target shapes, but only 4 of these shapes are correct drag targets.

When a user drags an object onto a target, it selects one of the Multiple Response options.

It works fine, apart from if a user decides to drag an object twice before submitting.  eg - if the user drags the object to the correct target, the corresponding answer on the multiple response is selected. However, if the user decides then to drag the same object to an incorrect target, I can't find a way to deselect the multiple response option.

I guess I'm looking for a way to change the state of something when an object is 'dragged off' a shape.

I've attached the story so you can see what I mean.

6 Replies
Ashley Terwilliger-Pollard

Hi Emma and welcome to Heroes!

I'm not sure I fully understand what's happening - I tested your quiz, and didn't see any state changes - I dropped the red X's on incorrect and correct spots, and then moved them without seeing any changes. I was able to submit it and get a valid assessment of what I have on the screen (either all correct, 3 out of 4, so on). Can you share a bit more about what you'd expect it to look like or what is happening that you'd prefer not to? 

Phil Mayor

You cannot change the variable when an object is dragged off, a more efficient way to do this is to only count when the user clciks the submit button based on drop correct/ drop incorrect states.

Other things you can do is disable the drop target when an object is dropped on it, unhide a shape over the top of the drag object when it is dropped, I always find using the submit button better.

Jill Harrison

Hi, thanks for replying so quickly.

Hi Ashley - there are no visible state changes in the story, and the activity works fine, so long as the user doesn't drag one of the red X's from it's starting point, to a target object and then to another target object, before submitting.  If they drag to the correct target area first of all, the multiple response will set a tick at that option, but if the user then drags the X to another area, the previous multiple response option will not be deselected - and this means that the feedback will be incorrect.

However I think Phil's suggestion of disabling the drop target when an object is dropped on to it might work for me. I'll try that approach now.

Many thanks!

This discussion is closed. You can start a new discussion or contact Articulate Support.