Back to Previous

Drag n Drop

This behavior has initially started out as one I did from scratch but then I found 5 other behaviors on the web which did things better and added different options. So I took the best features and added a few of my own to create this "DragNDrop Plus" behavior.

What’s really different about this method, is that a lot of what happens iis based on how many sprites have been tagged with the matching game behavior. If you move or delete a matching pair, you don’t have to re-write the code. Very efficient! I have added the following features as well:

1. Makes each drag sprite have a different "correct" sound.
2. Auto records the original drag sprites location when mouse up
3. Snaps back to the recorded original location if not correct on mouseup
4. On moving a new sprite; clears the message textfield (if you have one)
5. Makes cursor a hand and then a grabbing closed hand when dragging
6. Starts a forcefeedback effect when dragging if user has a touchsense mouse
7 Option to set a sprite as invisible when correct

__________________________________________________________

In a learning module the Drag N Drop activity could be timed or scored based on the percentage of tries. Here is an example of the same Drag N Drop activity, but with a scoring feature applied. This activity uses my "DragNDrop Challenge" behavior which is a modified version of the original Drag N Drop Plus behavior except the "auto jump when correct" has been taken out and replaced with the ability to select what would be "wrong targets" and their "snap to" positions.

Selection of wrong targets has been added to eliminate the possibility of the user choosing correct answers via process of elimination (we don't that). In addition, the auto snap back to starting position characteristic has been eliminated. Also included is the addition of making the sprites movable when incorrect due to the need to make a possible second try.

This behavior allows for the matching of 3 scored pairs. All pairs are not judged until the user checks answer via a check answers button that has my "DragNDrop Check Answers" behavior attached to it. The number of tries is stored in a list and I have created a custom "Reset Drag&Drop Game" behavior to attach to the reset button.

__________________________________________________________

This behavior allows the dragging of many objects to one correct target with the ability to decide on the order of how things must be dragged. Very useful for simulating the process of how to assemble a system or just about anything in which the user must learn proper steps to complete the task. In this example incorrect item will simply snap back.

This activity was originally done in dreamweaver with the course builder plug-in, but I decided to redo it in director so that I could have re-usable behaviors that were simple and that would allow more customization. In the director environment, it only takes 2 behaviors: Snap To Correct Target & Snap Back to Starting Point. All other parameters are changed via the behaviors parameters dialogue box.

__________________________________________________________


Same version as above except now the activity is scored and each try will be recorded. This activity uses 2 custom behaviors as well: Snap To Correct Target Quiz & Check Assembled Answers

In this version, there are far more things that have to happen as opposed to the standard version.

On mouseup this activity performs no fewer than 8 actions::

1. cursor goes back to non-grapping hand
2. Forcefeedback effect is stopped (if your using one)
3. The items assembled state gets recorded in a tracking list
4. A sound of your choice will play
5. Item snaps to correct location if over target
6. target covers up sprite appears over correct item to show it assembled correctly
7. Item's text description disappears (if description is used)
8. Item snaps back if not correct