Use the
command to pass data between an advertisement and a server, and do not use the
GET
command. For more information on GET and POST, see
POST
Language Reference.
Note: Remember to provide control to the user. If you add sound to an advertisement, also add a
mute button. If you create a transparent Flash ad that hovers over a web page, always provide a
button to close the advertisement for its entire duration.
Tracking advertisements
Several leading advertising networks now support standardized tracking methods in Flash SWF
files. The following guidelines describe the supported tracking methodology:
Create a button or movie clip button
IAB. For a list of standardized dimensions, see www.iab.net/standards. For more information on
creating a button in Flash, see "Creating buttons" in Using Flash.
Add a script to the button
the
function to open a new browser window. For example, you might add the following
getURL()
to Frame 1 of the Timeline:
this.myButton_btn.onRelease = function(){
getURL(clickTAG, "_blank");
};
You might add the following code to Frame 1 of the Timeline:
this.myButton_btn.onRelease = function() {
if (clickTAG.substr(0, 5) == "http:") {
getURL(clickTAG);
}
};
The
function adds the variable passed in the
getURL()
the browser that is launched to the specified location. The server hosting the ad can track clicks
on the advertisement. For more information on using the
Flash ActionScript Language Reference.
Assign clickTAG code for tracking
serving the ad to track where the ad appears and when it is clicked.
The process is the standard way of creating an advertising campaign for a typical Flash
advertisement. If you assign the
process to add tracking to the banner. The following example lets you append a variable to a URL
string to pass data, which lets you set dynamic variables for each banner, instead of creating a
separate banner for each domain. This means that you can use a single banner for the entire
campaign, and any server that is hosting the ad can track the clicks on the banner.
In the
and
object
example:
<EMBED src="your_ad.swf?clickTAG=
http://adnetwork.com/tracking?http://www.destinationURL.com">
You should use standardized dimensions outlined by the
This script executes when a user clicks the banner. You might use
This code tracks the advertisement and helps the network
getURL()
tags in your HTML, you would add code similar to the following
embed
getURL()
and
object
getURL()
function to the banner, you can use the following
in Flash ActionScript
tags, and then sends
embed
function, see
getURL()
Advertising with Flash
in
137
Need help?
Do you have a question about the FLASH MX 2004-USING ACTIONSCRIPT IN FLASH and is the answer not in the manual?
Questions and answers