Skip to main content
Participant
January 13, 2020
Question

ClickTag on button - Not on whole stage

  • January 13, 2020
  • 0 replies
  • 290 views

Hi,

 

I normally use clickTags that cover the whole stage.

 

However, I am building a banner that has other clickable interaction, any of which when clicked on launches the ClickTag too..

 

Does anyone know what to edit in the HTML template to  get the clickTag to only launch from a certain CTA bttn?

My current DCM template looks like  this:

 

<html>
<head>
<meta charset="UTF-8">
<meta name="authoring-tool" content="$VERSION">
<title>$TITLE</title>
<!-- write your code here -->
$CENTER_STYLE
$CREATEJS_LIBRARY_SCRIPTS
$ANIMATE_CC_SCRIPTS
<script src="https://s0.2mdn.net/ads/studio/Enabler.js"></script>
<script type="text/javascript">var clickTag = "https://oldschool.runescape.com/"; </script>
$SCRIPT_START
var canvas, stage, exportRoot, anim_container, dom_overlay_container, fnStartAnimation;
function init() {
	canvas = document.getElementById("$CANVAS_ID");
	anim_container = document.getElementById("$ANIM_CONTAINER_ID");
	dom_overlay_container = document.getElementById("dom_overlay_container");
	$CREATE_LOADER
	$LOAD_MANIFEST
	$PRELOAD_ASSETS
}
$HANDLE_FILE_LOAD_START	
	$HANDLE_FILE_LOAD_BODY	
$HANDLE_FILE_LOAD_END
$HANDLE_COMPLETE_START
	//This function is always called, irrespective of the content. You can use the variable "stage" after it is created in token create_stage.
	$CREATE_STAGE	
	//Registers the "tick" event listener.
	$START_ANIMATION	    
	//Code to support hidpi screens and responsive scaling.
	$RESP_HIDPI	
$HANDLE_COMPLETE_END
$PLAYSOUND
$SCRIPT_END
<!-- write your code here -->
</head>
<body onload="init();" style="margin:0px;">
	<div id="$ANIM_CONTAINER_ID" style="background-color:$BG; width:$WTpx; height:$HTpx">
        <a href="javascript&colon;window.open(window.clickTag)"><canvas id="$CANVAS_ID" width="$WT" height="$HT" style="position: absolute; display: $CANVAS_DISP; background-color:$BG;"></canvas></a>
		<div id="dom_overlay_container" style="pointer-events:none; overflow:hidden; width:$WTpx; height:$HTpx; position: absolute; left: 0px; top: 0px; display: $CANVAS_DISP;">
		</div>
	</div>
    $PRELOADER_DIV
</body>
</html>

 

 

 

This topic has been closed for replies.