A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Launching HTM files from a SWF Studio EXE

  1. #1
    Junior Member
    Join Date
    Jul 2002
    Posts
    1
    I have created a small loading screen in Flash that I wish to autorun on a CD. After a few frames, I use the getURL command in flash to call an html page on the CD called index.htm.

    When I compile the movie using Flash's own projector it works fine, the movie is displayed, then at the getURL frame it opens the browser and loads index.htm into it.

    When I compile the same Flash movie using SWF Studio it opens the browser, but instead of loading index.htm it tries to load http://index.htm

    If I change the getURL to be the full path of index.htm (e.g. c:\temp\index.htm) it works in both Flash and SWF Studio. The problem with doing this is that I will not know the drive letter of the CD-ROM drive being used in every case so I can't hardcode in the path.

    I've tried everything I can think of to get it to work, but to no avail, is there anything anybody can suggest?

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766

    If you don't have a fully qualified URL (and it doesn't start with a drive letter) the Flash OCX adds http:// to the string you pass to getURL to make it a valid URL. If you add file:// to the URL, getURL won't try to add the http:// prefix. This will happen in any projector tool that uses the Flash OCX, not just SWF Studio.

    Another way to get around this is to use the SWF Studio ShellOpen command. Either of these should do the trick if the html file is in the same dir as the projector.

    fscommand("ShellOpen", "%ORG%\\index.html");
    fscommand("ShellOpen", _level0.ssStartDir + "\\index.html");

    If the html file is in a subdirectory, just add it to the path like this

    fscommand("ShellOpen", "%ORG%\\folder\\index.html");
    fscommand("ShellOpen", _level0.ssStartDir + "\\folder\\index.html");


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