Predictive Dynamic Search Bar

1. Files

The following was made for Flash CS3 and above.

Files included within this download are as follows:

•	Documentation for use.
•	Original Flash file. (dynamic_searchbar_download.fla) 
•	Swf of flash file for preview purposes (dynamic_searchbar_download.swf)
•	XML file containing word lists and settings (search_xml.xml)

2. XML File.

The xml file handles all of the settings within the file and also allows you to specify a number of different things such as the max number of results shown, which file the search term will be sent to and wordlists etc. On the following page is a layout of the XML file along with instructions on use:

Settings

<submit> The form or web page that will be handling the search term. This can be relative as shown in the example above or absolute (http://www.flashden.net) etc.

<method> The method used to send the data. Two options are POST or GET.

<maxResults> The maximum number of results that you wish to appear in the dropdown. Default = 4;

<terms> Contains all the words used by the search bar contained within <word> tags. The number of words added can be infinite and the downloaded XML file already contains over 5000 English words. Custom words and phrases can be added too. Other languages are also supported! 

3.FAQ/ Tips on Use.

•	Although the XML wordlist can be edited manually a great way of adding new phrases/words could be to generate the XML file dynamically from a database through PHP.
•	If generating the words dynamically you could also include the number of results found for that keyword like google does.
•	The style and colors used in the file are easily changed with a little knowledge of flash, simply enter the library, double click the symbol you wish to edit and get creative!
•	For further support and troubleshooting please contact the author at chris@teslamedia.co.uk