Instructions

Instructions for creating floaters
A floating advertisement is displayed above the content of a website, in the center of a user’s screen. This
guarantees total visibility of such advertisements.
Basic instructions






Maximum dimensions of Flash advertisements are 500×500 pixels.
Maximum initial size is 50 KB.
Advertisements must have a “Close” button.
Advertisements are displayed above the content of a website. It is therefore important that a rectangle in a
desired background color is created over the entire area of your advertisement on its bottom layer, in
order to prevent the possibility of the underlying website being visible through the advertisement.
Advertisements hide after the animation ends.
Maximum animation length is 10 seconds.
The shape of the “Close” button
The button must be clearly visible so the users are able to locate it quickly if they wish to close the advertisement.
The color of the button and its text should be in contrast from the content of the advertisement. Font size should
be at least 14. In addition to the “Close” text, we recommend adding an “X” symbol. It should be visible for the
entire duration of animation.
Click on the advertisement and the “Close” button
To ensure the correct execution of clicks on advertisements (correct redirection of users and click count) and of
the “Close” button, please follow these instructions:
 Click on the advertisement:
o To ensure the correct execution of clicks on the advertisement, add a layer (Insert > Timeline > Layer)
on top of all other layers. Choose the first keyframe on this layer.
o Draw a rectangle without a border (Stroke > None) over the entire area of the advertisement using the
“Rectangle Tool”.
o Choose the rectangle that you have drawn and convert it into a symbol (Modify > Convert to Symbol).
Assign any name to the symbol and choose type “Button”.
o
This step is mandatory only if you are using Action Script 3: edit the “Instance Name”. In this
example from the Action Script code we used the name “MyClickButton”.
o

Select the rectangle by clicking it once, then change its transparency (Properties > Color Effect >
Style > Alpha) to 0.
The Close button:
o Insert an additional layer over the newly created layer for clicking on the advertisement.
o Using the “Rectangle Tool”, draw a rectangle without a border (Stroke – None) over the area of
the advertisement that will represent the “Close” button.
o Choose the rectangle that you have drawn and convert it into a symbol (Modify > Convert to
Symbol). Assign any name to the symbol and choose the type “Button”.
o
This step is mandatory only if you are using Action Script 3: edit the Instance Name. In this
example from the Action Script code we used the name “MyCloseButton”.
o
Select the rectangle by clicking it once, then change its transparency (Properties > Color Effect >
Style > Alpha) to 0.
From now on please use the instructions according to the Action Script version you are using.
Action Script 3:
Using the right mouse button, click on the first keyframe of the topmost layer. Select “Actions” from the menu and
copy the following code into the window, which will ensure the correct execution of clicks and of hiding the
advertisement. The names “MyClickButton” and “MyCloseButton” are used in this example:
import
import
import
import
flash.events.MouseEvent;
flash.net.URLRequest;
flash.net.navigateToURL;
flash.external.ExternalInterface;
MyClickButton.addEventListener(MouseEvent.MOUSE_UP, onClick);
function onClick(e:MouseEvent):void {
var interactiveObject:InteractiveObject = e.target as InteractiveObject;
var li:LoaderInfo = LoaderInfo(interactiveObject.root.loaderInfo);
var url:String = "";
if(li.parameters.clickTAG != "" && li.parameters.clickTAG != null) {
url = li.parameters.clickTAG;
} else if(li.parameters.clickTag != "" && li.parameters.clickTag != null) {
url = li.parameters.clickTag;
} else if(li.parameters.clickthru != "" && li.parameters.clickthru != null) {
url = li.parameters.clickthru;
}
if (url) {
if (ExternalInterface.available) {
var userAgent:String = ExternalInterface.call('function(){ return
navigator.userAgent; }');
if (userAgent.indexOf("MSIE") >= 0) {
ExternalInterface.call('window.open', url, '_blank');
} else {
navigateToURL(new URLRequest(url), '_blank');
}
} else {
navigateToURL(new URLRequest(url), '_blank');
}
}
}
MyCloseButton.addEventListener(MouseEvent.CLICK, closeBanner);
function closeBanner(event:MouseEvent):void {
if (ExternalInterface.available) {
ExternalInterface.call("hideAdLayer");
} else {
navigateToURL(new URLRequest("javascript: hideAdLayer()"), "_self");
}
this.parent.removeChild(this);
}
Using the right mouse button, click on the last keyframe of the topmost layer. Select “Actions” from the menu and
copy the following code into the window, which will ensure the correct automatic closing of the advertisement after
the end of animation:
if (ExternalInterface.available) {
ExternalInterface.call("hideAdLayer");
} else {
navigateToURL(new URLRequest("javascript: hideAdLayer()"), "_self");
}
this.parent.removeChild(this);
Action Script 2:
Using the right mouse button, click on the large button for clicking on the advertisement and select “Actions” from
the menu. Copy the following code into the appropriate window:
on (release) {
if (_root.clickthru != "" && _root.clickthru != null) {
getURL(_root.clickthru, "_blank");
} else if (_root.clickTAG != "" && _root.clickTAG != null) {
getURL(_root.clickTAG, "_blank");
} else if (_root.url != "" && _root.url != null) {
getURL(_root.url, "_blank");
} else if (_root.clickTag != "" && _root.clickTag != null) {
getURL(_root.clickTag, "_blank");
}
}
Using the right mouse button, click on the button for closing the advertisement and select “Actions” from the
menu. Copy the following code into the appropriate window:
on(release) {
getURL("javascript: hideAdLayer()");
_root.unloadMovie();
}
Using the right mouse button, click on the last keyframe of the topmost layer. Select “Actions” from the menu and
copy the following code into the window, which will ensure the correct automatic closing of the advertisement after
the end of animation:
getURL("javascript: hideAdLayer()");
_root.unloadMovie();
Important notes:
 The advertising system automatically imports the value of the clickTAG variable into the Flash
advertisement, so you do not have to do it manually. This also takes care of counting the executed clicks
on the advertisement.
 Codes used in both Action Script 2 and 3 ensure that clicks are correctly executed in all popular browsers.
Incorrect use may trigger a pop-up blocker in some browsers, which prevents the landing page from
opening.
 The sequence of layers is important. The topmost layer contains a button for closing the advertisement.
The entire area of the second layer is a button for clicking on the advertisement. The rest of the layers
contain creative elements of the advertisement. The bottom layer should be entirely covered by a
rectangle in the desired color of your advertisement, in order to prevent the possibility of the underlying
website being visible through the advertisement.
 If the advertisement does not close automatically, this setting can be applied in our advertising server,
ensuring that the advertisement will close automatically after 10 seconds.