• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Air Application URL Path Issue

Guest
Oct 13, 2011 Oct 13, 2011

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

TOPICS
Performance issues

Views

731

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 13, 2011 Oct 13, 2011

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 13, 2011 Oct 13, 2011

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 ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Oct 19, 2011 Oct 19, 2011

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 20, 2011 Oct 20, 2011

Copy link to clipboard

Copied

Thanks for your reply .

DO you mean that param.txt file should be exist is web server ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Oct 20, 2011 Oct 20, 2011

Copy link to clipboard

Copied

LATEST

Yes, and I think it's easy to set up a web server on that computer.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines