1. Computing & Technology

Discuss in my forum

Flash Animation 19: Drag and Drop ActionScripting Commands

By , About.com Guide

Setting up the on (release) Event
Flash Animation 19: Drag and Drop ActionScripting Commands
You can test this out by previewing your movie, but you'll have a little problem--once you start dragging the object, you won't be able to shake it free from your mouse. You're stuck with it, until you reload the movie completely. In order to fix this, we need to add a new command that will stop the mouse dragging and "drop" the object wherever we want to let go of it.

To start with, insert a new on command, below the first one. I've switched back to Normal mode for the moment just to make it easier to click in the correct areas to make the code add on in sequence. For this on command, we'll need to select the Release option, so that the action we specify takes place when the mouse button is released.

©2012 About.com. All rights reserved.

A part of The New York Times Company.