The AttachmentDropManager class provides support for dropping IAttachments to the UI Component classes.
Any UI Component that registers with this class gets the platform
attachment drop support. This class is based on the Spark List drag drop code.
MXML SyntaxShow MXML Syntax Hide MXML Syntax
The <s:AttachmentDragManager> has the following tag attributes:
[static]
The AttachmentDragManager.DRAG_DROP_ITEMS constant defines the value of the
format property for the default set of List drag and drop items.
AttachmentDropManager
Property Detail
dropTarget
property
dropTarget:UIComponent
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
This contains the UI Component registered by the caller as the drop target.
If you set this property, the UI component that is set is enabled as
a drop target for attachments. If this is set to null or to a different
UI component, the previous UI component is unregistered as a drop target.
The default value is null.
Implementation public function get dropTarget():UIComponent public function set dropTarget(value:UIComponent):void
This contains the target folder to which the attachment will be added.
If this value is null then the attachment is added to the root folder.
The default value is null.
Implementation public function get targetPath():IAttachment public function set targetPath(value:IAttachment):void
Constructor Detail
AttachmentDropManager
()
Constructor
public function AttachmentDropManager()
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Constructor.
Method Detail
dragDropHandler
()
method
protected function dragDropHandler(event:DragEvent):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Handles DragEvent.DRAG_DROP events.
Parameters
event:DragEvent — The DragEvent object.
See also
mx.utils.ObjectUtil mx.utils.UIDUtil
dragEnterHandler
()
method
protected function dragEnterHandler(event:DragEvent):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Handles DragEvent.DRAG_ENTER events. This method
determines if the DragSource object contains valid elements and uses
the DragManager.showDropFeedback() method to set up the
UI feedback.
Parameters
event:DragEvent — The DragEvent object.
dragExitHandler
()
method
protected function dragExitHandler(event:DragEvent):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Handles DragEvent.DRAG_EXIT events. This method hides
the UI feedback by calling the hideDropFeedback() method.
Parameters
event:DragEvent — The DragEvent object.
dragOverHandler
()
method
protected function dragOverHandler(event:DragEvent):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Handles DragEvent.DRAG_OVER events. This method
determines if the DragSource object contains valid elements and uses
the showDropFeedback() method to set up the UI feedback.
Parameters
event:DragEvent — The DragEvent object.
Constant Detail
DRAG_DROP_ATTACHMENTS
Constant
public static const DRAG_DROP_ATTACHMENTS:String = attachments
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
The AttachmentDragManager.DRAG_DROP_ATTACHMENTS constant defines the value of the
format property for the Attachment drag data.
DRAG_DROP_ITEMS
Constant
public static const DRAG_DROP_ITEMS:String = itemsByIndex
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
The AttachmentDragManager.DRAG_DROP_ITEMS constant defines the value of the
format property for the default set of List drag and drop items.