Hello, everybody!
How to use addEventListener for File.createDirectory() on Adobe AIR?
I write code:
var dir:File = new File("e:\\").resolvePath("myDir");
dir.createDirectory();
dir.addEventListener(Event.COMPLETE, someFunc); // Tooltip show me that this
event i can use for my parameter and I want to check if my new Directory
created then call someFunc()
function someFunc(event:Event):void{
var file:File = File.desktopDirectore.resolvePath("test.jpg");
var newFile:File = dir.resolvePath(file.name);
file.copyTo(newFile, true);
}
but this code doesn't work. my someFunc doesn't execute. I see, my folder
creating with some pause, I get new folder after 2-3 seconds after execute
function and I want to check when my folder is created and after it copy to it
some files
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ