O'Reilly logo

Professional Adobe® Flex® 3 by Joe Berkovitz, David Hassoun, Andrew Trice, Tom Sugden, Todd Prekaski, Jun Heider, Peter Ent, Joseph Balderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 34. Drag and Drop in Flex

This chapter examines the capabilities in the Flex framework for dragging and dropping entities from one area of an application to another. The items covered are as follows:

  • Working with the drag and drop-enabled components

  • Working with drag and drop events

  • Adding drag and drop to nonenabled components

  • Additional drag and drop tips

Overview

Dragging and dropping is a very natural way for a user to interact with a modern graphical user interface. Drag and drop support is built into modern operating systems such as Windows and Mac OS. Some of the use cases that come to mind when talking about drag and drop in a modern operating system include:

  • Dragging an item such as an audio file, image, or video file onto a player or viewer.

  • Relocating an item between two different item groups. For instance, you might use classroom management software to drag and drop a student record from one classroom roster to another.

  • Deleting an item by dragging it onto a trash can icon.

  • Rearranging your UI preferences by dragging and dropping around the various display components.

As you can see, dragging and dropping is something that is used very extensively these days, and luckily, drag and drop was factored into the Flex framework. Let's start by taking a look at the components that natively support drag and drop.

Working with Drag and Drop-Enabled Components

Fortunately for you as a Flex developer, there are a number of components that support drag and drop right out of the box. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required