1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Flash Animation 19: Drag and Drop ActionScripting Commands


1 of 5

Flash Animation 19: Drag and Drop ActionScripting Commands
We've already made our animations pretty interactive; our users can choose between two options for their scene, and then add and remove various elements as they please. But the interaction is still taking place at a bit of a remove; it's done through buttons, where the user clicks on a button and then watches while the action takes place. It's time to get a little bit closer, and make that interaction more direct--to place the control at the user's fingertips or, more accurately, mouse cursor.

We're going to make our movie clip elements draggable. To do this we're going to learn new ActionScripting commands that start the "drag" function when the user clicks on the element, and stops it when they release the mouse button--so that the movie clip element will follow the mouse cursor around the screen for as long as the mouse button is depressed.

So let's start by accessing the actions for one of our movie clips. I'm starting with the hat in the Short Snowman scene; right-click on the element, and select Actions to bring up the specific actions for that element.

©2014 About.com. All rights reserved.