Adobe FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manual page 181

Migrating applications to flex 2
Table of Contents

Advertisement

Controlling the feedback indicator
To control the feedback indicator that accompanies a drag proxy, you now use the new
and
showFeedback()
shows what happens if you try to drop the item; for example, a red circle with a white x
represents an aborted drop, or a green circle with a white plus (+) indicates a valid drop.
In Flex 1.x, you could change the feedback indicator with the
In Flex 2, use the
showFeedback()
DragManager-related events. To get this value on any DragEvent object, you now use the
method.
getFeedback()
Setting actions
You no longer set the
DragManager.setFeedback()
Flex 1.5:
private function doDragOver(event:Event):Void {
// If the Control key is down, show the COPY drag feedback appearance.
if (event.ctrlKey) {
event.action = DragManager.COPY;
} else {
event.action = DragManager.MOVE;
}
}
Flex 2:
private function doDragOver(event:DragEvent):void {
// If the Control key is down, show the COPY drag feedback appearance.
if (event.ctrlKey) {
DragManager.showFeedback(DragManager.COPY);
} else {
DragManager.showFeedback(DragManager.MOVE);
}
}
methods of the DragManager class. The indicator
getFeedback()
method to control the value of this property for all
property of the event object. Instead, you must call the
action
method, as the following example shows.
property of the event.
action
Using the drag-and-drop feature
181

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex 2

Table of Contents