How to reset a variable when drag and drop object goes back to it's original place?

I am using freeform drag and drop. I am trying to have a true or false variable go back to it's default value which is false. My issue is when the student drops an object onto a correct drop zone and then changes his mind and drags it out of the drop zone and drops it between the drop zone and it's original place. The value of the variable stays true even if there is nothing in the drop zone anymore. I tried to put a hot spot under each objects original place and said if drop on the hotspot change the variable to false, but id does not work. The only time it works is if the user clicks and drags and miticulously drops it onto the hotspot, but if he or she drops it in between the two drop zone it goes back to the original drag and drop zone but does not change the variable to false.

9 Replies
Christian Williams

Hi Walt,

I've already done that. I've created a hotspot under every draged items and the hotspot switches the variable to false when it is dropped on this hotspot. The problem is when I drop the item in between the two drop zone, then it goes back to it's original place but does not reset de variable to false like I want it to. If I carefully drag the item back to it's original place and drop it on the hotspot then it resets the variable to false. The problem is when I drop it in between the two.

Walt Hamilton

You need another shape (hotspot) under, not the dragged item, but under the target, and slightly larger than the target. That way, the item cannot be dragged onto of off of the target without crossing the shape. When the object is dragged over, (not dropped on) the shape it sets the variable to false.

See attached.