A Flash Developer Resource Site

Results 1 to 20 of 33

Thread: opening pdf files on top of interface

Hybrid View

  1. #1

    Unhappy Confusion

    OK, I have topmost.exe in my fscommand folder.

    I can't get it to open any webpages though. All of the examples of topmost usage that I've found are for opening PDFs or other things.

    I currently open my webpages with buttons something like this:

    on (release) {
    getURL("http://www.tacticalpowerplant.com", "_blank");
    }
    Would I need to write something like this?:




    on (release) {
    fscommand("EXEC", "topmost.exe" + chr(9) + "http://www.tacticalpowerplant.com");
    getURL("http://www.tacticalpowerplant.com", "_blank");
    }
    I know that is way wrong...

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    The attached ZIP file includes an FLA with the code below on a button. This launches a URL and then calls browser.exe from the fscommand folder to make any browser windows it finds the topmost windows.

    Code:
    test_btn.onRelease = function()
    {
    	getURL("http://www.northcode.com");
    	fscommand("exec", "browser.exe");
    }
    The browser.exe file (in the fscommand folder) is just a renamed copy of my proxy.exe utility that launches a copy of browser.bat (also in the fscommand folder). The BAT file looks like this.

    Code:
    @echo off
    set repeat=x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x 
    for %%i in (%repeat%) do call topmost Internet Explorer
    for %%i in (%repeat%) do call topmost Mozilla Firefox
    That just calls topmost looking for windows with "Internet Explorer" or "Mozilla Firefox" in their title and makes them topmost. You can add support for other browsers if they have some fixed text in their title bars that topmost can use to identify them.
    Attached Files Attached Files

  3. #3
    Hey Northcode! Thanks again for all your help on this!

    I am using Flash 8, and I think that is causing problems. I couldn't open the web.fla file. It said "Unexpected File Format"

    So, I put the support files in the fscommand folder and tried doing the buttons.
    When I tried to apply your button code to a button in the timeline, I got this error:

    Statement must appear within on handler
    test_btn.onRelease = function()
    I'm going to keep plugging away at this for now...


    I thought this would do it, but it didn't seem to do anything:

    on (release) {
    test_btn.onRelease = function() {
    getURL("http://www.tacticalsolar.com");
    fscommand("exec", "browser.exe");
    };
    }
    Last edited by Graz73; 09-14-2009 at 02:33 PM. Reason: more code clarification

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center