Skip to main content
October 12, 2010
Question

flash.desktop.NativeApplication.nativeApplication.activate() + MOUSE_OVER

  • October 12, 2010
  • 1 reply
  • 788 views

I'm experimenting with Native D&D in AIR. After I select a file(e.g. in Total Comander) and drag it to my app. Somewhy when I'm dragging a file MOUSE_OVER event do not thrown on movi clips. Can someone explain me why? Thank you

This topic has been closed for replies.

1 reply

October 12, 2010

try:

mc1.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER, onDragEnter);
mc1.addEventListener(NativeDragEvent.NATIVE_DRAG_DROP, onDragDrop,false,0,true);


function onDragEnter(evt:NativeDragEvent):void
{

NativeDragManager.acceptDragDrop(mc1);

}

function onDragDrop(evt:NativeDragEvent)
{

}

October 12, 2010

hm. that changes cursor to standart drop cursor. But events are still not thrown.

I'll specify situation. If I activate Total Comander and just move mouse over the topics the event is thrown. The event is not thrown only if I'm dragging a file.

October 12, 2010

I dont have T.Commander.
Why do you use this?

The codes I wrote work for me and I can drop a file on a movieclip (mc1) and t1.text displays "Dropped".

mc1.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER, onDragEnter);
mc1.addEventListener(NativeDragEvent.NATIVE_DRAG_DROP, onDragDrop,false,0,true);


function onDragEnter(evt:NativeDragEvent):void
{

NativeDragManager.acceptDragDrop(mc1);
t1.text = "Entered";
}

function onDragDrop(evt:NativeDragEvent)
{
t1.text = "Dropped";
}