Flash : Creating a dialog box
David Einhorn
Drag & Drop
The Flash Drag & Drop feature can be applied to a button, just like any other function. And we are naturally going to
apply it to the Drag & Drop button:
- Double-click on the window symbol in the Library.

You should now be able to see all your window elements.
- Select the Drag & Drop button.

- Select Modify > Instance.

The Instance Properties window is displayed.
- Click on the + button of the Actions tab and select the Drag Movie Clip function.

The script for the Drag & Drop function now appears.
- Click on the first script line (On (Press)) and select the Press option on the right-hand side of the window.

The displacement action will only be set in motion when the mouse button is pressed.
- Select the last line of the script (End On) and click on the + button. Select the Drag Movie Clip function again.

- Select the Stop drag operation checkbox in the lower right-hand part of the window.

- Select the line (On (Release)) and tick the Release checkbox on the right-hand side of the window.

The Drag & Drop action will end when the mouse button is released.

Figure 3: The Drag & Drop script
You can test the result by selecting Control > Test Movie. The window will follow the mouse movements, but we can do a
lot better!