Animation

  1. Home
  2. Computing & Technology
  3. Animation

Flash Animation 19: Drag and Drop ActionScripting Commands

By Adrien-Luc Sanders, About.com

1 of 5

Introduction

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.

1 of 5

Index: Flash Animation 19: Drag and Drop ActionScripting Commands

  1. Introduction
  2. Setting up the on (press) Event
  3. Starting Mouse Dragging
  4. Setting up the on (release) Event
  5. Stopping Mouse Dragging

Explore Animation

More from About.com

Animation

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Flash Animation 19: Drag and Drop ActionScripting Commands

©2008 About.com, a part of The New York Times Company.

All rights reserved.