0 Replies Latest reply: Sep 27, 2011 9:34 AM by RaRaton RSS

    NavigateToURL to local file

    RaRaton Community Member

      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!