Open local html document in flash

I've been using the getURL command to open documents on a
remote server. I need to be able to open a local document on a
local intranet. Is the a command to open a local html file on a
local or networked drive?

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.

Similar Messages

  • Opening an HTML popup from Flash, not as tab

    Hi
    I need to open an HTML popup from Flash (using ActionScript in
    Flex 4).
    Thus far I found a solution, and it does work in Safari - a new
    and separate HTML window is popped up (with a new web page).
    private function popUpTheHtmlEditor():void {
      var url:String = "http://www.adobe.com";
      var request:URLRequest = new URLRequest(url);
      try {
        navigateToURL(request, '_blank');
      } catch (e:Error) {
        trace("Error occurred!");
    But in (my) Firefox (with my settings), when I click on the Flash
    (Flex) button, the page is being opened in a new tab.
    I need a solution which pops up the HTML page in a new/separate
    window, as far as possible regardless of the browser (and browser
    settings).
    I found an example where a popup is opened from HTML, and it opens a
    separate window (a real popup) in my Firefox:
    http://www.gtalbot.org/FirefoxSection/Popup/PopupAndFirefox.html
    -> "Open a requested popup"
    The JavaScript code seems to be:
      OpenRequestedPopup(this.href, this.target); return false;
    with this function def:
      function OpenRequestedPopup(strUrl, strTarget)
        if (WindowObjectReferenceOfRequestedPopup == null || WindowObjectReferenceOfRequestedPopup.closed)
        WindowObjectReferenceOfRequestedPopup = window.open(strUrl, strTarget, "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",menubar,toolbar,location,resizable,scrollbars,status");
        else
        if(WindowObjectReferenceOfRequestedPopup.focus)
          WindowObjectReferenceOfRequestedPopup.focus();
    How could I call such code from ActionScript? Should this work through
    ExternalInterface? I couldn't even get this to work:
      ExternalInterface.call('alert', 'foo');
    Should I use swfobject.js for embedding the .swf in the HTML wrapper?
    Any other ideas?
    The two files are pasted below.
    Here's the compiler command I'm using:
      mxmlc -output button.swf -target-player 10.0.0 flash_to_editor.mxml
    I'm running the examples locally (as files, not over http). Would it
    help to place the files on a server?
    Tobi
    <?xml version="1.0" encoding="UTF-8"?>
    <mx:Application
      xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      horizontalAlign="center" verticalAlign="middle">
      <fx:Script>
        <![CDATA[
    import mx.controls.Alert;
    import flash.external.ExternalInterface;
    import flash.net.URLRequest;
    // This 'http://www.adobe.com' is just an example URL.
    // Works but opens tab in FF (not a separate window):
    private function popUpTheHtmlEditor():void {
      var url:String = "http://www.adobe.com";
      var request:URLRequest = new URLRequest(url);
      try {
        navigateToURL(request, '_blank');
      } catch (e:Error) {
        trace("Error occurred!");
    // Doesn't work:
    // var url:URLRequest = new URLRequest("javascript:alert('foo'); void(0);");
    // navigateToURL(url, "_self");
    // How to get this to work?
    private function popUpTheHtmlEditor():void {
      ExternalInterface.call('alert', 'foo');
    // How to get this to work?
    private function popUpTheHtmlEditor():void {
      ExternalInterface.call('launch','http://www.adobe.com');
      // Or
      // ExternalInterface.call("window.open", "http://www.adobe.com", "win", "height=200,width=300,toolbar=no,scrollbars=yes");
    // Perhaps it's necessary to try different approaches:
    // (As soon as I get two approaches to work.)
    private function popUpTheHtmlEditor():void {
      var s:String;
      if (ExternalInterface.available) {
        // Necessary? Safe?:
        // Security.allowDomain('*');
        s = ExternalInterface.call('launch','http://www.adobe.com');
      } else {
         // TODO: Then try URLRequest?
         s = "Wrapper not available";
      Alert.show(s);
        ]]>
      </fx:Script>
      <s:Panel title="One way to open the HTML editor"
      width="75%" height="75%">
        <s:Button id="button" label="Open the HTML editor"
        click="this.popUpTheHtmlEditor();"
        horizontalCenter="0" verticalCenter="0"/>
      </s:Panel>
    </mx:Application>
    <html
      xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="en" lang="en">
      <head>
        <title>html_around_swf.html</title>
        <script type="text/javascript">
    function launch(url) {
      alert(url);
      //  OpenWin = this.open(url, "FOO", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=400,height=200");
        </script>
      </head>
      <body>
        <object id="button" name="button" width="550" height="400"
        classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
          <param name="movie" value="button.swf" />
          <param name="allowScriptAccess" value="always" />
          <embed id="foo" name="button" src="button.swf" width="550" height="400"></embed>
        </object>
      </body>
    </html>

    Hi, 
    Here's a solution.
    1. Make ExternalInterface work when files are loaded as local files: 
    Go to
    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.htm l 
    In tab Global Security Settings: Edit Locations -> Add Location ->
    browse to the .swf file, add it. Make sure it's in the list (under the
    Edit Locations drop down, with a green check mark.) 
    Now open the HTML wrapper in a browser (eg Firefox). 
    Now this works (ActionScript): 
    private function popUpTheHtmlEditor():void {
      ExternalInterface.call('alert', 'foo');
    On Windows: perhaps:
    http://techjig.blogspot.com/2008/03/flash-global-security-settings-windows.html
    "In order for external interface functions to be called, you must also
    specify the folder/file where the swf file is located." 
    The above setup isn't necessary when the files are on a server. 
    Also see: 
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/External Interface.html#call()
    ""ExternalInterface" "
    "call() method" 
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ea6.html
    "About ExternalInterface API security in Flex" 
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf626ae-7fe8.html#WS2d b454920e96a9e51e63e3d11c0bf69084-7f31
    "Using the ExternalInterface API to access JavaScript" 
    2. Open a real popup: Example: 
    ActionScript: 
    private function popUpSomething():void {
      var editorPathOrUrl:String =
        'wrapper.html';
      var windowName:String =
        "SomeNameSeeDocs";
      var windowFeatures:String =
        "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes,width=500,height=700";
      ExternalInterface.call(
        'launch',editorPathOrUrl,windowName,windowFeatures
    JavaScript: 
    function launch(editorPathOrUrl,windowName,windowFeatures) {
      windowRef = window.open(
        editorPathOrUrl,windowName,windowFeatures
    Works in all browser I tested except Opera. 
    Tobi

  • 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

  • Load html document inside flash

    I have been informed that it is possible to load an html
    document inside flash, that you use an HTML tag, but I cannot find
    it in the scripts, can anyone show an example and explain how to
    make it work or if there is a tutorial for creating this inside of
    flash.
    Thanks

    Dear All
    I do not know why they call themselves professionals in flash and html, while they can not help us with a simple webpage inside a flash movie.
    No offense
    I was trying the whole week to do that by checking if any body post any tip over the internet, but as usual the profs said that you can only make it in test and only text and bla bla bla.....
    Let me tell you that I have managed to open a whole webpage in my flash website.
    I have this page that is html and have so many codes and things that I do not know, and in my flash website I have a menu which one of its buttons must open that html file, and as every body knows that you will loose the whole work if you poped up another window from your flash website.
    So Cheer up I have managed to open my html page in my flash movie website.
    You can check it up following this link www.compuhometech.com/html_inside_flash/index.html
    If you like to have it please mail me : [email protected]
    Thank you

  • Interacting with html documents from flash

    Hi,
    I'm a newbie in actionscript. I created a world map in flash. The map has regions (Europe, North America, Latin America, etc.). The regions on the map are defined as buttons.
    The final flash map will be embedded in an html document (map.html). The idea is that when you click for example the "Europe" button on the flash movie, this will open an html document called Europe.html and will show it underneath the map flash (inside map.html).
    The "Europe.html" for example contains a list of countries.
    In this mission I have 2 problems:
    1.       What script I have to attach to every region button on the flash map so it will call the right html file into the div on the map.html?
    2.       What script do I have to put inside the html document?
    Any help will be much appreciated. thank you
    Arie M.

    assign your button an instance name (in the properties panel after selecting your button) and use that name in the actions panel:
    yourbutton.addEventListener(MouseEvent.CLICK,f);
    function f(e:MouseEvent):void{
    navigateToURL(new URLRequest("map.html"),"youriframe")

  • When I open a HTML document in Safari all the images change to a ?  How do i stop this and get the images back?

    When I open a HTML document in Safari rather then getting an image, I get a ? in a box.  Why is this and how can I change it to get the images back?

    monkeyde,
    You are getting entagled in the two confusing meanings of the term pixels, namely as a unit identical to points and equalling 1/72 inch, and the basic component of raster images (and effects).
    You can read on in this very recent thread:
    Is there a way to get Illustrator to know how many pixels are in an inch?

  • 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.

  • Opening help html documents from 10g form

    We are converting our 6i forms to 10g. I am trying to open my help html documents from the 10g forms. We have modified the httpd.conf file setting the DocumentRoot "/oracle/apps/aces/help". This is the path where my html documents reside. From the 10g forms I am using web.show_document to open the html documents. I am getting a Page not Found error. Is there somewhere else the help path needs to be set?
    Thanks!!
    Shellie Bricker

    The way i know is, putting some AliasMatch in the conf-file of Apache like
    AliasMatch ^/help/(..*) "C:\help/$1"And then use WEB.SHOW_DOCUMENT with this virtual path
    WEB.SHOW_DOCUMENT('//help/helpfile.html', '_blank');

  • Safari opens an HTML document on startup

    To recover from a hard disc problem and minor crashes I created a clone (with SuperDuper) erased and reinstalled. Everything seems OK except for the minor issue that Safari launches on startup and opens an HTML document. Currently it is (file:///usr/X11R6/lib/X11/doc/html/XtCancelSelectionRequest.3.html) -previously it was a Spanish language file from the Pages application and it changed when I removed the language file. Safari is not set as a startup item in Accounts/Login. This happened on my cloned drive which I then copied back to my main drive. I have cleared Safari histories, caches removed plist and repaired permissions without success
    Any ideas?

    Safari's default open page is set in Safari preferences. Open Safari preferences, click on the General icon in the toolbar. You will see the fields for setting the default page.
    To stop Safari launching on startup verify that it isn't or some other item is included in the Login Items of Accounts preferences. Then also check /Library/StartupItems/ folder to see if a startup item is there that may be launching Safari.

  • How to get Safari to open an HTML document created in AIR on iOS

    We have an iOS app that creates a 3-page HTML document on the user's device and then prints it. We were using Darkredz ANE to do this, but the ANE is broken in iOS 8 and the Darkredz website is abandoned.
    As a workaround, we want to use Safari to launch the HTML document, then print from Safari. But Safari won't open a local document that belongs to another app, probably because of the security sandbox. We don't have a network connection, so we can't save the file remotely. Is there a way to get Safari to open a local document?
    If not, does anyone know of a FileManager app that can open files that are located in the "documents" folder of other apps on the device? I've tried several of them, but so far, they only load files from iCloud, Box, etc.
    Thanks for any tips.

    Sorry I didnt think about it needing to print as 3 separate pages at specific points. If you can't get the HTML printing to work then you could keep could this thought in mind. If the height of the, I presume, HTMLLoader object is the right value, you can draw the white-space of the page into the BitmapData and then it might still print at the right location. If it doesn't work immediately and you felt like putting in a little more effort, you might be able to tweak the height of the HTMLLoader objects so that each one represents a single page. Granted this approach would likely only work for one paper size format, such as 8.5x11. Sorry I don't have any easier ideas that work with what you already have done so far

  • Opening a html document in order to load a certain website (and login), results in opening the startpage(s) from FireFrox.

    we use a html document to automatically login out application. but when this document opens FireFox always opens the startpage. When FireFox is already running the html document works as intended.
    no problems with IE.

    Unfortunately, Java standard API can't handle PDF file as a distinct document.
    However, you could use a physical URLConnection to get any file content as
    a simple byte mass.

  • Wanting to open a HTML document in users default browser using Menu Items

    I have a couple of Menu items that I want to open up various HTML documents.
    menuHelpItem.addActionListener(new ActionListener()
         public void actionPerformed(ActionEvent evt)
    });I've seen a couple of 'solutions' to people asking about opening files, but none even compiled never mind ran. It's in my parent program, and any solution needing to throw IOException (lots of things annoyingly seem to) that'll mean the listeners need to which never seems to work. Even if it did though, the class would have to and so would all the others. Messy.
    Best I've done is open up a new JEditorPane based on the url of the HTML files, but this is definately not good enough as the font, layout, links are all screwed and if I could fix it, it would no doubt take longer than I have.
    So basically, say you have a button, how do you make it open "resources/SearchHelp.html"?

    "http://www.google.com"; //
    Interesting. I changed my code to this:
    private void showHelp(String url)
         try
              String[] cmd = new String[5];
              cmd[0] = "cmd.exe";
              cmd[1] = "/C";
              cmd[2] = "rundll32";
              cmd[3] = "url.dll,FileProtocolHandler";
              cmd[4] = PronunciationDictionary.class.getResource(url).toString();
              Process process = Runtime.getRuntime().exec( cmd );
         catch (IOException e)
              JOptionPane.showMessageDialog(this, "Unable to load help file. Please try again.", "Help - Dictionary A'la Lewis", JOptionPane.INFORMATION_MESSAGE);
    }and I printed out PronunciationDictionary.class.getResource(url).toString(); before trying it and that worked fine. I click on the buttons but nothing happens, no error which is good, but nothing else either, which is bad. I thought maybe I was just doing it wrong, so I tried replacing it with just http://www.google.com but same thing, nothing happened at all.

  • 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.

  • Opening Local HTML Files

    I'n building a simple html viewer using Java, but I'm not sure what to use to display local html pages. I've used JEditorPane before to build a web browser, but I'm not sure how to use that to view html pages stored on the local hard drive. The setPage method in JEditorPane only takes a url, so does that mean I can't use it with local html pages? Thanks in advance for any help.

    The Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html]How to Use Editor Panes contains example on how to read local html pages.

  • I can't open a HTML file with flash linked

    I have Flash CS3.  I have created a flash file.  If I click on the SWF file I have no problems opening it.  It plays.  It looks nice.  I'm the man.
    However, now when I try to publish it, the HTML file will not work.  It says "windows cannot find this file, please ensure you have typed the location correctly".
    I am double clicking directly on the file and not typing anything, in fact I was considering checking on Ebay to see if I could upgrade my PC to have eyes.
    The feature has worked previously, which leads me to the conclusion that something else has changed.  I have tried using the publish setting, I have also tried using Dreamweaver to embed the file, and have also tried manually inserting the necessary code after seeing some on a website.
    All of these things produce the same result, windows cannot (or will not) find the necessary file.
    It's an odd one, and very frustrating, can anyone help me at all?
    Cheers in advance,
    Eoin

    Nope this doesn't work.  I wasn't using the default names previously but I can't see that it should make a difference, although Flash can be quirky.
    I tried putting them in a new location to no avail.
    Attached is a screenshot of the error message.

Maybe you are looking for

  • C4580 All-In-One suddenly lost wireless connection and I can't get it back.

    I have a replacement C4580 after HP replaced the old one because of their dmaned regionalisation of printers. It has been working fine through my wireless router, and I have been able to use it wirelessly on 2 different laptops, one running  XP and t

  • Compressor Job Fail Quicktime Error -120

    The program quits before it even starts compressing after I click "Submit"  There is no error message or any indication of why the attempt failed.  Except a grey message to the side that says QuickTime Error -120 I'm using the presets.  Trying to con

  • Function module to calculate Variable-Size Item

    I am creating a report for manual reservation. User wants to calculate quantity of material if he enters size1, size2 and size3. Also he wants that a formula key option to be provided so that he can mention conversion formula. Is there any standard f

  • Archive Utility and permissions

    I was wondering if there was a way to instruct Archive Utility to use the default permissions when expanding a file. Without a long-winded explanation...I have two users using the same iMac to download client files from various FTP sites. With one us

  • Superdrive inoperative after Mountain Lion upgrade

    After installing Mountain Lion with no problems or errors I tried to burn a music CD using iTunes. I received an error message as below: After ejecting, the disk would not mount and the drive was making very unusual noises without spinning up at all.