how exactly do i execute a function when a file is dropped on the window?
i’m trying to make this on windows / linux
how exactly do i execute a function when a file is dropped on the window?
i’m trying to make this on windows / linux
https://lime.openfl.org/api/lime/ui/Window.html#onDropFile
The callback expects a string param which is the path of the file you dropped.
That’s reminding me that I made some improvement in a PR long time ago. I need to ckeck what I can do to close this PR.
i didnt find anything that helps there
I had to do the same a few weeks ago for a Windows application. This was the code I used:
Lib.current.stage.window.onDropFile.add( onFileDropped)
private function onFileDropped(filePath:String):Void
{
// code to execute goes here
}
I linked you to the exact API you needed above. @Tamar gave you the use-case example. I can verify this is exactly what you are looking for.
thanks for the help
it worked