StageWebView for Local HTML file

I simply cannot get this to work.  I see a lot of people offering advice on the web for how to implement it, I've been trying all day and it doesn't work with Adobe AIR 2.5 for Android Flash CS5 plug-in.
Instead of linking to an external website:
     webView.loadURL(http://www.google.com);
I want to use StageWebView (because of the nice scroll capability) to load a local html file.  I have tried EVERYTHING, and it doesn't work.
I have included the file in the APK (tried as a subdirectory and eventually, to simplify testing, I just included it in the same directory so no complex path).
I have tried what others had recommended:
    webView.loadURL("test.html");
I have tried using the filesystem and resolving the path:
    import flash.filesystem.File; 
    var file:File = File.applicationDirectory.resolvePath("test.html") ;
    webView.loadURL(file.nativePath) ;
I have tried numerous change-ups on the filesystem approach, including:
    var file:File = new File("app:/test.html");
and
    webView.loadURL(file.url);
NONE OF THESE THINGS WORK.  Can anyone help me?  I'd like to have scrollable content, included inside the Android app - like a license html file or others.
If none of this will work, any suggestions on creating simple, scrollable content that looks nice (scroll pane, scroll list, anything?)

Hi Joe,
can you show code snippet for the 1st solution? With loadString you can't load anything else into that page (i..e stylesheet)
Edit: soon after I've posted this question I have found a solution:)
var resultsPageUrl:String = File.applicationDirectory.resolvePath("output-html/result_html_pattern.html").nativePath;
//and later
webView.loadURL(resultsPageUrl);
Edit2: above was just enough to have it working in adl still no joy
Here is an example of temporary file being loaded, this works, http://forums.adobe.com/message/3443946
var source:File = File.applicationDirectory.resolvePath("output-html");//copy entire folder (with css)
var destination:File = File.applicationStorageDirectory;
source.copyTo(destination, true);//copy to the application storage
//get path to the html page within copied folder
var resultsPageUrl:String = "file://" + destination.resolvePath("result_html_pattern.html").nativePath;
best regards

Similar Messages

  • Firefox will not automatically convert local pdf URL to include file:// like it does for local html files

    I have some local PDFs sorted by navigating some local html files. Firefox recognizes that the html files need to be addressed file:///C:/SD_Online/datasc.html. When clicking the link for a PDF it remains c:/SD_Online/L-R4-106.pdf and I get an error saying "Firefox doesn't know how to open this address, because one of the following protocols (c) isn't associated with any program or is not allowed in this context."

    Press the '''Alt''' or '''F10''' key to bring up the tool bar.
    Followed by; '''File > Open File.'''

  • Cookie preference not remembered for local html files

    I use Firefox's very useful "ask every time" cookie screening facility and have selected "Use my choice for all cookies from this site". However, it will not remeber my preference for local files.
    The Adobe Acrobat Editor's help uses html files on my PC's local C: drive. Whenever this is launched Firefox always displays a "Confirm setting cookie" message "The site file:// wants to modify an existing cookie." 16 times before the html is fully displayed and at least once every time I select a link within the html.
    Firefox's address bar displays:
    "file:///C:/Program Files/Common Files/Adobe/Help/en_US/Acrobat Pro/9.0/help.html"
    How can I avoid this annoying, time-consuming behaviour with local files whilst still screening cookies for internet sites?

    I've tried variations of the theme of "http://localhost/" like:
    "http://localhost/C:/Program Files/Common Files/Adobe/Help/en_US/Acrobat Pro/9.0/help.html" in the Firefox address, desktop shortcuts and cookies exceptions. These all result in errors.
    What browser address should I use instead of:
    "file:///C:/Program Files/Common Files/Adobe/Help/en_US/Acrobat Pro/9.0/help.html"?

  • Retrieving URL for local html file in jar

    I can't seem to load an html file from my jar file. I did
    public URL howtouse=this.getClass().getClassLoader().getResource("howtouse.html");and then added a hyperlinklistener to a editorpane that contained:
    "<a href='"+howtouse+"'>how to use</a>";which opens in the default browser on click:
    if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
                     BareBonesBrowserLaunch.openURL(e.getDescription().trim());
               }it works, but not in an exec jar file. How can I make it work? thanks!

    Is the jar on the classpath? If not, the file can't be found.

  • StageWebView to local HTML???

    StageWebView to local HTML file
    It is possible to work locally Ipad?
    I appreciate all the help

    Thank you for your feedback, Sinious.
    Unfortunately not know the correct implementation solution is to try.
    You have some implementation related to that need?
    I look forward to returning.
    Thankful.

  • How to load local html-file into webBrowser tool? [SDK 6.5]

    The webbroser tool lets you load an external html by inputting the adress in its "Url"-property.
    But how do you load a local html-file that is added to your project? Lets say the path is: Folder1/Subfolder1/Webpage1.html. What would I put in the Url-property to make this work?
    While on this subject, what is the support for css and javascript when using locally loaded webpages in the webbrowser?

    Thanks for the answer Malleswar, but I have now played around with all variations of that code-line that I can think of, but still I can not locate the html-file that is located within the project. Since Im planning to distribute the html-files with the executable (as one file) it should read it directly from wherever the application is installed.
    The html-file is included within the project. Solution Explorer -> Solution 'myProject' -> myProject -> Webpage1.html
    Which is (as usual) also where the Form1.cs (which contains the webBrowser-component) is located.
    Any ideas of how the Uri should be constructed in this case?
    Thanks,
    Daniel

  • Opening local .html files on iPad

    I have created a personal homepage that I have loaded on my Macs at home. Any way I can use this file on my iPad 3?

    It is possible to open local HTML files in Safari on iPad2. Easy!
    Open your Safari.
    Touch Bookmark icon for a little while.
    A dialogue box appears with "/var/Mobile" title.
    Go to "Applications" > your app (iFile, GoodReade or whatever yours) > Documents.
    And you are there. Open your HTML files.
    Now you can go anywhere to and fro without problem.
    It is FTP:///.
    If need later, Bookmark that.
    With Loving-Kindness!
    bhikkhusirin

  • Parse local HTML files

    Hi,
    I want to parse local HTML files.
    Is there another way than using the Internet Explorer($ie = new-object -com "InternetExplorer.Application";) (without relaying on external packages)?
    At the moment I do something like that:
    $ie = new-object -com "InternetExplorer.Application";
    Start-Sleep -Seconds 1
    $ie.Navigate($srcFile)
    Start-Sleep -Seconds 1
    $ParsedHtml = $ie.Document
    foreach($child in $ParsedHtml.body.getElementsByTagName('table'))
    I still want to have the methods like 'getElementById()' or 'getElementByTagName()'.
    With my current approache, the performance is not realy good and it seems that the iexplorer.exe process is not terminating at the end of the script. 
    Also it seems to have sideeffects with running internet explorer instances (from GUI) - not working to start IE in powershell sometimes.
    Last time I also have a hanging script, not continuing till i manually terminate the iexplorer.exe process.
    The error was:
    Exception calling "Navigate" with "1" argument(s): "The remote procedure call f
    ailed. (Exception from HRESULT: 0x800706BE)"
    At D:\Scripts\Run.ps1:529 char:14
    + $ie.Navigate <<<< ($src)
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation
    so I would prefere a method parsing HTML without IE.

    Hi John Mano,
    Please also try to Parse local HTML files with
    System.Xml.Linq, the script may be helpful for you:
    Using PowerShell to parse local HTML files  
    I hope this helps.                               
    XML?
    I thought HTML is not compatible with xml. 
    And as I don't know LINQ good ... 
    Ok, I'll give it a try. later.
    I can't answer the question about other ways to parse HTML, but to close your IE session you should do the following:
    $ie.Quit() # this terminates the IE process
    $ie = $null # this frees the COM object memory
    Thanks for that.
    I now use that, but seems to be still some IEs open ...
    Maybe a path missing where i dont do it.
    But finally I still get this error. And it is blocking the whole script ...
    Exception calling "Navigate" with "1" argument(s): "The remote procedure call f
    ailed. (Exception from HRESULT: 0x800706BE)"
    At E:\DailyBuild\Scripts\PublishTestResults.ps1:533 char:15
    + $ie.Navigate <<<< ($srcFile)
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation

  • Send local html files to Browser

    I have a Servlet program which can send any HTML files located on the computer which Tomcat is running to client browser. The HTML files are not necessarily in Tomcat's "webapps" folder. My method is quite simple. Read the content of the local HTML file and write it out through HttpServletResponse object. But there is problem that if the HTML file includes images, the images don't appear in client browser. Is there a way to send those images to client browse as well? Thanks in advance.

    Well, this is just an idea, but:
    You would probably have to create a new Servlet, that will identify the image type, set the correct content type (response.setContentType("image/gif") for example). It would have to get a binary InputStream to the image and copy the input to the output stream in the response(use the getOutputStream and not getWriter...)
    In your HTML writing servlet you would have to scan each line for an <img ... > tag parse out the source and replace it with the image servlet.
    Locating the image may be problematic if it is not given in absolute "file://" url. You may need to scan for a <base> tag in the HTML as well, or use the HTML page's directory for the path in which to find the image... but it could come in more complicated then that depending on how complicated the HTML was written (ie, for a server with multiple hosts, or with aliased paths...)
    Or, you might be able to write a filter that looks for images(*.gif *.jpg) and sends the request to your image servlet....

  • Can't select local html files with web object in captivate 8

    I can select pdf's via browse, but it I want to add local html files I have to type the path in manually. I'm guessing this is just a bug, I should be able to choose web pages for the web object even if they are local right?

    Fireworks is a graphics editor that can export code; it is not an HTML/code editor.
    If you have exported HTML from Fireworks, you ought to be able to re-import that, but I would think most people who use Fireworks exported code would just modify their Fireworks document and re-export. (Fireworks' code is not robust and it is only intended for mockups and prototypes. Fireworks is not intended for developing and maintaining live Web sites; Dreamweaver is.)
    If your developer used Dreamweaver, then I really don't expect that Fireworks would be able to import that, nor any code that isn't in exactly the format that it can export. If you know your developer used Fireworks, then you need to look for .png files. Fireworks uses an enhanced version of the PNG format for its native document format.
    If you are making small adjustments to your site, then you might be better off working in Dreamweaver. If you're doing a site re-design, then Fireworks is an excellent tool for laying out your design and producing your graphics, but you will, at some point, need to move over to Dreamweaver for coding.

  • Open Local HTML file in app browser?

    Hi,
    We have a question, we would like to link to a local HTML file form within a DPS article, we need the HTML file to open up in the in-app browser; we cannot use a web content overlay for this particular feature. We are able to achieve this easily with content from an online source by creating a Go To URL link with the website in the URL section.
    Can this be done form the HTML resource folder and can this be tested in the adobe content viewer?
    Or even better can we easily link to a local folder using the Go TO URL with a local file path? If so what would this be?
    Thanks
    Daydream

    Yes, you can open an HTML file in an in-app browser by adding the HTML file to the HTMLResources.zip. Create a button with a Go To URL action that looks something like this:
    HTMLResources/HTML_Local/index.html
    Make sure that you create your HTMLResources.zip file properly and upload it to the folder. You can test this in the Adobe Content Viewer on either the iPad or the Desktop as long as you preview the folio (not the article or layout).
    Basically, you use the same technique to link to the HTML file that you use to link to PDF files. For details, see the DPS Tips app > Advanced Overlays > Linking to PDF Files.

  • How to display local HTML file in web-view?

    Hello everyone,
    we have no problem with showing of remote HTML content from server in box on page in web view. But how we can show such a content when included in HTMLResources? In guide is just "Display a local HTML file in an in-app browser", which works wihout problem, but we don't want to show this HTML content in in-app viewer, it should be part of page.
    Thanks
    Martin

    Now i'm confused. In guide is this:
    To use local HTML files, click the folder icon and specify the local HTML file. The HTML file (such as index.html) should appear in a folder that includes any images or scripts used in the HTML file.
    But no info where such a local HTML file should reside. If this file is in HTMLResources, it is ignored.

  • WebView with local html file

    How can I use webview to display a local html file?

    Here is a link that will help:
    "How To Read a File From Your Application Bundle"
    http://iphoneincubator.com/blog/data-management/how-to-read-a-file-from-your-app lication-bundle
    but basically you do this:
    // urlLocation is of type (NSURL *) and
    // webView is of type (UIWebview *)
    NSString *filePath = \[\[NSBundle mainBundle\] pathForResource:@"MyFileName" ofType:@"html"\];
    urlLocation = \[NSURL fileURLWithPath:filePath\];
    \[webView loadRequest:\[NSURLRequest requestWithURL:urlLocation\]\];
    ALSO, make sure your html file is part of your project so that it's also part of the bundle.
    Hope this helps!

  • FF 10: cannot load local html files by dragging to FF; links in email don't open

    Just upgraded to FF 10. I cannot open a local html file by dragging it to to FF, or by clicking the file name. Clicking the file name brings up an error message: There was a problem sending the command to the program. Dragging just shows a circle with a slash.
    I can open a local file by typing "file///<file location>" in the location bar.
    Also, clicking a link in an email to any site does not open the site.

    Hi,
    Please see [http://kb.mozillazine.org/Windows_error_opening_Internet_shortcut_or_local_HTML_file_-_Firefox this]. You can start Firefox in [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode] to check if an add-on is causing the problem. You can also try to '''Open with''' by right-clicking on the HTML file and choose Firefox and enable '''Always use the selected program to open this kind of file'''.

  • Safari 5.1 does not open local html files

    Safari 5.1 does not open local html files (with .htm or .html extensions). It fails on files that previous versions of Safari opened. Firefox continues to open them. Any suggestions?

    Turn this option off:
    Regards,
    Colin R.

Maybe you are looking for

  • How to make a website for desktop and mobile

    I just have a question about, for example, washingtonpost.com.  I know in CSS you used to be able to put that "/media" and "/screen" command in head and when the page loads, it detects the device and sends you to either mobile or desktop. I went to W

  • Wireless connection unable to automatically connect

    My wireless router is working perfectly as other devices are having no trouble connecting wirelessly.  My HP LaserJet CP1525nw will not find the wireless connection for wireless printing.  Apparently HP does not support these problems unless the warr

  • 2009 macbook running slow after installing 2011 microsoft office, skype won't work either

    Daughter just installed microsoft office 2011 ( her college sells it to students for $15.00 & you can use it for 4 years) on her 2 year old macbook.  Computer is now running very slow and she isn't able to skype either.  She got rid of her old micros

  • Save as system wide default

    Hi, I did some changes to some column and set as system wide default for that column in dev. 1. for example there are 20 existing reports using this column. does this format applicable to existing reports? 2. How can I migrate this system wide defaul

  • Procedure for recovering Clusterware/DB from te BCV copy

    I have a customer they wanted to setup a test environment (HPUX ) same as their production 11gRAC.They had taken the clone image from both production node & restored to the test machines. Even the ASM Disk are presented to new Test machines. New test