Creating E-learning Content > Testing the quiz > Configuring a Drag and Drop interaction |  |

Configuring a Drag and Drop interaction

You can use up to eight Drag objects and eight Target objects in each Drag and Drop interaction. Each Drag object can snap to any target named in the Drag and Drop component for evaluation. Drag objects can also share targets; for example, both Drag 1 and Drag 2 can match Target 8. You can also specify a target without matching a Drag object to it. This allows you to add incorrect target distractors for evaluation.

Each Target object and Drag object is referred to as a distractor. A distractor is simply one of a series of selectable choices. This term is used for the choices in each of the learning interactions.

To configure a Drag and Drop interaction:

1 | If you are not using a quiz template, place the learning interaction on the Stage. If you are using a quiz template, select the frame on the Interactions layer that contains the Drag and Drop interaction. (Frame 5, if you have not added or removed keyframes.)
2 | Break the movie clip apart (Modify > Break Apart), display the Component Parameters panel, and then type the interaction ID and the question. See Configuring a Learning Interaction component.
3 | In the Drag Object Name column, list the instance names for the Drag objects on the Stage.
| Each Drag object must have a unique name. If you add a new Drag object on the Stage, be sure to enter its name here.
4 | In the Matches Target Name column, list the matching target instance name for that Drag object.
| Each target must have a unique name. If you add a new target on the Stage, be sure to enter its name here.
| If you enter a Drag instance name in the Drag Object Name column, you need to enter a corresponding Target instance name in the Matches Target Name column. However, you can enter a Target instance name in the Matches Target Name column without a matching Drag instance name. This adds a target that can be snapped to but will not be evaluated as a correct match.
5 | Select Snap to Start to make the Drag objects snap back to their original position if they do not snap to a registered target.
6 | Select each instance of the Drag object or Target object on the Stage. Use the Property inspector to give each instance the same instance name that you specified in the Component Parameters panel.

Adding and removing Drag objects and Target objects

You can change the default number of four objects and four targets by adding additional objects and targets, or by deleting existing objects and targets. You can include from one to eight Drag objects and one to eight Target objects in a Drag and Drop learning interaction.

To add a Drag object or Target object:

1 | Create a movie clip symbol containing the graphics for the object. For example, if you have an interaction that has six types of fruit, and you want to add a seventh choice, create a graphic of the seventh fruit and place it in the library.
2 | Select the Drag and Drop learning interaction on the Timeline, then drag the symbol from the Library panel to the Stage.
3 | In the Property inspector, name the instance. See Adding, naming, and registering assets.
4 | Add the instance name to the Component Parameters panel for the Drag and Drop object. See Naming and registering graphic distractors.
| The component will do the rest of the work for you at runtime.

To remove a Drag and Drop object:

1 | Select the Drag and Drop instance that you want to remove, and delete it from the Stage.
2 | Select the Drag and Drop component (to the left of the Stage in the quiz template), then display the Component Parameters panel by launching it from the Property inspector, if necessary.
3 | Remove the deleted object's instance name from the appropriate column in the Component Parameters panel.
| Note: If you register distractors for the Drag and Drop component that do not exist on the Stage, a Trace Output error message will appear when you test the movie.