2 Replies Latest reply on Sep 9, 2008 9:41 AM by K.Webber

    Google Search

    googol0
      Can anyone please help me?

      I was wondering How I would be able to add a google search bar onto a .swf.

      The bar must be able to open a new window to a google searsh page of what you typed in the box. The bar must also add a set text before what you actually tpe in.

      So if You type "man" into the bar and press a button a new window will appear showing the searh results to "the man". "the" will not be text that is added to the search but you get the idea.
        • 1. Re: Google Search
          Level 7
          Sure.

          Add a input TextField -- assign an instance name: "myGoogleQuery"
          Add a button -- assign an instance name: "myGoogleButton"

          Add this script:

          myGoogleButton.queryTextField = myGoogleQuery;
          myGoogleButton.onRelease = function(){
          getUrl(" http://www.google.com/search?q=" + this.queryTextField.text,
          "_blank");
          }


          • 2. Re: Google Search
            K.Webber
            Ray I used the code and I am am getting an error message from Flash stating:

            "statement must appear within on handler"

            In regards to:
            " myGoogleButton.queryTextField = myGoogleQuery; "

            and also:
            "myGoogleButton.onRelease = function(){ "

            any help? I have been trying to get this search box to work with google. stressed out. Thanks.