Copy link to clipboard
Copied
I am trying to invoke a content of the file which is in shared folder from Air application.
Version : Flash builder 4.5,Flex3.6 sdk and Air 2.7.
for this am using the below code..
var request:URLRequest = new URLRequest();
//request.url = ('file:///c:/params.txt'); - This is working fine
request.url = ('file:///172.20.188.25/Share/chk/Property/params.txt'); // its not working
trace("Unable to load URL: " + request);
var variables:URLLoader = new URLLoader();
variables.dataFormat = URLLoaderDataFormat.VARIABLES;
variables.addEventListener(Event.COMPLETE, completeHandler);
try
{
variables.load(request);
}
The same part of code ,I tried in Flex application is working .but in Air application its not working.
Its urgent requirement,If any one know the way to resolve this path issues.
Kindly let us know.
Thanks in Advance !!
Copy link to clipboard
Copied
Try using http:/ URI scheme instead of file:/
Copy link to clipboard
Copied
I tried in the following URL but no use ..
its throwing ioError and textError and stream error.
1.file:///172.20.188.25/Share/chk/Property/params.txt
2.http://172.20.188.25/Share/chk/Property/params.txt
3. //172.20.188.25/Share/chk/Property/params.txt
Is there any other solution for this issue ?
Copy link to clipboard
Copied
I think put the file under a apache server could be worked as a workaround. Then you can use "http://172.20.188.25/Share/chk/Property/params.txt".
I don't think AIR support remote network file reference for security issues.
Copy link to clipboard
Copied
Thanks for your reply .
DO you mean that param.txt file should be exist is web server ?
Copy link to clipboard
Copied
Yes, and I think it's easy to set up a web server on that computer.