Nobody know how create eventListener for File.createDirectory() ???

----- Original Message ----
From: Carlo Gulliani <[EMAIL PROTECTED]>
To: Flexcoders <flexcoders@yahoogroups.com>
Sent: Monday, May 5, 2008 4:53:11 PM
Subject: [flexcoders] addEventListener() for File.createDirectory(). How to use?


Hello, everybody!

How to use addEventListener for File.createDirector y() on Adobe AIR?

I write code:

var dir:File = new File("e:\\") .resolvePath( "myDir");
dir.createDirectory ();
dir.addEventListene r(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.desktopDirecto re.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.  


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Reply via email to