Flash file with multiple clickTAGs

When you know (use Flash de-compiler or Action Script Viewer) that your .swf creative has multiple clickTAGs, use the below process to upload the .swf file.

  1. Choose creative type as Custom
  2. Type in the name that you want for this creative
  3. Under upload file option, choose your .swf file that has multiple clickTAGs and its backup file too (same dimension jpg format file)
  4. Paste the code given at the bottom of this article in the Code Snippet area
  5. Delete or add “var clickTAG#” depending on how many clickTAGs are present in your .swf file
  6. Change the clickTAG in the code with exact case sensitivity that is present in your .swf file (e.g.: if you .swf file has clicktag then in the below code change all clickTAG to clicktag)
  7. Replace “http://first_URL” with the first clickTAG URL and so on for 2nd, 3rd…..clickTAGs
  8. Save the creative and you’re done

You can also think of creating a Creative template if you want to have such creatives uploaded as a inbuilt form to make the upload easier.

Reach out via Contact us form if you need more help.

Code Snippet :

<!– Copyright DoubleClick Inc., All rights reserved. –>
<SCRIPT LANGUAGE=”JavaScript”>

var dccreativewidth = ‘728’;
var dccreativeheight = ’90’;
var dcswf = ‘%%FILE:SWF1%%’;
var dcjpg = ‘%%FILE:JPG1%%’;

var dcallowscriptaccess = ‘never’;
var advurl = ‘%%DEST_URL%%’;
var alttext = ”;
var dcwmode = ‘opaque’;
var dcbgcolor = ”;
var target = ‘_blank’;
var dcbgcolor = ”;
var dcminversion = ‘8’;

var clickTAG = encodeURIComponent(‘%%CLICK_URL_UNESC%%http://first_URL’);
var clickTAG2 = encodeURIComponent(‘%%CLICK_URL_UNESC%%http://second_URL’);
var clickTAG3 = encodeURIComponent(‘%%CLICK_URL_UNESC%%http://third_URL’);

function checkFlash(v){
var y, x, s=”Shockwave”, f=”Flash”, o=”object”, u=”undefined”, np=navigator.plugins, nm=navigator.mimeTypes, nmd=”application/x-shockwave-flash”;
v = Math.max(Math.floor(v) || 0, 6); // check if v is a number and use Flash Player 6 as the minimum player version
if(typeof np!=u&&typeof np[s+” “+f]==o&&(x=np[s+” “+f].description)&&!(typeof nm!=u&&nm[nmd]&&!nm[nmd].enabledPlugin)){
if(v<=x.match(/Shockwave Flash (\d+)/)[1])return true;}
else if(typeof window.ActiveXObject!=u){
for(y=16;y>=v;y–){
try{x=new ActiveXObject(s+f+”.”+s+f+”.”+y);if((x!=null)&&(typeof x==o))return true;}catch(e){}}
}
return false;
}

if ( checkFlash(dcminversion) ) {
adcode = ‘<OBJECT classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″‘+
‘ ID=FLASH_AD WIDTH=”‘+ dccreativewidth +'” HEIGHT=”‘+ dccreativeheight +'”>’+
‘<PARAM NAME=movie VALUE=”‘ + dcswf +'”><PARAM NAME=”FlashVars” VALUE=”‘ +
‘clickTAG=’+clickTAG+
‘&clickTAG2=’+clickTAG2+
‘&clickTAG3=’+clickTAG3+'”><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#’+ dcbgcolor +’><PARAM NAME=wmode VALUE=’+ dcwmode +’><PARAM NAME=”AllowScriptAccess” VALUE=”‘+dcallowscriptaccess+'”>’+
‘<EMBED src=”‘ + dcswf +'” flashvars=”‘ +
‘clickTAG=’+clickTAG+
‘&clickTAG2=’+clickTAG2+
‘&clickTAG3=’+clickTAG3+'” quality=high wmode=’+dcwmode+
‘ swLiveConnect=TRUE WIDTH=”‘+ dccreativewidth +'” HEIGHT=”‘+ dccreativeheight +'” bgcolor=#’+ dcbgcolor+
‘ TYPE=”application/x-shockwave-flash” AllowScriptAccess=”‘+dcallowscriptaccess+'”></EMBED></OBJECT>’;
if((‘%eenv!’!=”j”)&&(typeof dclkFlashWrite!=”undefined”)){dclkFlashWrite(adcode);}else{document.write(adcode);}
} else {
document.write(‘<A TARGET=”_blank” HREF=”%%CLICK_URL_UNESC%%%%DEST_URL%%”><IMG SRC=”‘ + dcgif + ‘” alt=”” BORDER=0></A>’);
}
//–>
</SCRIPT>

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.