5 Replies Latest reply on Dec 5, 2006 1:52 AM by Xrlopinski

    play SWFs standalone

    Xrlopinski
      Must be pretty basic, sorry, am new.
      This is the problem: I got an SWF playing - standalone, not in a browser. From a menu in that SWF I want to be able to launch a different SWF, if possible in the same player. But when I use "get URL" in my menubuttons it launches the browser to play the swf. So how can I get my button to open the swf standalone?
      All help will be welcome, thanks in advance
        • 1. Re: play SWFs standalone
          Level 7
          Xrlopinski,

          > when I use "get URL" in my menubuttons it launches the
          > browser to play the swf. So how can I get my button to
          > open the swf standalone?

          The purpose of the getURL() function, and its method cousin,
          MovieClip.getURL(), is to open a browser, so the behavior you're seeing is
          fully expected. Same goes for an HTML on your local machine: if it
          contains an anchor tag, the linked-to document opens in a browser -- it's
          just that you're usually already in a browser when reading an HTML document.

          To load SWFs into the same Flash Player, whether that's a stand-alone
          Projector of the browser plug-in, use either loadMovie(), loadMovieNum(),
          MovieClip.loadMovie(), or the MovieClip loader class. The ActionScript 2.0
          Language Reference gives you plenty of detail about the differences among
          these four.


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: play SWFs standalone
            Devendran Level 1
            First of all.
            If you want to load a SWF file inside a player. U have to use LoadMovie/LoadClip/LoadMovieNum...

            getURL is used to open a HTML/SWF/any other supported file in a browser window.
            • 3. Re: play SWFs standalone
              Xrlopinski Level 1
              Hi, thanks, works fine. How do I include a button that closes the player? In HTML I can close the browser, but here there is no window to close.
              • 4. Re: play SWFs standalone
                arunbe Level 1
                From flash to close the window , there are two ways.
                1. You can call a javaScript function which in turn close the browser window.
                2. You can use fscommand to close the flash window.
                • 5. Re: play SWFs standalone
                  Xrlopinski Level 1
                  Hi,

                  Close the player with an FScommand in a button, that's it! Thanks.