This is an automated email from the ASF dual-hosted git repository. yishayw pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 1efd61a4e668b60c8bf1e83d63679a634c3e0b8a Author: Yishay Weiss <[email protected]> AuthorDate: Tue Aug 23 17:32:17 2022 +0300 Fix some compile issues and show dragging - still no drop --- .../src/main/royale/mx/managers/DragManager.as | 10 +- .../src/main/resources/mx-royale-manifest.xml | 1 + .../src/main/royale/MXRoyaleBaseClasses.as | 1 + .../src/main/royale/mx/core/DragSource.as | 482 ++++++++++----------- .../src/main/royale/mx/managers/DragManagerImpl.as | 175 +++++--- .../src/main/royale/mx/managers/IDragManager.as | 2 +- 6 files changed, 351 insertions(+), 320 deletions(-) diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/DragManager.as b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/DragManager.as index 67c7266ef4..01f10bc235 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/DragManager.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/DragManager.as @@ -231,8 +231,8 @@ public class DragManager imageAlpha:Number = 0.5, allowMove:Boolean = true):void { - /* impl.doDrag(dragInitiator, dragSource, mouseEvent, dragImage, xOffset, - yOffset, imageAlpha, allowMove); */ + impl.doDrag(dragInitiator, dragSource, mouseEvent, dragImage, xOffset, + yOffset, imageAlpha, allowMove); } @@ -254,7 +254,7 @@ public class DragManager */ public static function acceptDragDrop(target:IUIComponent):void { - /* impl.acceptDragDrop(target); */ + impl.acceptDragDrop(target); } /** @@ -271,9 +271,7 @@ public class DragManager */ public static function showFeedback(feedback:String):void { - /* - impl.showFeedback(feedback); - */ + impl.showFeedback(feedback); } /** diff --git a/frameworks/projects/MXRoyaleBase/src/main/resources/mx-royale-manifest.xml b/frameworks/projects/MXRoyaleBase/src/main/resources/mx-royale-manifest.xml index bb901995da..bf8239f702 100644 --- a/frameworks/projects/MXRoyaleBase/src/main/resources/mx-royale-manifest.xml +++ b/frameworks/projects/MXRoyaleBase/src/main/resources/mx-royale-manifest.xml @@ -71,6 +71,7 @@ <component id="EmailValidator" class="mx.validators.EmailValidator"/> <component id="ZipCodeValidator" class="mx.validators.ZipCodeValidator"/> <component id="CursorManagerImpl" class="mx.managers.CursorManagerImpl"/> + <component id="DragManagerImpl" class="mx.managers.DragManagerImpl"/> </componentPackage> diff --git a/frameworks/projects/MXRoyaleBase/src/main/royale/MXRoyaleBaseClasses.as b/frameworks/projects/MXRoyaleBase/src/main/royale/MXRoyaleBaseClasses.as index a78f4ef767..73d4b42c63 100644 --- a/frameworks/projects/MXRoyaleBase/src/main/royale/MXRoyaleBaseClasses.as +++ b/frameworks/projects/MXRoyaleBase/src/main/royale/MXRoyaleBaseClasses.as @@ -288,6 +288,7 @@ internal class MXRoyaleBaseClasses import mx.validators.StringValidator;StringValidator; import mx.validators.ValidationResult;ValidationResult; import mx.validators.Validator;Validator; + import mx.core.DragSource; DragSource; diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/DragSource.as b/frameworks/projects/MXRoyaleBase/src/main/royale/mx/core/DragSource.as similarity index 96% rename from frameworks/projects/MXRoyale/src/main/royale/mx/core/DragSource.as rename to frameworks/projects/MXRoyaleBase/src/main/royale/mx/core/DragSource.as index 729e864fc2..1172592b20 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/DragSource.as +++ b/frameworks/projects/MXRoyaleBase/src/main/royale/mx/core/DragSource.as @@ -1,241 +1,241 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// Licensed to the Apache Software Foundation (ASF) under one or more -// contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. -// The ASF licenses this file to You under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//////////////////////////////////////////////////////////////////////////////// - -package mx.core -{ - -/** - * The DragSource class contains the data being dragged. The data can be in - * multiple formats, depending on the type of control that initiated the drag. - * - * <p>Each format of data is identified with a string. The - * <code>hasFormat()</code> method is used to determine if the object has - * data in that format. The <code>dataForFormat()</code> method is used - * to retrieve the data in the specified format.</p> - * - * <p>Data can be added directly using the <code>addData()</code> method, - * or indirectly using the <code>addHandler()</code> method. The - * <code>addHandler()</code> method registers a callback that will be called - * if the data is requested. This is useful for adding data in a non-native - * format that may require large computations or conversions. For example, - * if you have raw sound data you can add an MP3 format handler. The MP3 - * conversion will only be done if the MP3 data is requested.</p> - * - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 - * @royalesuppresspublicvarwarning - */ -public class DragSource -{ - /* include "../core/Version.as"; */ - - //-------------------------------------------------------------------------- - // - // Constructor - // - //-------------------------------------------------------------------------- - - /** - * Constructor. - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 - */ - public function DragSource() - { - super(); - } - - //-------------------------------------------------------------------------- - // - // Variables - // - //-------------------------------------------------------------------------- - - /** - * @private - */ - private var dataHolder:Object = {}; - - /** - * @private - */ - private var formatHandlers:Object = {}; - - //-------------------------------------------------------------------------- - // - // Properties - // - //-------------------------------------------------------------------------- - - //---------------------------------- - // formats - //---------------------------------- - - /** - * @private - * Storage for the formats property. - */ - private var _formats:Array /* of String */ = []; - - /** - * Contains the formats of the drag data, as an Array of Strings. - * Set this property using the <code>addData()</code> - * or <code>addHandler()</code> methods. - * The default value depends on data added to the DragSource object. - * - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 - */ - public function get formats():Array /* of String */ - { - return _formats; - } - - //-------------------------------------------------------------------------- - // - // Methods - // - //-------------------------------------------------------------------------- - - /** - * Adds data and a corresponding format String to the drag source. - * This method does not return a value. - * - * @param data Object that specifies the drag data. - * This can be any object, such as a String, a DataProvider, and so on. - * - * @param format String that specifies a label that describes - * the format for this data. - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 - */ - public function addData(data:Object, format:String):void - { - _formats.push(format); - - dataHolder[format] = data; - } - - /** - * Adds a handler that is called when data - * for the specified format is requested. - * This is useful when dragging large amounts of data. - * The handler is only called if the data is requested. - * This method does not return a value. - * - * @param handler Function that specifies the handler - * called to request the data. - * This function must return the data in the specified format. - * - * @param format String that specifies the format for this data. - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 - */ - public function addHandler(handler:Function, - format:String):void - { - _formats.push(format); - - formatHandlers[format] = handler; - } - - /** - * Retrieves the data for the specified format. - * If the data was added with the <code>addData()</code> method, - * it is returned directly. - * If the data was added with the <code>addHandler()</code> method, - * the handler function is called to return the data. - * - * @param format String that specifies a label that describes - * the format for the data to return. This string can be a custom value - * if you are creating a custom drop target with the <code>addData()</code> method. - * <p>List-based controls have predefined values - * for the <code>format</code> parameter. If the control that initiated the - * drag operation is a Tree, then the format is "treeItems" and the items - * implement the ITreeDataProvider interface. For all other List-based - * controls that have built-in drag and drop support, the format is "itemsByIndex" and the items - * implement the IDataProvider interface.</p> - * - * @return An Object - * containing the data in the requested format. - * If you drag multiple items, the returned value is an Array. - * For a List-based control, the returned value is always an Array, - * even if it contains a single item. - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 - */ - public function dataForFormat(format:String):Object - { - var data:Object = dataHolder[format]; - if (data) - return data; - - if (formatHandlers[format]) - return formatHandlers[format](); - - return null; - } - - /** - * Returns <code>true</code> if the data source contains - * the requested format; otherwise, it returns <code>false</code>. - * - * @param format String that specifies a label that describes the format - * for the data. - * - * @return <code>true</code> if the data source contains - * the requested format. - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 - */ - public function hasFormat(format:String):Boolean - { - var n:int = _formats.length; - for (var i:int = 0; i < n; i++) - { - if (_formats[i] == format) - return true; - } - - return false; - } -} - -} +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// + +package mx.core +{ + +/** + * The DragSource class contains the data being dragged. The data can be in + * multiple formats, depending on the type of control that initiated the drag. + * + * <p>Each format of data is identified with a string. The + * <code>hasFormat()</code> method is used to determine if the object has + * data in that format. The <code>dataForFormat()</code> method is used + * to retrieve the data in the specified format.</p> + * + * <p>Data can be added directly using the <code>addData()</code> method, + * or indirectly using the <code>addHandler()</code> method. The + * <code>addHandler()</code> method registers a callback that will be called + * if the data is requested. This is useful for adding data in a non-native + * format that may require large computations or conversions. For example, + * if you have raw sound data you can add an MP3 format handler. The MP3 + * conversion will only be done if the MP3 data is requested.</p> + * + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 0.9.3 + * @royalesuppresspublicvarwarning + */ +public class DragSource +{ + /* include "../core/Version.as"; */ + + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructor. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 0.9.3 + */ + public function DragSource() + { + super(); + } + + //-------------------------------------------------------------------------- + // + // Variables + // + //-------------------------------------------------------------------------- + + /** + * @private + */ + private var dataHolder:Object = {}; + + /** + * @private + */ + private var formatHandlers:Object = {}; + + //-------------------------------------------------------------------------- + // + // Properties + // + //-------------------------------------------------------------------------- + + //---------------------------------- + // formats + //---------------------------------- + + /** + * @private + * Storage for the formats property. + */ + private var _formats:Array /* of String */ = []; + + /** + * Contains the formats of the drag data, as an Array of Strings. + * Set this property using the <code>addData()</code> + * or <code>addHandler()</code> methods. + * The default value depends on data added to the DragSource object. + * + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 0.9.3 + */ + public function get formats():Array /* of String */ + { + return _formats; + } + + //-------------------------------------------------------------------------- + // + // Methods + // + //-------------------------------------------------------------------------- + + /** + * Adds data and a corresponding format String to the drag source. + * This method does not return a value. + * + * @param data Object that specifies the drag data. + * This can be any object, such as a String, a DataProvider, and so on. + * + * @param format String that specifies a label that describes + * the format for this data. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 0.9.3 + */ + public function addData(data:Object, format:String):void + { + _formats.push(format); + + dataHolder[format] = data; + } + + /** + * Adds a handler that is called when data + * for the specified format is requested. + * This is useful when dragging large amounts of data. + * The handler is only called if the data is requested. + * This method does not return a value. + * + * @param handler Function that specifies the handler + * called to request the data. + * This function must return the data in the specified format. + * + * @param format String that specifies the format for this data. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 0.9.3 + */ + public function addHandler(handler:Function, + format:String):void + { + _formats.push(format); + + formatHandlers[format] = handler; + } + + /** + * Retrieves the data for the specified format. + * If the data was added with the <code>addData()</code> method, + * it is returned directly. + * If the data was added with the <code>addHandler()</code> method, + * the handler function is called to return the data. + * + * @param format String that specifies a label that describes + * the format for the data to return. This string can be a custom value + * if you are creating a custom drop target with the <code>addData()</code> method. + * <p>List-based controls have predefined values + * for the <code>format</code> parameter. If the control that initiated the + * drag operation is a Tree, then the format is "treeItems" and the items + * implement the ITreeDataProvider interface. For all other List-based + * controls that have built-in drag and drop support, the format is "itemsByIndex" and the items + * implement the IDataProvider interface.</p> + * + * @return An Object + * containing the data in the requested format. + * If you drag multiple items, the returned value is an Array. + * For a List-based control, the returned value is always an Array, + * even if it contains a single item. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 0.9.3 + */ + public function dataForFormat(format:String):Object + { + var data:Object = dataHolder[format]; + if (data) + return data; + + if (formatHandlers[format]) + return formatHandlers[format](); + + return null; + } + + /** + * Returns <code>true</code> if the data source contains + * the requested format; otherwise, it returns <code>false</code>. + * + * @param format String that specifies a label that describes the format + * for the data. + * + * @return <code>true</code> if the data source contains + * the requested format. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 0.9.3 + */ + public function hasFormat(format:String):Boolean + { + var n:int = _formats.length; + for (var i:int = 0; i < n; i++) + { + if (_formats[i] == format) + return true; + } + + return false; + } +} + +} diff --git a/frameworks/projects/MXRoyaleBase/src/main/royale/mx/managers/DragManagerImpl.as b/frameworks/projects/MXRoyaleBase/src/main/royale/mx/managers/DragManagerImpl.as index 7a4986c426..a6379e706f 100644 --- a/frameworks/projects/MXRoyaleBase/src/main/royale/mx/managers/DragManagerImpl.as +++ b/frameworks/projects/MXRoyaleBase/src/main/royale/mx/managers/DragManagerImpl.as @@ -30,19 +30,24 @@ import mx.core.IFlexDisplayObject; import mx.core.IFlexModule; import mx.core.IFlexModuleFactory; import mx.core.IUIComponent; -import mx.core.LayoutDirection; -import mx.core.UIComponentGlobals; -import mx.core.mx_internal; +import org.apache.royale.events.MouseEvent; + +// import mx.core.LayoutDirection; +// import mx.core.UIComponentGlobals; +// import mx.core.mx_internal; // import mx.events.DragEvent; -import mx.styles.CSSStyleDeclaration; -import mx.styles.IStyleManager2; -import mx.styles.StyleManager; +// import mx.styles.CSSStyleDeclaration; +// import mx.styles.IStyleManager2; +// import mx.styles.StyleManager; import org.apache.royale.core.IBead; import org.apache.royale.html.beads.controllers.DragMouseController; -import org.apache.royale.html.beads.DragDropListView; +// import org.apache.royale.html.beads.DragDropListView; import org.apache.royale.events.DragEvent; import org.apache.royale.html.beads.controllers.DropMouseController; -import org.apache.royale.html.accessories.RestrictTextInputBead; +import org.apache.royale.core.UIBase; +import org.apache.royale.core.IUIBase; +import org.apache.royale.core.Lookalike; +// im`port org.apache.royale.html.accessories.RestrictTextInputBead; // use namespace mx_internal; @@ -156,7 +161,7 @@ public class DragManagerImpl extends EventDispatcher implements IDragManager, IB * @private * Object being dragged around. */ - public var dragProxy:DragProxy; + // public var dragProxy:DragProxy; /** * @private @@ -380,6 +385,31 @@ public class DragManagerImpl extends EventDispatcher implements IDragManager, IB } (dragInitiator as IStrand).addBead(dragController); dragController.addEventListener("dragMove", dragMoveHandler) + dragController.addEventListener("dragStart", dragStartHandler) + _dragSource = dragSource; + _lookAlike = createDragImage(dragInitiator); + } + + private var _lookAlike:UIBase; + protected function createDragImage(dragInitiator:IUIBase):UIBase + { + var dragImage:UIBase = new Lookalike(dragInitiator); + dragImage.className = "DragImage"; + dragImage.width = dragInitiator.width; + dragImage.height = dragInitiator.height; + COMPILE::JS + { + dragImage.element.style.position = 'absolute'; + dragImage.element.style.cursor = 'pointer'; + } + return dragImage; + } + + private var _dragSource:DragSource; + private function dragStartHandler(event:DragEvent):void + { + DragEvent.dragSource = _dragSource; + DragMouseController.dragImage = _lookAlike; } private function dragMoveHandler(event:DragEvent):void @@ -417,13 +447,13 @@ public class DragManagerImpl extends EventDispatcher implements IDragManager, IB */ public function acceptDragDrop(target:IUIComponent):void { - // trace("-->acceptDragDrop for DragManagerImpl", sm, target); + // // trace("-->acceptDragDrop for DragManagerImpl", sm, target); - if (dragProxy) - dragProxy.target = target as DisplayObject; + // if (dragProxy) + // dragProxy.target = target as DisplayObject; - if (hasEventListener("acceptDragDrop")) - dispatchEvent(new Request("acceptDragDrop", false, false, target)); + // if (hasEventListener("acceptDragDrop")) + // dispatchEvent(new Request("acceptDragDrop", false, false, target)); } @@ -441,17 +471,17 @@ public class DragManagerImpl extends EventDispatcher implements IDragManager, IB */ public function showFeedback(feedback:String):void { - // trace("-->showFeedback for DragManagerImpl", sm, feedback); - if (dragProxy) - { - if (feedback == DragManager.MOVE && !dragProxy.allowMove) - feedback = DragManager.COPY; + // // trace("-->showFeedback for DragManagerImpl", sm, feedback); + // if (dragProxy) + // { + // if (feedback == DragManager.MOVE && !dragProxy.allowMove) + // feedback = DragManager.COPY; - dragProxy.action = feedback; - } + // dragProxy.action = feedback; + // } - if (hasEventListener("showFeedback")) - dispatchEvent(new Request("showFeedback", false, false, feedback)); + // if (hasEventListener("showFeedback")) + // dispatchEvent(new Request("showFeedback", false, false, feedback)); } @@ -469,17 +499,18 @@ public class DragManagerImpl extends EventDispatcher implements IDragManager, IB */ public function getFeedback():String { - if (hasEventListener("getFeedback")) - { - var request:Request = new Request("getFeedback", false, true); - if (!dispatchEvent(request)) - { - return request.value as String; - } - } - - // trace("<--getFeedback for DragManagerImpl", sm); - return dragProxy ? dragProxy.action : DragManager.NONE; + // if (hasEventListener("getFeedback")) + // { + // var request:Request = new Request("getFeedback", false, true); + // if (!dispatchEvent(request)) + // { + // return request.value as String; + // } + // } + + // // trace("<--getFeedback for DragManagerImpl", sm); + // return dragProxy ? dragProxy.action : DragManager.NONE; + return null; } /** @@ -487,43 +518,43 @@ public class DragManagerImpl extends EventDispatcher implements IDragManager, IB */ public function endDrag():void { - var e:Event; - if (hasEventListener("endDrag")) - { - e = new Event("endDrag", false, true); - } + // var e:Event; + // if (hasEventListener("endDrag")) + // { + // e = new Event("endDrag", false, true); + // } - if (!e || dispatchEvent(e)) - { - if (dragProxy) - { - sm.popUpChildren.removeChild(dragProxy); + // if (!e || dispatchEvent(e)) + // { + // if (dragProxy) + // { + // sm.popUpChildren.removeChild(dragProxy); - if (dragProxy.numChildren > 0) - dragProxy.removeChildAt(0); // The drag image is the only child - dragProxy = null; - } - } + // if (dragProxy.numChildren > 0) + // dragProxy.removeChildAt(0); // The drag image is the only child + // dragProxy = null; + // } + // } - dragInitiator = null; - bDoingDrag = false; + // dragInitiator = null; + // bDoingDrag = false; } - /** - * @private - */ - static private function getStyleManager(dragInitiator:IUIComponent):IStyleManager2 - { - // If the dragInitiator has a styleManager, use that one. - // In a situation where a main application that loads a module with drag initiator, - // the main application may not link in the DragManager and appropriate styles. - // We want to use the styles of the module of the dragInitiator. See SDK-24324. - if (dragInitiator is IFlexModule) - return StyleManager.getStyleManager(IFlexModule(dragInitiator).moduleFactory); +// /** +// * @private +// */ +// static private function getStyleManager(dragInitiator:IUIComponent):IStyleManager2 +// { +// // If the dragInitiator has a styleManager, use that one. +// // In a situation where a main application that loads a module with drag initiator, +// // the main application may not link in the DragManager and appropriate styles. +// // We want to use the styles of the module of the dragInitiator. See SDK-24324. +// if (dragInitiator is IFlexModule) +// return StyleManager.getStyleManager(IFlexModule(dragInitiator).moduleFactory); - return StyleManager.getStyleManager(sm as IFlexModuleFactory); - } +// return StyleManager.getStyleManager(sm as IFlexModuleFactory); +// } //-------------------------------------------------------------------------- // @@ -534,18 +565,18 @@ public class DragManagerImpl extends EventDispatcher implements IDragManager, IB /** * @private */ - private function sm_mouseDownHandler(event:MouseEvent):void - { - mouseIsDown = true; - } + // private function sm_mouseDownHandler(event:MouseEvent):void + // { + // mouseIsDown = true; + // } /** * @private */ - private function sm_mouseUpHandler(event:MouseEvent):void - { - mouseIsDown = false; - } + // private function sm_mouseUpHandler(event:MouseEvent):void + // { + // mouseIsDown = false; + // } private var _strand:IStrand; public function set strand(value:IStrand):void diff --git a/frameworks/projects/MXRoyaleBase/src/main/royale/mx/managers/IDragManager.as b/frameworks/projects/MXRoyaleBase/src/main/royale/mx/managers/IDragManager.as index 0408ad1016..1b5d6a6189 100644 --- a/frameworks/projects/MXRoyaleBase/src/main/royale/mx/managers/IDragManager.as +++ b/frameworks/projects/MXRoyaleBase/src/main/royale/mx/managers/IDragManager.as @@ -21,7 +21,7 @@ package mx.managers { -import flash.events.MouseEvent; +import org.apache.royale.events.MouseEvent; import mx.core.DragSource; import mx.core.IFlexDisplayObject;
