Rich-media

1. Banner summary

ID Number: 06H023.
Description: interactive flash-movies which are displayed over a webpage.
Type of a code: ajax, javascript.
Examples: Rich-media on an ajax code, Rich-media on a javascript code.
Third party tracking: flash banner preparation for further AdRiver pixel insertion.
Specification: interactive flash-movies are displayed over a webpage content. A classic Rich-media consists of three flash-movies: teaser, reminder and main movie. In this manual Rich-media consists of two flash-movies.

2. Banner preparation

2.1. Flash-movie for Rich-media on a javascript code

Each flash-movie should have a “close” button. Use the following ActionScript for this button:


getURL('javascript:fl_Command("kill",0)');

0 — index number of the current flash-movie. Flash movies are enumerated in sequence of loading. First of the flash-movie has zero index number.

For starting the next part of flash-movie (in the example it is second part), use the following ActionScript:


getURL('javascript:fl_Command("start",1)');

In this case you shouldn’t use the kill command.

For clickthrough area, use the following ActionScript:


getURL(_root.link1,  "_blank");
getURL('javascript:fl_Command("kill",0)');

2.2. Flash-movie for Rich-media on a javascript code for ActionScript3

For button element use the following ActionScript:


function callLink(event:MouseEvent):void {
     try {
        var ie:String = ExternalInterface.call("function(){return !!window.ActiveXObject}");
         var url:String = LoaderInfo(this.root.loaderInfo).parameters['link1'];
         if(ie)ExternalInterface.call('window.open',url);
        else navigateToURL(new URLRequest(url), '_blank');

        ExternalInterface.call("fl_Command", "kill", 0);
     }catch (e:Error){}
}
click_button.addEventListener(MouseEvent.CLICK, callLink)

For “close” button use the following ActionScript:


flash.external.ExternalInterface.call("fl_Command", "kill", 0);

ActionScript for starting the second flash-movie:


flash.external.ExternalInterface.call("fl_Command", "start", 1);

2.3. Flash-movie for Rich-media on an ajax code

First frame of a flash-movie should contain the following ActionScript:


#include "rich.adriver.as"

A “close” button should contain the following ActionScript:


on (release) {
    richClose();
}

To go to the next flash-movie, use the following ActionScript:


richNext();

For click the button element should contain the following ActionScript:


on (release) {
    richClick();
}

2.4. JavaScript for Rich-media on an ajax code

Download the files. Open the script.js file with a text editor. You may change only an editable block.


var panels = [
		{swf: '0.swf', width: '350', height: '350', x: '0.5', y: '0.5', abs_x: '0', abs_y: '0', wmode: 'transparent'},
		{swf: '1.swf', width: '300', height: '300', x: '1', y: '0', abs_x: '0', abs_y: '0', wmode: 'opaque'}
	],
	ar_flashver	= '8',
	ar_zeropixel	= '';
  • swf — flash-movie name, may contain ‘http://’, in this case will be loaded from location.
  • width — width of the flash-movie.
  • height — height of the flash-movie.
  • x — position on X.
  • y — position on Y.
  • abs_x — absolute position on X. If ‘0’ then relative coordinates are used (x, y); coordinates toward left side are positive numbers, for example, 100, coordinates toward right side are negative numbers, for example, -100.
  • abs_y — absolute position on Y. If ‘0’ then relative coordinates are used (x, y); coordinates toward top side are positive numbers, for example, 100, coordinates toward bottom side are negative numbers, for example, -100.
  • wmode — you can use one of the values:
    • transparent — the background of the HTML page shows through all transparent portions of the movie. This option can slow animation performance.
    • opaque — the movie hides everything on the page behind it.
    • window — movie plays in its own rectangular window on a web page.
  • ar_flashver — version of a Flash Player on an user’s PC.
  • ar_zeropixel — external counter for banner if need.

At first, set the parameters of the first flash-movie, then for the second flash-movie etc.

Save the script.js file.

3. 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. Size of the flash banner and the image should be the same.

4. The limit of the file size 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 for each one component.

To download in the banner files with extra-limit size you can use the box Расположение на стороннем сервере, in which you should insert the pathname to an external server.

For the banners that can’t be loaded from an external server it is possible to increase the limits of the file size. It comes to agreement with sales and support departments.

Last modified on 29.03.2016