A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Opening an explorer window

  1. #1
    Senior Member
    Join Date
    May 2003
    Location
    Vienna, VA USA
    Posts
    116

    Opening an explorer window

    Hi,

    I read the FAQ about how to open an Explorer window from the CD. I created a button with this code in it:

    Code:
    on (release) 
    {
       drv = _url.substr(8,1); 
       geturl(drv + ":");
    }
    which opens the C: drive window on my computer (I haven't burned a CD yet so it just picked the hard drive). I was wondering how to extend this statement (?). I tried

    Code:
    on (release) 
    {
       drv = _url.substr(8,1); 
       geturl(drv + ":\Adobe");
    }
    to open C:\Adobe but no luck. Is the syntax wrong?

    Also, I notice this opens a window behind the projector (again) which is running fullscreen. Any way around this? I guess that's been my biggest problem with Flash. Even to open webpages I have to use batch files (I use them with Northcode's proxy) -- otherwise the webpage opens behind the projector. No idea how to make a batch file for the above code though.

    I'd appreciate any advice though this is nothing crucial (I'm not even working on a project right now, just experimenting with some options I might want to include in the next project).

    Thanks. This board is awesome!

    Phyllis

  2. #2
    Senior Member
    Join Date
    May 2003
    Location
    Vienna, VA USA
    Posts
    116
    Okay figured out part 1 from another thread!

    This syntax works:
    Code:
    on (release) 
    {
       drv = _url.substr(8,1); 
       geturl(drv + ":\/Adobe");
    }
    Now... how to get it in front of the projector.... ?

    Any ideas?
    Phyllis

  3. #3
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    Another FREE utility called TOPMOST which you can find at http://www.extendingflash.com. You'll have to combine this with something like my Proxy utility to avoid the DOS box if you're using it with Flash MX or MX04.

  4. #4
    Senior Member
    Join Date
    May 2003
    Location
    Vienna, VA USA
    Posts
    116
    Thanks, I'll check it out! I heard of this one once, but for some reason I was thinking it didn't work in MX. But I'll download it and see if I can't get this window to show up right.

    THANKS!
    Phyllis

  5. #5
    Senior Member
    Join Date
    May 2003
    Location
    Vienna, VA USA
    Posts
    116
    Okay I tested Topmost and have a couple of questions. If I set this code to open a folder C:\Animagic\help (just the example I'm using -- eventually I'll move to CD files)

    Code:
    on (release) 
    {
       drv = _url.substr(8,1); 
       geturl(drv + ":\/Animagic\/help");
       fscommand("exec", "ontop.exe");
    }
    what goes in the batch file? I tried

    Code:
    topmost help
    since the name of the folder is "help," but that didn't work. I also tried with "Animagic" and "My Computer." Not sure how to reference the explorer window, though I successfully used Topmost to open some webpages and bring the browser window to the front.

    Thanks, Phyllis

  6. #6
    Junior Member
    Join Date
    Feb 2004
    Location
    Australia
    Posts
    2

    how did you do the website with explorer on top?

    Just wondering if you could tell me how you did the website launch on top of the projector window....

    cheers
    http://www.imagenewmedia.com.au

  7. #7
    Senior Member
    Join Date
    May 2003
    Location
    Vienna, VA USA
    Posts
    116
    Hah! Figured mine out. Mine wasn't working because I left out a letter somewhere. Ugh! The first time I had it right though when I was working on a webpage. For the webpages, write the batch file (assuming you're using Northcode's Proxy) as
    Code:
    topmost Internet Explorer
    (saved as ieontop.bat in this example) with your action as

    Code:
    on (release) {
    	getURL("http://www.webpage.com/", "_blank");
    	fscommand("exec", "ieontop.exe");
    }
    which leads to my next question:
    How do you specify a string of browsers? Repeat the same line again or use some kind of separator?

    Topmost looks like it'd work great, but I'm wondering what to do with the fact that the viewer may already have one instance of a browser running (and it pulls all instances to the front). What to do about that...?

    Would a Macintosh just ignore the fscommand line or would it choke on this when I run it on both platforms?

    Phyllis

  8. #8
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    Topmost does pull all browser windows to the front. If you want to target a specific window you need a little more information about that window. For instance, if you're opening a browser window to the FlashKit forums you know that "Flash Kit Community Forums" will be in the title bar (from the title tag) so you would use that instead of "Internet Explorer" to make sure you didn't affect all of the open browser windows.

  9. #9
    Senior Member
    Join Date
    May 2003
    Location
    Vienna, VA USA
    Posts
    116
    Hm.

    In that case, since I have oodles of websites to open, I then need to write separate batch files or find some way of combining the strings to look for (?). In the past, I've just used proxy by itself and changed the batch file to read This works fine (and is always on top) but I end up with oodles of batch files (and copies of Proxy [or FlashGeek, the tool I formerly used]). Wondering if there's a way to use Topmost to get around all these extra files. I think I heard of a Kill utility once (?) to kill off running instances of browsers -- then maybe I could specify the browser window in a more generic fashion. I'd still have to figure out how to specify more than one browser. I wonder if the way I'm already doing it (though kind of a pain) is not more fool-proof (makes no difference what the browsers are or whether they're already open). What do you think?

    Thanks, Phyllis

  10. #10
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    Kill.exe is another utility you can find at www.extendingflash.com

    You should be able to combine calls to multiple utilities in one BAT file. The only thing that will require testing is the topmost calls after the call to start (or invoke.exe). One potential problem is if invoke (or start) returns before the browser is actually open.

    kill Internet Explorer
    kill Netscape
    invoke open www.flashkit.com
    topmost Flash Kit Community
    topmost whatever

  11. #11
    Senior Member
    Join Date
    May 2003
    Location
    Vienna, VA USA
    Posts
    116
    Does the invoke open command work the same as start (by picking the default browser and launching the page)?

    On my CD's, I have multiple pages with different website links. Once a weblink is opened, it'll have to be closed to get back to the CD and click on another link (my users aren't gonna know alt-tab much less use it -- they'll just close the browser). I guess maybe I need the kill commands in the first frame of the movie, and then all the topmost commands referenced together. But I'm not sure why I'd have an invoke command in the batch file?

    I guess if I'm very specific with the topmost commands I wouldn't even need the kill commands at all. Can you specify the URL directly or does it have to be the caption with topmost? I guess I could make a long list of website titles (or URL's if they work) in the topmost batch file that's called just before getURL oops, I mean AFTER getURL.

    Phyllis
    Last edited by pjutter; 05-13-2004 at 12:21 PM.

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