I have tested some code in a seperate application and everything is fine. In
my app I am using Cairngorm and I have a custom view. My main file is pretty
simple as you can see below. The problem I having is that in the custom view
I can never get the dragdrop to fire. The enter and exit trace statements
execute just fine. As I said, I set up a test app and this seems to work
fine. Anyone know what im doing wrong here?


MAIN
    <mx:ViewStack id="viewStackManager"
selectedIndex="{modelLocator.workflowState}"
        width="100%" height="100%">

        <view:LoginForm/>

        <view:CustomView/>

    </mx:ViewStack>

CUSTOM VIEW
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas
    xmlns:mx="http://www.adobe.com/2006/mxml";
    creationComplete="init()">

    <mx:Script>
        <![CDATA[
            import com.**.uploader.model.ModelLocator;
            import flash.events.NativeDragEvent;

            [Bindable]
            private var modelLocator:ModelLocator =
ModelLocator.getInstance();

            private function init():void {

this.addEventListener(NativeDragEvent.NATIVE_DRAG_DROP,onDrop);

this.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER,onEnter);

this.addEventListener(NativeDragEvent.NATIVE_DRAG_EXIT,onExit);
                trace("init");
            }

            private function onDrop(event:NativeDragEvent):void {
                trace("Drag Drop");
            }
            private function onEnter(event:NativeDragEvent):void {
                trace("Drag Enter");
                NativeDragManager.acceptDragDrop(this);
            }
            private function onExit(event:NativeDragEvent):void {
                trace("Drag Exit");
            }

        ]]>
    </mx:Script>

    <mx:List id="fileList" width="100%" height="100%"
backgroundColor="#ffffff" dropEnabled="true"
        paddingTop="10" paddingRight="10" paddingBottom="10"
paddingLeft="10">

    </mx:List>

</mx:Canvas>

Thank You
Dan Vega
[EMAIL PROTECTED]
http://www.danvega.org

Reply via email to