8 Replies Latest reply on Jul 5, 2008 5:31 PM by notworkingadobe

    getURL PARENT

    notworkingadobe
      I am using AS2 in Flash CS3. I am trying to simply us the getURL to open a url in the same window. Does not work, it will work if I use the "_blank" statement but I need it to open in the same window. I have tried saving it as FP8 and 9 with no resolve.

      on (release) {
      getURL("events_home.htm", "_blank");
      }
        • 1. Re: getURL PARENT
          kglad Adobe Community Professional & MVP
          use "_self" instead of "_blank".
          • 2. Re: getURL PARENT
            notworkingadobe Level 1
            Tried that and it doesn't do anything. Any other ideas?
            • 3. Re: getURL PARENT
              Level 7
              notworkingadobe,

              > I am using AS2 in Flash CS3. I am trying to simply us the
              > getURL to open a url in the same window.

              That's the default behavior; it requires the least typing. :)

              > Does not work, it will work if I use the "_blank" statement
              > but I need it to open in the same window.

              To open in the same window, use "_self" to just leave that second
              parameter blank.

              > I have tried saving it as FP8 and 9 with no resolve.
              >
              > on (release) {
              > getURL("events_home.htm", "_blank");
              > }

              You can publish it much earlier than a Flash Player 8 SWF, and it'll
              work ... but you have to actually test it in a browser. If you don't
              already have a browser open, the getURL() function will naturally have to
              open a browser.

              Publish your SWF, embed it in an HTML document, and test the link from
              there. If you get a security error warning, that's Flash Player protecting
              you from a "potentially unsafe" operation, because you're testing from your
              hard drive. Upload the HTML file and your SWF to a server, and test from
              there. Should work just fine.


              David Stiller
              Co-author, Foundation Flash CS3 for Designers
              http://tinyurl.com/2k29mj
              "Luck is the residue of good design."


              • 4. Re: getURL PARENT
                notworkingadobe Level 1
                That worked David, saving it back to 7 worked. Does moving to AS3 fix a lot of this mess?
                • 5. Re: getURL PARENT
                  Level 7
                  notworkingadobe,

                  > That worked David, saving it back to 7 worked.

                  That's interesting/puzzling to hear. Are you saying that 7 makes this
                  work when testing locally? (That might just be true, but I haven't tested
                  in a while.)

                  In any case, testing from a server will (should!) work in all versions.

                  > Does moving to AS3 fix a lot of this mess?

                  It has nothing to do with the programming language, but rather, with the
                  increasiliy strict security model implemented in Flash Player. An AS3 SWF
                  requires at least Flash Player 9, which is a strict security sandbox.
                  You'll have to upload to a server. But keep in mind, you can just as easily
                  publish an AS2/Flash Player 9 SWF, and you'll still have to upload to a
                  server.


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


                  • 6. Re: getURL PARENT
                    notworkingadobe Level 1
                    I noticed I lost my Blend mode stuff when I save it back to 7. Any other ideas so I can keep the blend stuff??
                    • 7. Re: getURL PARENT
                      Level 7
                      notworkingadobe,

                      > I noticed I lost my Blend mode stuff when I
                      > save it back to 7. Any other ideas so I can
                      > keep the blend stuff??

                      Blend mode requires Flash Player 8 or higher. Publish to 8 or higher,
                      and *trust* that getURL() works. ;) Have you uploaded to a server -- or
                      tested off a local server -- yet?


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


                      • 8. Re: getURL PARENT
                        notworkingadobe Level 1
                        It works on the server in 8. I can't believe I didn't try that first. Like I said it's been awhile. THANX!!!