Ad Management Systemon (release) {
getURL("https://www.example.com/","_top");
}
After the conversion for click tracking, it should look like this:
on (release) {
if (_root.clickTAG.substr(0,4) == "http") {
getURL(_root.clickTAG,_root.TargetAS);
}
}
For ActionScript 3, MyClickButton is the name of the button instance and the code should look like this:
MyClickButton.addEventListener(
MouseEvent.CLICK,
function():void {
if (root.loaderInfo.parameters.clickTAG.substr(0,4) == "http") {
navigateToURL(
new URLRequest(root.loaderInfo.parameters.clickTAG),
root.loaderInfo.parameters.TargetAS
);
}
}
);
If you would like to know more technical details, please review the official instructions from Adobe Flash. For greater compatibility, our system uses "_root.clickTAG" instead of "clickTAG". Because Flash ads can be served within IFRAMEs, it's best to use target _top or _blank for getURL() function. For security, your code must check for a valid URL instead of allowing a possible malicious JavaScript code.
sample.fla (SWF: sample.swf)
sample-clickTAG.fla (SWF: sample-clickTAG.swf)