RE: [flexcoders] Prob with CopyTo in AIR[getting File or directory does not exist Error]

2009-02-17 Thread Kevin Benz
You need to use the HTTP objects to download the file and save it as a
local file. File which creates a reference to the file is incompatible
with the stream based HTTP. As I remember, File can only reference the
app:// and file:// local protocols. 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of ursprakash6
Sent: Monday, February 16, 2009 11:55 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Prob with CopyTo in AIR[getting File or directory
does not exist Error]

 

Hi All

I'm very new to Adobe AIR,in My sample application i'm trying to copy
one image in website to local file system,i got File or directory does
not exist error

 i have tried the below lines of code

var vfile:File=new
File(http://tinycomb.com/wp-content/uploads/2008/12/adobe-logo.jpg;);
var dfile:File=File.applicationStorageDirectory.resolvePath(tempdata/
+ video_url);
vfile.copyTo(dfile, true);


here i'm copying to ApplicationstorageDirestory,this would be any local
direstory

But i'm gtting File or directory does not exist error fot the above
code.

Can any one tell me whats wrong with the above code 

Thanks in Advance

Gnanz...
http://gnanz-flexworld.blogspot.com




-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean. 

image001.jpgimage002.jpg

[flexcoders] Prob with CopyTo in AIR[getting File or directory does not exist Error]

2009-02-16 Thread ursprakash6
Hi All

I'm very new to Adobe AIR,in My sample application i'm trying to copy
one image in website to local file system,i got File or directory does
not exist error

  i have tried the below lines of code

var vfile:File=new
File(http://tinycomb.com/wp-content/uploads/2008/12/adobe-logo.jpg;);
var dfile:File=File.applicationStorageDirectory.resolvePath(tempdata/
+ video_url);
vfile.copyTo(dfile, true);


here i'm copying to ApplicationstorageDirestory,this would be any local
direstory

But i'm gtting File or directory does not exist error fot the above
code.

Can any one tell me whats wrong with the above code

Thanks in Advance

Gnanz...
http://gnanz-flexworld.blogspot.com