private function dragEnterHandler(event:DragEvent):void {
if (event.dragSource.hasFormat("some format"))
{
DragManager.acceptDragDrop(event.currentTarget as UIComponent);
}
}
private function dragDropHandler(event:DragEvent):void {
Alert.show("dropped");
Alert.show("dropped");
}
.........<mx:HBox id="v1" width="100%" height="100%" label="dd" dragDrop="dragDropHandler(event);" dragEnter="dragEnterHandler(event);">
........
Here drop is not accepted by Hbox
solution: Just set the background of the container like: backgroundColor="#ffffff"
<mx:HBox id="v1" width="100%" backgroundColor="#ffffff" height="100%" label="dd" dragDrop="dragDropHandler(event);" dragEnter="dragEnterHandler(event);">
No comments:
Post a Comment