Log in

View Full Version : Google search bar in flash?



bbilal
12-21-2007, 12:42 AM
Is this anyway possible to add google search for content in flash? Search for content means the simple search bar.

BLiZZaRD
12-21-2007, 01:34 AM
I believe I just did this a day or two ago..

check here for a zip file and details (http://www.dynamicdrive.com/forums/showthread.php?p=122056#post122056)

bbilal
12-24-2007, 06:46 PM
No, not that one I have a google adsense search code it works okay in HTML but I don't know that how to put in flash and make it work.

BLiZZaRD
12-25-2007, 06:44 PM
So what is the code? You may need loadVars, you may need JS call functions, you may not be able to do it per Google TOS.

bbilal
12-25-2007, 08:23 PM
It is a similar code like we put ads code in our sites. If some one search via that search pay I will get paid.

BLiZZaRD
12-25-2007, 09:49 PM
Well.. without seeing it I can only guess. A lot depends on the set up.

You can use the standard getURL and for the http part include the whole line that is in the HTML code. If there is more, like with a paypal button, then I will need to see it.

bbilal
12-25-2007, 10:15 PM
<!-- Search Google -->
<center>
<form method="get" action="http://www.google.com.pk/custom" target="_top">
<table bgcolor="#000000">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">

<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="15" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Google Search" id="sbb"></input>
<input type="hidden" name="client" value="pub-7129006502115206"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="safe" value="active"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
</center>
<!-- Search Google -->

This is the code

BLiZZaRD
12-25-2007, 10:31 PM
Well, for a start you can look here (http://www.mikechambers.com/blog/2003/04/30/flash-based-google-search-app/)

Using a 3rd party app is a bit ridiculous to me, in Flash, but some people like it.

(personally I think that Flash is 3rd party enough and using other apps to get it to work is over kill, I haven't found anything I can't do in Flash alone that I need another app for, yet.)

I will work on a AS only fix for this if the above doesn't suit your fancy :)

Medyman
12-26-2007, 01:48 AM
Just a warning, not sure what the legality of adding the AdSense search bar is within Flash.

I know for a fact (as I've asked Google directly and have recieved a response) that Google does not support or condone the use of Adsense within Flash. Not only is it against the TOS, but it just simply won't work. A better solution for Adsense users (with ads, not necessarily the searchbar), is to configure the ads to look as much as the Flash as you can and perhaps use CSS positioning if that's an issue.


For making this sort of searchbar work...
This is just an idea off the top of my head...perhaps sending a variable from Flash to a PHP script which then subits the form with the appropriate hidden field data.

tech_support
12-26-2007, 05:49 AM
According to Medyman, it is against Google's TOS. And over here, we don't do things that are illegal. So I'm going to lock the thread.