Video Cloud players support SWF ads that use ActionScript 2 and are compiled for either Flash 8 or Flash 9. This topic describes how to add a click-through URL to an ad creative that uses ActionScript 2. Video Cloud players do not yet support SWF ads that use ActionScript 3.
To enable your ActionScript 2/Flash 8 or Flash 9 creative to click through, follow the instructions for one of the options listed below:
on (release){
getURL(clickTag, "_blank");
}
Name the button instance and attach the onRelease handler through code.
In the following example, the button has been given the instance name clickTag_bn in the Flash IDE properties panel. This code would then be placed on the button's parent timeline:
clickTag_bn.onRelease = function(){
getURL(clickTag, "_blank");
};
In both of these cases, the clickTag argument will be undefined at the time of compiling, but will be populated dynamically with a value at run-time by the Video Cloud player. This allows the click-through URL to be modified at any time during a campaign, as opposed to hard-coding the URL in the SWF file. The second parameter of the getURL() command ("_blank") is required as it ensures that the URL call will be made in a new browser window and the Video Cloud player experience will not be disturbed. Note that the name of the clickTag argument is not case-sensitive; Video Cloud can handle other case variations such as clicktag or ClickTag.
Using this code allows for much easier trafficking of a click-through URL. To add this code, you can apply the first sample directly to the button (typically covering the stage), or add the second sample to frame 5 of the "code" layer of the Flash 9 or Flash 8 templates provided by Video Cloud.