Skip navigation
Currently Being Moderated

NavigateToURL to local file

Sep 27, 2011 9:34 AM

Hi!

 

I need print a HTM local file and a PDF external file. To select print application and opening the file, i'm using navigateToURL method.

 

This technic is working to the PDF external file, but, when i try to open my local file HTM,  the application is not working.

 

Maybe, i have something bad at my code. Or it's security problem. Any idea?

 

var fileLocal:File = File.documentsDirectory.resolvePath(data.URL_LOCAL);

if (fileLocal.exists)

{   

          var rootLocalfile:String = fileLocal.url;

         

          try

          {

                    navigateToURL(new URLRequest(rootLocalfile));

          }

           catch (e:Error)

           {

                     trace("Error: " + e.message);

          }

}

 

I need print the HTM local file without using the new AIR 3. That is possible?

 

I tried to use File.openWithDefaultApplication, but it's not supported to AIR for Android. Although, it isn't specified at documentation of Adobe.

Someone know where is it written.

 

Thanks!

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points