linking locally from an swf file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • vigsy
    Forum Member
    • Dec 2002
    • 2

    linking locally from an swf file

    Hiya,

    I'm new to the board and also to using the software. I have made an autorun with an swf and I want it to link to a local web page. Autorun seems to modify the link by putting a http:// address into the link. This means that the browser goes off and tries to find the page on the web instead of locally. Does anyone know of a way round this?
    Ta in advance
  • Lorne
    Indigo Rose Staff Member
    • Feb 2001
    • 2729

    #2
    Re: linking locally from an swf file

    Couple questions:

    1. What action are you using?

    2. What path are you using in the action?

    Provide the full path to the local html file and it should work fine. For example, if the html file is in a folder called WEB, and that folder is located in the same folder as your autorun.exe, you could run it by using:

    %SrcDir%\WEB\woohoo_two_towers_is_out.html

    ...changing the filename appropriately, of course. [img]/ubbthreads/images/icons/wink.gif[/img]
    --[[ Indigo Rose Software Developer ]]

    Comment

    • vigsy
      Forum Member
      • Dec 2002
      • 2

      #3
      Re: linking locally from an swf file

      Thanks for that. Doesn't seem to work though. The browser is still looking for a http:// address, not local.

      (http://%srcdir%/site/home.html)

      In reply to your questions, the swf uses a simple button action :

      on (release) {
      getURL("%SrcDir%\\site\\home.html");
      }

      My intention is to use the swf file as a front end for a demo version of a web site on CD.

      Comment

      • Lorne
        Indigo Rose Staff Member
        • Feb 2001
        • 2729

        #4
        Re: linking locally from an swf file

        Ah...so you're opening the web site from within the flash file. Corey might be able to help with that.

        Alternatively, you could trigger some kind of FSCommand, and then catch that FSCommand in the FSCommand event for that Flash Object in AutoPlay...and use AutoPlay's File.Open action to do the work.

        %SrcDir% won't work in flash -- it's one of AutoPlay's built-in variables.
        --[[ Indigo Rose Software Developer ]]

        Comment

        • AGRO
          Forum Member
          • Oct 2000
          • 812

          #5
          Re: linking locally from an swf file

          Question: You have a .swf that you want to use as a intro, then when that ends you want the AMS4.exe to start automaticly from the .swf telling it to do so.

          Is this what you want to do?

          If so this is a easy fix-------> In Flash publish your .swf as a .exe, so you can have the autorun.inf

          In your flash movie have the actionscript execute a fsCommand to open a different program, which would be your AMS4.exe and close the flash movie. You could also add a "skip intro" button in your flash movie that does the same thing of executing the AMS4.exe and closing the flash intro movie.

          The actionscript for Flash MX is a little different since version 5.

          Put your "demo.exe" in a folder called
          "fscommand"
          and use


          <font color=purple>on(release) {
          fscommand("exec", "demo.exe");
          } </font color=purple>

          Command: exec [ ] Expression ( the expressions both are unchecked)
          Parameters: demo.exe [ ] Expression


          ----everything that is used from the fscommand needs to be in the fscommand folder

          -------Anything else let us know.

          Comment

          • Corey
            Indigo Rose Staff Alumni
            • Aug 2002
            • 9741

            #6
            Re: linking locally from an swf file

            The best way is what Lorne said, hook the fscommand and then translate that in AMS.

            SO for example if you want a button in your flash to open a web site just attach an fscommand to it in flash, i.e. fscommand ("open", "homepage")

            and then in AMS on your flash objects "OnFSCommand" state get the last fscommand and check what it is, if it's "open" then do a WEB BROWSER navigate action... That'll work just fine and it allows you to author your flash once and then be able to audition or edit your link(s) right in AMS instead of having to re-author your flash if you wish to edit that link(s).

            Corey Milner
            Creative Director, Indigo Rose Software

            Comment

            Working...
            X