ExpandableClick

1. Banner summary

ID Number: 53H066.
Short description: banner loads together with the page and expands shifting site content down. After a click on the banner it takes smaller size.
Code type: Ajax, Poster, Extension.
Examples: Eclipse on Ajax code.
Third party tracking: Flash banner preparation for further AdRiver pixel insertion.
Specification: banner consists of two flash-movies with different width or height. Initially, the first flash-movie is shown. It is displayed until a user clicks on it, after the click it is replaced by the second banner. The banner does not have limitations on showing to unique users. It is displayed every time a user loads the particular webpage.

It is recommended to use Poster code if a banner should be displayed only after a user scrolls to its placement. On this code banner is displayed after complete loading of the webpage. In other cases it is strongly recommended to use Extension code.

2. Flash-movie preparation

You should prepare two flash-movies: the big one and the small one. For the small flash-movie you should also prepare a .gif or .jpeg image, which will be shown to those users who do not have a compatible version of flash player installed. Width and height of the image and the small flash-movie must be the same.

The first frame of flash-movie should contain the following ActionScript:


if(ar_init == undefined){
 ar_init = true;
 System.security.allowDomain('*');
}

System.security.allowDomain(‘*’) allows the downloader to access banner variables and properly initialize click variable link1. It is not necessary to specially permit access in a downloader to those movies which are being downloaded.

Your flash movie should contain a button element with the following ActionScript:


on (release) {
       getURL(_root.link1, "_blank");
}

You should obligatorily use the link1 variable, it is used for counting clicks.

If it is necessary to open a banner link in a current window you can use the value _top of a target variable.


on (release) {
       getURL(_root.link1, "_top");
}

If you client is using AdRiver as a main system for online-advertising management on his site you can use the following code:


on (release) {
       getURL(_root.link1, _root.target);
}

This code allows to open banner link either in a current window or in a new window according to the option that was choosen in AdRiver interface.

For the button element that expands the banner by the user’s click on it write the code given below:


on(release){
   flash.external.ExternalInterface.call("window.showSG");
}

In big flash movie you should also create the button which makes the banner reduced. Write the following code for the button:


on(release){
   flash.external.ExternalInterface.call("window.hideSG");
}

3. Script preperation for banners on Poster code

Download an example. Open a script.js file with a text editor. You should change only that part of code, which is marked as “Editable block”.


var gifname			= '0.gif';
var giflocation			= '';
var smallflashname		= 'bannerSmall.swf';
var smallflashlocation		= '';
var ar_height_small 	 	= '90';
var ar_width_small	 	= '704';
var bigflashname	 	= 'bannerBig.swf';
var bigflashlocation	 	= '';
var ar_width_big	 	= '704';
var ar_height_big	 	= '180';
var ar_valign	 	 	= '1';
var ar_align	 	 	= '1';
var ar_flashver	 	 	= '9';
var ar_alt_link	 	 	= '';
var ar_zeropixel	 	= '';

Variables:

  • gifname — name of the image, which will be shown to those users who do not have a compatible version of flash player installed
  • giflocation — if the image is loaded from external server, enter the full pathname to it on a server (starting with “http://” or “https://”).
  • smallflashname — name of the small flash-movie. Enter the name of your small flash-movie.
  • smallflashlocation — if flash-movie is loaded from external server, enter the full pathname to it on a server (starting with “http://” or “https://”).
  • ar_height_small — height of small flash-movie in px.
  • ar_width_small — width of small flash-movie in px.
  • bigflashname — name of the bigl flash-movie. Enter the name of your big flash-movie..
  • bigflashlocation — if flash-movie is loaded from external server, enter the full pathname to it on a server (starting with “http://” or “https://”).
  • ar_width_big — width of big flash-movie in px.
  • ar_height_big — height of big flash-movie in px.
  • ar_valign — slew vertically. Enter 0 if banner should be turning up, or 1 for making banner turning down.
  • ar_align — slew horizontally. Enter 0 if banner should be turning left, or 1 for making banner turning right.
  • ar_flashver — minimum flash-plugin version, which must be installed for watching your flash-movies.
  • ar_alt_link — alterbative click URL for image, if needed
  • ar_zeropixel — here you can enter third party tracking URL, if needed

4. Requirements

Names of the files can consist of numbers, Latin letters or underscore symbols only and can’t contain any Russian letters, space symbols, quotes or other special symbols. Width and height of the image and the small flash-movie must be the same.

5. File size limits for banners in AdRiver

  • gif, jpeg, png-files (img width x height banners on AdRiver) — 600К;
  • swf-files (flash width x height banners on AdRiver) — 600K;
  • other file types — 600K;
  • for multicomponent banners the limits are checked separately for each component.

For downloading banner files with extra-limit sizes you can use the box “Расположение на стороннем сервере”, where you should enter the full pathname to a file on external server.

For banners that can’t be loaded from external server it is possible to increase the limits of the file sizse. It must be agreed with sales and support departments.

Last modified on 29.03.2016