Adding Forms to Flash
Please remember that all Flash files should be to specifications as outlined here: Flash Ads
For form submission ads to track properly we need to set up the file so we can use the Yahoo! redirect. To do this we need to add some code to pick up the variables that the user submits.
As an example we'll set up the ad below to do a search on Yahoo!
Download the completed Flash File (FLA) to see a finished example
1. First, add a new layer and then add button movie clip for the user to submit your form with.

2. Create a text input box using the Text Tool, select it box and give it a variable name, we've used 'searchterm'.
3. Then insert the following code onto the first frame of the topmost layer

function yadFormSubmit(url, fvars) {
command = 'javascript:
bfss_doFormSub("'+yadid+'","'+url+'","'+fvars+'")';
getURL(command);
}
This is a basic function that is call when the user clicks the submit button, we will set this up in am moment. Here we pass the details of the form submission to the getURL command.
4. To submit the search term in the box, we need to attach code to the button to do the form submission. The function we added above takes 2 arguments, the first argument is the number of the URL we want to submit to (in the same form as we set up clickTAG1, clickTAG2 etc, please leave this unless you have multiple forms in which case you should number each form differently) the second argument is the query string we want to submit. In our example we use the code below:
on (release) {
sterms = "p="+searchterm;
_root.yadFormSubmit(1, sterms);
}
In the second line of the code we are constructing our query string, in the third line we are passing this string to the function and submit it to the first URL - bfss_clickthrough1 in the template.


