Methods for implementing the clickTAG variables in Flash banners depend on the ActionScript version used in the banners. The methods do the same job and are only different in the coding. Adform supports both the ActionScript 2 and ActionScript 3 coded banners. If there is more than one target URL, please see the naming convention below:

var clickTAG;  // variable no. 1
var clickTAG2; // variable no. 2
var clickTAG3; // variable no. 3
var clickTAG4; // variable no. 4
var clickTAG5; // variable no. 5

Implementation of clickTAG variable

Implementation of the clickTAG variable depends on the version of the ActionScript you are using. Also, due to constantly increasing online security measures in internet browsers, pop-up blocking is becoming a common problem in the online advertising.

ActionScript 2.0 code:

on (release) {
    getURL(_root.clickTAG, _root.landingPageTarget);
}

ActionScript 3.0 code:

  1. Download and install the Adform Creative Toolkit extension (detailed info can be found here);
  2. When the Adform Creative Toolkit is installed, all the Adform components are placed in your Adobe Flash installation directory. You are able to see them by selecting WindowComponents in the top Flash API menu;


     
  3. Then drag and drop the AdformCore on the stage;
  4. Create a button symbol on Flash API stage, and give it an instance name (e.g. button);
  5. ClickTAG then can be implemented as follows:
button.addEventListener(MouseEvent.CLICK, ADFclicked);

function ADFclicked(event:MouseEvent) {
    AdfURLNavigator.navigateToUrl( AdfFlashVarsUtil.getParameter("clickTAG"), AdfFlashVarsUtil.getParameter("landingPageTarget"));
}

Note: always make sure you attach the ActionScript code that opens a new browser window to an instance of a button, not a movie clip. Also, the event, which triggers the opening of a new window, must be "release", not "press" because opening a new window on "press" event will definitely trigger the pop-up blockers.

Note: AdformCore can also be used in the Flex 2/Flex 3/Flash Builder 4 by adding its swc in to the project library and using the following ActionScript 3 code:

var adformCore:AdformCore = new AdformCore(this.stage);

For testing the clickTAG implementation, please use the Test Section.
 

Implementation of clickTAG in banners for Spotify

ActionScript2:

on (release) {
    getURL(_root.clickTAG, "_blank");
}

 

ActionScript3:

import flash.events.MouseEvent;
import flash.net.URLRequest;

myButton.addEventListener(MouseEvent.CLICK, function(event: MouseEvent) : void {
   flash.net.navigateToURL(new URLRequest(root.loaderInfo.parameters.clickTAG), "_blank"); 
   }
);

Note: In the code above, myButton should be replaced with the name of your click-through button instance