5 Replies Latest reply on Jan 6, 2009 2:07 PM by Ned Murphy

    Help with Geturl for dummies

    Mish_linuxchik
      I have purchased a menuclip.fla and within the actionscript I see the following code:


      What am I doing wrong? I'm a nubbie with flash, so I need help.

      thanks in advance
      ~Linuxchik
        • 1. Help with Geturl for dummies
          Ned Murphy Adobe Community Professional & MVP
          If there is only one button, then you only need the following from the code you show... click on the button on the stage and then enter the code in the Actions panel

          on(release)
          {
          getURL(" http://www.mishgallery.com/salonbordello/testindex.html", "_blank");
          }

          To keep it in that function, you would only include the one getURL line by itself.

          The next wondering is... what is the file you purchased designed for, AS2 or AS3? The getURL and on() event handler/function are AS2, but the rest of the code appears to be AS3.
          • 2. Re: Help with Geturl for dummies
            Mish_linuxchik Level 1
            good grief there is different code for each. UGGGGG. I feel like charlie brown. The fla is AS3. Is there different code for that?

            There is one long button with the word home in it. Under a sepearate starclip I can add more "buttons" via a mybutton array. Then under the menuclip is see the code (plus more code) that I provide above. If I click on genericmenubutton clip then I see the long button "home" when I open the action script window I see one action. stop(). Why would the code above be there if I need to put it on the genericmenubutton clip? Can I post a screen shot?

            Here is the stardustclip as info

            You Rock!

            • 3. Help with Geturl for dummies
              Ned Murphy Adobe Community Professional & MVP
              Yes, AS3 requires different code. AS3 does not allow code to be attached to an object as AS2 does (that on(release){... } stuff I mentioned dealing with as I did). getURL is also AS2 code, and is not supported in AS3.

              To link to another web page you would use navigateToURL(). Rather than shorthand it, which is often done, here's the 3 step code for using it (place this code where the // Add your button click actions here... comments are...

              var url:String = " http://www.mishgallery.com/salonbordello/testindex.html";
              var request:URLRequest = new URLRequest(url);
              navigateToURL(request, "_self");

              The "_self" loads into the current browser window. To load to a separate window you'd replace that with "_blank"

              I type the code above from memory, so if it doesn't work due to something I messed up, refer to navigateToURL in the help files and there should be an example.
              • 4. Re: Help with Geturl for dummies
                Mish_linuxchik Level 1
                WOW!

                Thank you Ned, I apologize for not getting back to you asap. I went out of town for the holidays and well you know. I thought about what you had said in the 12/16/2008 at 11:19:19 post while on the trip and from my past technicial experience, used my friend google to look up as3 tutorials and even then I really did not have the time to finally get the navigateToURL that I needed. Thank you for helping me save TIME. It is greatly appreciated.

                • 5. Re: Help with Geturl for dummies
                  Ned Murphy Adobe Community Professional & MVP
                  You're welcome.