A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Open Folder from Flash Projector

  1. #1
    Senior Member
    Join Date
    Sep 2003
    Location
    Uk
    Posts
    196

    Open Folder from Flash Projector

    Hi,

    I have a projector file and on the menu I need a link that just opens a
    folder with all the needed files in it located on my CD.

    Any Ideas?

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    The answer is in the FAQ sticky thread at the top of this forum, you know, the one that says "please read before posting"...

    drv = _url.substr(8,1);
    getURL(drv+":\\folder"); // change the folder name to whatever you need
    Last edited by Northcode; 08-10-2006 at 01:14 PM.

  3. #3
    Senior Member
    Join Date
    Sep 2003
    Location
    Uk
    Posts
    196
    Awesome, how do I open an html page within a folder

    Sorry The above question was meant for MAC operating systems..

    is it the same?

  4. #4
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    Click on the link that says PLEASE READ BEFORE POSTING, the answers you seek lie within

  5. #5
    -273°c absolutezero's Avatar
    Join Date
    Apr 2001
    Location
    fruzzlland
    Posts
    705
    Northcode, it seems that that code opens the folder but in the users default browser instead of windows explorer. Is there a way to open just the windows explorer window?

  6. #6
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    If you put a trailing backslash on the path ("c:\\winnt\\") then Flash will try to open the default browser and probably fail because the url path isn't composed properly with a file:// prefix. If you just pass the folder name ("c:\\winnt") then Flash opens the target using Windows Explorer instead of the default browser. This is how it work on my Windows 2000 dev machine, your mileage may vary with other operating systems.

    If you want to be sure that Windows Explorer is used you'll have to do a little more work and the solution is not nearly as flexible. You'll have to put the path to the folder you want to open in a BAT file and use fscommand("exec", "whatever.bat") to launch. This means you can't choose the path or drive at runtime unless it can be done in the BAT file (most times it can).

  7. #7
    Junior Member
    Join Date
    Jul 2007
    Posts
    23
    Is there a good solution to this yet in Flash CS3?

    I'm wondering if I have to use Director still in order to make it look consistent enough. I've done it that way b4 - director lingo will allow you to open a folder in the native explorer/finder window, providing a consistent and pro seeming interactive experience for the end-user.

  8. #8
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    Here's the reason it's broken in Flash CS3
    FSCommand EXEC s Broken in Flash CS3

    And my proxy tool is a FREE solution that will let you run BAT files and get around that issue.
    Conquering FSCommand EXEC Part 1 : Proxy

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