Copy link to clipboard
Copied
Hi All,
I'm just attempting my first flash banner animation job for a client and just need some assistance in relation to a ClickTag
I have been researching all morning trying to work it out but it's time I reach out the the smarter ones out there
I've found many tutorials out there on adding a basic click tag but the issues is I have been provided by the client with the below code. (DFA Click Tag variable (Action Script 3))
Link_1.addEventListener(MouseEvent.MOUSE_UP, function(event: MouseEvent): void {
var sURL: String;
if ((sURL = root.loaderInfo.parameters.clickTag)) {
navigateToURL(new URLRequest(sURL), "_blank");
}
});
Can someone please explain how I am meant to properly implement this? It would be VERY much appreciated.
I won't be uploading the banner ( I believe it is going through the Google GDN)
So I assume I do not hard code in a link.
Thanks guys and girls.
Copy link to clipboard
Copied
Based on the code you show, all you probably need to worry about is to add an object that is to be clicked upon and assign it an instance name "Link_1"
The rest of the code hopefully takes care of properly linking things up. The clicktag url does not get hardcoded into the file. It gets assigned as part of the html page's swf embedding code. The Flash file reads that url in as one of the parameters thru the "root.loaderInfo.parameters.clickTag" that you see.
Copy link to clipboard
Copied
Thanks so much for the reply Ned.
Would this still be the case if the banners are going to be seen across the google display network? Rather than on a single site?. Also the brief has me creating 4 different sized banners all which are to follow the same code as above. I assume this isn't an issue...
I just want to make sure 100% as other clickTAG tuts I have read have included hard coding code within flash.
Thanks again so much for the help everyone, very much appreciated.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now