This content has been marked as final. Show 8 replies
Noone knows? :-(
Oh, come on... There must be a way to get the path of the drop target :-(
No, unfortunately, there is no way to get this information.
I need a solution for my following problem then :-(
I want my user to be able to drag a file from the inside of my app and drop it right e.g. on his desktop (The file is not locally available. It needs to be downloaded first. FTP-Client style).
My program should download the file from a webservice now and put it on the desktop.
Now here comes the dilemma:
The NativeDragManager needs the file in its clipboard-object BEFORE the actual d&d operation has finished (short version of the code):
var clip:Clipboard = new Clipboard();
var arr:Array = new Array;
arr.push(dragFile); // dragFile is an instance of "File"
NativeDragManager.doDrag(mouseEvent2.target as InteractiveObject, clip, bitmap, null, dragOptions);
This means, I have 2 possible choices (as far as I can see it):
1. I let the app download the file once the user fires a mouseDown-Event on the file he wants to download and put it into the clipboard object for the NativeDragManager. This is not a very elegant one, since the download needs to be finished before the user ends his d&d operation. Otherwise the dropped file may be corrupted.
2. I let the user do his d&d operation and use a dummy-file for the NativeDragManager. When the d&d operation has finished, I start downloading the file to the place where the user dropped his file.
I think the 2nd one is the better solution, but unless I can't get the target path, I don't know where to download the file to.
Any ideas? :-(
I am really stuck at this point.
Noone's got an idea here?
I dun need any code examples, just a little hint into the right direction :(
There's no way to do this.You'll have to rethink your design. Maybe have a download step that copies the files to a temp directory, then show those files in the air app so that they can be dragged to their final destination.
thanks for the info though
This is getting to be absurd! My company has a lot riding on Adobe AIR having chosen it as our technology foundation over a year ago. It is truly astounding how many features seem to perfect only to be revealed as fatally flawed once you start working with them!
Yeah, I was very excited about AIR when I started developing apps with it but now after half a year, I am a bit dissappointed.
FLEX is a great development envoirenment though, beating Flash by miles, if it comes up to apps that run inside a webbrowser.
But there are WAY better platforms out there for "real" desktop applications than AIR