What is ClickTag in Flash?

Adobe Flash A ClickTag is a parameter used in Flash banner ads. The parameter is a variable that defines the  destination URL from the markup code. By using a click tag, the advertiser can easily see and modify the   URL without a Flash developer.  It allows the Ad server to register where the ad was displayed and when it was clicked. On any click, Flash ads should redirect to the URL specified in the clickTAG argument; there should be no other redirection in between. There are no industry standards on how to program a click tag. The code for the programming is case-sensitive, but programmers format their capitalization differently so ad serving networks may require clickTAG, ClickTag, clickTag, or any variation of capitalization for that specific variable. Each advertisers have their own requirements.

Create a ClickTag for your flash banner ad:

Action Script 2.0

Add  a transparent layer(MovieClip) on the complete Flash Movie area,  and write the script over the movieClip by Right click on the clip and select the Action from and add the script.

Action Script 2.0

on (release) {
 if (clickTAG.substr(0,5) == "http:") {
 getURL(clickTAG, "_blank");
 }
}

Action Script 3.0

Create an transparent MovieClip as same as the stage size and give a instance name as ClickTag(you can use other names). Write the following code in the action script window of the frame.

Action Script 3.0

// Get URL params
var flashvars =  root.loaderInfo.parameters;
// Convert to string format
var clickTAG=String(flashvars['clickTAG']);
// Add Event Listener to the ClickTag MovieClip
ClickTag.addEventListener(MouseEvent.CLICK, goToURL);

// Function to redirect the URL
function goToURL(Evt:MouseEvent) {
 // Set the URL Request variable
 var targetURL:URLRequest = new URLRequest(clickTAG);
 // Check if the url contain the http: section
 if (clickTAG.substr(0,5) == "http:") {
 // Navigate the URL
 navigateToURL(targetURL, "_blank");

 }
}

HTML Embedded

<EMBED src="ad_banner_example.swf?clickTAG= http://www.adnetworkserver.com/tracking?http://www.destinationURL.com">

About Midhun Devasia

I'm a 26 year old Web Developer from Cochin, India.I had completed my B.Tech Computer Science and Engineering from SNGCE, Cochin. Now am working as a Technical Manager for a Web Development company at Cochin, India . I have 1 year experience in Java and 3 year experience in Web Technologies.
This entry was posted in Flash, General, Programming and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>