FullScreen

1. Banner summary

ID Number: 04H021.
Short description: intro banner.
Code type: Ajax, Poster, Extension.
Examples: FullScreen on Ajax code, FullScreen on Poster code.
Third party tracking: Flash banner preparation for further AdRiver pixel insertion.
Specification: a full-page transitional ad, FullScreen plays video or Flash animation within the active browser window before a new page loads. For FullScreen on a poster/extension code it is required that user’s web browser accepts cookies files.

One recommends using a poster code only if a banner is situated at the second screen and should be displayed when an user scrolls to it. On this code banner is displayed after complete loading of the webpage. In other cases one strongly recommends using an extension code.

2. Banner preparation

2.1. FullScreen on Extension / Poster codes

2.1.1. Flash-movie on ActionScript 2

A banner should contain a button “Learn more”. This element should have the following ActionScript:


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

The second required button is “Skip ad” button. You can use any text on this button. The button should have the following ActionScript:


on(release)
{
     getURL(_root.ar_backref, "_self");
}

After a movie loads, a countdown timer should be turned on. It is usually set to 10-15 seconds, but the time can vary (please check particular website requirements). E.g. for Mail.ru countdown duration is 7 seconds.

The countdown should be presented on the screen. E.g.:
“This ad closes in ” …. “seconds. You will be redirected back to ” + _root.site_name

The example code of countdown timer:


var timerSec = 15;
function set_timer(){
    _root.txt.text = "возврат на сайт " + _root.site_name + " через " + timerSec + " секунд";
    var aaa = setInterval(function(){
        if (timerSec == 0) {
            clearInterval(aaa);
            getURL(_root.ar_backref, "_self");
            stop();
            return;
        }
        --timerSec;
        _root.txt.text = "возврат на сайт " + _root.site_name + " через " + timerSec + " секунд";
    }
    , 1000);
};
set_timer(); 

You may provide an additional button “Pause countdown”. Countdown is stopped on press or on mouseover. You can also pause countdown, when cursor is over clickthrough button to prevent a situation when FullScreen is suddenly closed. Note that “Button” here means any shape or movie.

When countdown reaches zero, this script should be executed:


getURL(_root.ar_backref, "_self");
stop();

The countdown starts when banner starts playing. While loading with preloader you should present “Skip ad” button.

To download in flash-movie additional parts (downloaded with banner), you should add name of an additional part to a _root.ar_comppath.
Example:


 _root.ar_comppath + 'flash_name.swf'
2.1.2. Flash-movie on ActionScript 3

In the first frame of your movie you should write the following ActionScript:


import flash.external.ExternalInterface;
function decodeAlt(alt:String):String{
	var tf:TextField = new TextField(); 
	tf.htmlText = alt;
	return tf.text;
}
function set_timer()
{
	var site_name:String = decodeAlt(LoaderInfo(this.root.loaderInfo).parameters['site_name']);
    Object(root).txt.htmlText = 'Возврат на сайт ' + site_name + ' через ' + timerSec + ' секунд.';
    var aaa = setInterval(function()
    {
        if (timerSec == 0) 
        {
            clearInterval(aaa);
	    	callClose(null);
            stop();
            return undefined;
        }
        --timerSec;
        Object(root).txt.htmlText = 'Возврат на сайт ' + site_name + ' через ' + timerSec + ' секунд.';
    }
    , 1000);
}
if(Object(root).timer_init == undefined) 
{
	Object(root).timer_init = true;
	var timerSec = 15;
	set_timer();
}

where timerSec is a countdown timer, which turns on after the movie is loaded.

The button “Learn more” should contain the following script:


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

 }
 click_button.addEventListener(MouseEvent.CLICK, callLink);

The button “Skip ad” should contain the following script:


function callClose(event:MouseEvent):void
 {
         var backref:String = LoaderInfo(this.root.loaderInfo).parameters['ar_backref'];
         try
         {
                 var ie:Boolean = ExternalInterface.call('function(){return
 !!window.ActiveXObject}');
                 if (ie)
                 {
                         ExternalInterface.call('function(){window.location = "' + backref
 + '";}');
                 }
                 else
                 {
                         navigateToURL(new URLRequest(backref), '_self');
                 }
         }
         catch (e:Error)
         {
                 navigateToURL(new URLRequest(backref), '_self');
         }
 }
 close_button.addEventListener(MouseEvent.CLICK, callClose);

 

2.2. FullScreen on Ajax code

2.2.1. Flash-movie on ActionScript 2

Follow the instructions listed in 2.1.1.

2.2.2. Flash-movie on ActionScript 3

The first frame of your movie should contain the following script:


import flash.external.ExternalInterface;
function decodeAlt(alt:String):String{
	var tf:TextField = new TextField(); 
	tf.htmlText = alt;
	return tf.text;
}
function set_timer()
{
	var site_name:String = decodeAlt(LoaderInfo(this.root.loaderInfo).parameters['site_name']);
    Object(root).txt.htmlText = 'Возврат на сайт ' + site_name + ' через ' + timerSec + ' секунд.';
    var aaa = setInterval(function()
    {
        if (timerSec == 0) 
        {
            clearInterval(aaa);
	    	callClose(null);
            stop();
            return undefined;
        }
        --timerSec;
        Object(root).txt.htmlText = 'Возврат на сайт ' + site_name + ' через ' + timerSec + ' секунд.';
    }
    , 1000);
}
if(Object(root).timer_init == undefined) 
{
	Object(root).timer_init = true;
	var timerSec = 15;
	set_timer();
}

The “Learn more” button should contain the following script:


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

 }
 click_button.addEventListener(MouseEvent.CLICK, callLink);

The “Skip ad” button should contain the following script:


function callClose(event:MouseEvent):void
 {
         var backref:String = LoaderInfo(this.root.loaderInfo).parameters['ar_backref'];
         try
         {
                 var ie:Boolean = ExternalInterface.call('function(){return
 !!window.ActiveXObject}');
                 if (ie)
                 {
                         ExternalInterface.call("window.ar_full_close");
                 }
                 else
                 {
                         navigateToURL(new URLRequest(backref), '_self');
                 }
         }
         catch (e:Error)
         {
                 navigateToURL(new URLRequest(backref), '_self');
         }
 }
 close_button.addEventListener(MouseEvent.CLICK, callClose);

3. Functional test

  • When click on “learn more”, advertisre’s web site should be opened.
  • When click on “skip ad”, publisher’s web site should be opened.
  • When refresh the web page during 60 seconds after the first show, banner shouldn’t be shown.

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

5. 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