Flash “clickTag” Specs

Backup Files

If site served flash files, backup files (gif,jpg or png) are mandatory.

In order for Defy Media Network to properly track and report clicks with site served flash ads, please ensure all ads have the clickTag properly implemented. Adobe/Macromedia currently recommends a “clickTag” method to track clicks for flash ads. This method uses variables to pass the click tracking string and URL into the Flash creative movies. As a result, the only text in the URL box is _level0.clickTag (underscore level ZERO period clickTag). _level0. (underscore level zero period) is included for “pathing” purposes to ensure that Flash can properly locate the variable.

  • Transparent Button object layered on top of clickable area
  • Button clickthrough URL: _level0.clickTag (underscore level ZERO period clickTag)
  • Target window is set to “_blank”
  • Variables is set to “Don’t send”
  • Active Clickthrough URLs must accompany submission of flash files in .txt/.xls file

Here is what the coding will look like when you are done:

on (release)

{

getURL(_level0.clickTag, “_blank”);
}

 

For flash files with multiple clickable areas, up to 4 clickTags can be utilized as follows:

clickTag (clickable area A)

on (release)
{
getURL(_level0.clickTag1, “_blank”);
}

clickTag (clickable area B)

on (release)
{
getURL(_level0.clickTag2, “_blank”);
}

clickTag (clickable area C)

on (release)
{
getURL(_level0.clickTag3, “_blank”);
}

clickTag (clickable area D)

on (release)
{
getURL(_level0.clickTag4, “_blank”);
}

NOTE: clickTag is case sensitive. Hard coded clickthrough URLs will not be accepted.

  • Create the button
  • Transparent Button object layered on top of clickable area
  • Convert Button to symbol. In the properties panel, assign the button an instance name (such as “myButton”), which will be referenced in the ActionScript.

Add the ActionScript to the button

Create a new layer, select the first keyframe in the layer and activate the Actions panel.

Copy and paste the code below. This defines the on click function. This function will be called upon once your button is clicked:

function onButtonClick(evt:MouseEvent):void{

if (root.loaderInfo.parameters.clickTag.substr(0,5)==”http:” ||

root.loaderInfo.parameters.clickTag.substr(0,6)==”https:” ){

navigateToURL(new URLRequest(root.loaderInfo.parameters.clickTag),”_blank”);

}

}

Use the following code to connect the function above to the button you created. This tells flash what to do once the button is clicked. This code can be placed anywhere in your Actionscript code, but makes sense to attach it to your button layer. (In AS3, you can no longer attach Actionscript to the button itself, only to the layer):

myButton.addEventListener(MouseEvent.CLICK, onButtonClick);

Flash files with multiple clickable areas

NOTE: Up to five (5) clickable areas maximum

Functions:

function onButtonClick1(evt:MouseEvent):void{

navigateToURL(new URLRequest(root.loaderInfo.parameters.clickTag), ‘_blank’);

}

function onButtonClick2(evt:MouseEvent):void{

navigateToURL(new URLRequest(root.loaderInfo.parameters.clickTag2), ‘_blank’);

}

function onButtonClick3(evt:MouseEvent):void{

navigateToURL(new URLRequest(root.loaderInfo.parameters.clickTag3), ‘_blank’);

}

function onButtonClick4(evt:MouseEvent):void{

navigateToURL(new URLRequest(root.loaderInfo.parameters.clickTag4), ‘_blank’);

}

function onButtonClick5(evt:MouseEvent):void{

navigateToURL(new URLRequest(root.loaderInfo.parameters.clickTag5), ‘_blank’);

}

Methods:

button.addEventListener(MouseEvent.CLICK, onButtonClick1);

button2.addEventListener(MouseEvent.CLICK, onButtonClick2);

button3.addEventListener(MouseEvent.CLICK, onButtonClick3);

button4.addEventListener(MouseEvent.CLICK, onButtonClick4);

button5.addEventListener(MouseEvent.CLICK, onButtonClick5);

NOTE: clickTag is case sensitive. Hard coded clickthrough URLs will not be accepted