Previous Tip  |  Next Tip  |  Design Tips   | [Bill's Home]


[Expand] In the last few examples we have seen examples of drag-and-drop, where the object which is dragged is made invisible when it is placed in the correct place. The technique of drag-and-stay is also important when no clues are given that the user has actually put the object in the correct place. A good example of this is given next:

In this example the user drags the red boxes over the black boxes, and when they press the green button, the movie shows the number of correct options. The user must thus decide on which ones are actually correct, and which are not. This overcomes the problem of drag-and-drop where the user will simply try each of the remaining places that they can be dragged to.

The example is quite simple, as the black boxes are assigned the instance of n1, n2 and n3 (for the network address places) and a1 to a8 (for the network addresses). Then, on the red boxes, an Actionscript similar to the following is added:

on (press) {
startDrag ("");
on (release) {
stopDrag ();
trace (this._droptarget);

if (this._droptarget=="/a2")
else {