Skip to main content
October 13, 2011
Question

Air Application URL Path Issue

  • October 13, 2011
  • 1 reply
  • 843 views

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 !!

This topic has been closed for replies.

1 reply

October 13, 2011

Try using http:/ URI scheme instead of file:/

October 13, 2011

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 ?

Participating Frequently
October 20, 2011

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.