According to DOCUMENTATION no, but copyToAsync()
function is dispatching Event.COMPLETE
.
as3 addEventListener to .copyTo()
-
06-10-2022 - |
Question
Is there a way to add an event listener to the copyTo() function so I can run code once the action is complete?
Below is my code and that last line is what I would assume might work, but it doesn't.
var sourceDir:File = File.applicationDirectory.resolvePath("userSettings.xml");
var resultDir:File = File.applicationStorageDirectory.resolvePath("userSettings.xml");
sourceDir.copyTo(resultDir, true);
// Is this possible?
sourceDir.addEventListener(Event.COMPLETE, fileCopied);
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow