User Tools

Site Tools


creatives:flash-en

Creating Flash banners

:!: Attention! For a guide for banners converted with Swiffy, or created with Adobe Edge or Google Web Developer, please use this documentation: http://dev.adverticum.com/conversion-eng:start

Important information

Handling the ClickTAG URL

In the case of banner creation it is always needed to use the clickTAG flashvar or in case of AS3 Flash (andGoa3 codes) the details written in the part of adverticumhelper.as has to be applied, it is important to pay attention to the difference of small and capital letters. If it is necessary to use more clickTAGs, please read the concerning part of this guide. The Adverticum AdServer’s administration page has those kind of functions that help to correct some of the frequent banner mistakes, but we are not taking responsibility for the functioning of not properly created banners.

Fallback image

Along with the finished .swf creatives, substituting images (gif, jpeg, png) can be used that are the same size as the swf file’s. Note: in case of opening banner the size should be equal with the open state of the banner.

The size of the ads

The size of creatives cannot be more than 300 kB. The system allows to upload bigger files but the serving of these costs extra fee.

Compression

It’s important that the system cannot check creatives with LMZA compression, hence Deflate compression option should be used instead of LMZA publishing the creative!

Please forward your questions about banner creation to the Adverticum Support Team available on this e-mail address: support@adverticum.com

You can read more about the settings of Adverticum AdServer's banners in our Knowledgebase. (On this page only Adverticum AdServer users, campaign managers are able to login to view our articles.)

Actionscript 2

Handling clicks in case of one CT URL

In the editing phase (.fla) of the Flash file the handling of CT should be handled by calling the getURL function.

  • After designing the animation, a new layer should be created with the highest priority.
  • On this layer create a rectangular space and and form it into a symbol button.
  • Enter into the symbol and make its content transparent.
  • Connect the symbol with the function - getURL and the wanted parameters:

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

Implementing the above will result in proper CT measurement in AdServer. Flash banner Clicks (because of the restriction of the Flash plugin) can only open content in a new browser window/tab.

Több CT URL kezelése Flash bannerben

The AdServer is capable of passing several CT URLs to the Flash banner it can be implemented by handling clickTAG1, clickTAG2,etc. variables with getURL() according to the example above with getURL(). The additional click parameters are sent in flashvars. These need to be set by the campaign manager on the admin interface.

Handling open start request

In our system, it is possible to set that the creative should start open in ceratin intervalls. If this is the case, can be determined with the following example. under the if statement should be the code handling the start open request. Value of openNow is always a string, and has the value 'true' in case the banner should start open.

if (_root.openNow === 'true') {
    /*...*/
}

Preparing the Flash file to apply open and close function

The Flash file receives the functions to call in flashvars (with ExternalInterface.call) to open or close the banner. This can be used for any desired event such as mouseover or click. To open one should use openFUNCTION while to close closeFUNCTION functions passed in flashvars.

To call close, the code beneath is enough in itself, but it will close instantly.

import flash.external.*;
ExternalInterface.call( _root.openFUNCTION );

To connect this to the user action of clicking the banner, one of these should be written on the element itself.

on ( release ) { 
 
    import flash.external.*;
    ExternalInterface.call( _root.openFUNCTION );
}
 
on ( release ) {
 
    import flash.external.*;
    ExternalInterface.call( _root.closeFUNCTION );
}

Passing variables with Flash banners

Az AdServer képes paramétereket (HTTP GET) dinamikusan továbbítani a céloldalra. A továbbításhoz egy speciális paraméterre van szükség (fwdparams) az AdServer meghívásakor:

The AdServer is capable of passing parameters (HTTP GET) dynamicaly to the landing page. For passing them fwdparams should be set while calling the AdServer.

var fwdparams = 1;
var value = 1;
getURL( _root.clickTAG, _root.clickTARGET, "GET" );

:!: All the variables of the current scope will be added to the URL. Because the scope of the Button object is always the same as the enclosing MovieClips's scope, and while the example above is called on _root object, all the properties of the _root object will be added in the request. Hence the buttonn scope sould be placed in a separate MovieClip object.

Restriction

:!: There should be no variable with the name URL, because the request will result in a 404 Not Found response.

Measuring clicks with 3rd party tracking URL

In the examples the Flash variables's name is 'cTrack', and the 'button' is the name of the button that we measure.

button.onRelease = function() { 
 
    var loader = new LoadVars(); 
    loader.load(_root.cTrack);
}

on ( release ) { 
 
    var loader = new LoadVars(); 
    loader.load(_root.cTrack);
}

Measuring clicks with measuretype-s provided

In our example we measure the video start interacion. For this we use a measure type called play. Code sould be placed into the object.

on ( release ) {
 
    import flash.external.*;
    ExternalInterface.call(_root.play_fire);
}


Actionscript 3 - AdverticumHelper.as

The goal of AdverticumHelper.as is to help creating Adverticum AdServer compatible banners. This ActionScriptfile contains all the Adverticum specific solutions that exploit the special features of goa3. It also contains theworkaround solutions with special calls for different browsers.The location of the .as file: http://share.adverticum.net/AdverticumHelper.as

ActionScript3 vs. Internet Explorer

In case of creatives implemented in AS3 given versions of Internet Explorer are not able to handle the click event properly. In case of Goa3 code importing AdverticumHelper.as is solving this issue.

Handlin click in case of one URL

Let's say that we have a Button called ct - actually any InteractiveObject will do. we can attahc click handler with the code beneath:

import AdverticumHelper;
AdverticumHelper.bindCTEvent( ct, root.loaderInfo.parameters.clickTAG );

Handling multiple URLs

In case of several CTs the similar method should be used, only difference is that not only the clickTAG variable, but as many variables should be forwarded as many click events you would like to use. (so these would take the visitor to different landing pages).

Example: in case of two buttons named info and order and two URLs belonging to them: clickINFO and clickORDER.

import AdverticumHelper;
 
AdverticumHelper.bindCTEvent( order, root.loaderInfo.parameters.clickORDER );
AdverticumHelper.bindCTEvent( info, root.loaderInfo.parameters.clickINFO );

In case of banners with multiple CTs, campaign managers need to know the names of the used variables (according the example above clickORDER és clickINFO) and that which variable belongs to which click event. The names of the variables have to be given together with the right URLs of the landing pages on the administration interface, so the clicks could be measured properly.

Handling open start request

In our system, it is possible to set that the creative should start open in ceratin intervalls. If this is the case, can be determined with the following example. under the if statement should be the code handling the start open request. Value of openNow is always a string, and has the value 'true' in case the banner should start open.

var openNow = root.loaderInfo.parameters.openNow;
if (openNow === 'true') {
    /*...*/
}

Parameter forwarding

If you would like to forward the details given on a form in Flash format, then one should pass these parameters to function in a URLVariables object:

import AdverticumHelper; 
 
var variables:URLVariables = new URLVariables();
variables.userName = "guest";
variables.orderItem = "FooBar";
variables.orderTime = new Date().getTime(); 
 
AdverticumHelper.bindCTEvent( ct, root.loaderInfo.parameters.clickTAG, variables );

In the example above the landing page will receive (after Adverticum AdServer has measured the CT) the values set in variables object in GET parameters:

userName=guest&orderItem=FooBar&orderTime=1249997957931

If you would like to handle the event it can be done in the following way:

import AdverticumHelper; 
 
var variables:URLVariables = new URLVariables();
variables.userEmail = "foo@bar.com";
variables.userNewsletter = "1"; 
 
button.addEventListener( MouseEvent.MOUSE_UP, function ( e:MouseEvent ) {  
 
    var req:URLRequest = AdverticumHelper.getURLRequest( root, root.loaderInfo.parameters.clickSUBMIT, variables );
    AdverticumHelper.changePage( req, AdverticumHelper.getClickTarget( root ));
});

Because of the Adobe Flash features the order of the variables will not be necessarily the same as it was set in the object, so the creator of the banner should not rely on that!

If there are other forward parameters defined in the zone or the banner, these will be forwarded with the rest of the parameters. If one parameter is appearing multiple times, the landing page will receive 2 parameters like that.

Handling close function

import AdverticumHelper;
AdverticumHelper.bindCloseEvent( closeButton );

Handling open and close without AdverticumHelper.as

The Flash file receives the functions to call in flashvars - with ExternalInterface.call - to open or close the banner. This can be used for any desired event such as mouseover or click. To open one should use openFUNCTION,while to close closeFUNCTION, and these functions should be called in flashvars.

The following code will close our banner instantly:

import flash.external.ExternalInterface.*;
ExternalInterface.call(_root.loaderInfo.parameters.closeFUNCTION);

To connect it to useraction click.

import flash.external.ExternalInterface.*;
 
closeButton.addEventListener(MouseEvent.CLICK, function ( ev: mouseEvent ) {
    ExternalInterface.call(_root.loaderInfo.parameters.closeFUNCTION);
});
 
openButton.addEventListener(MouseEvent.CLICK, function ( ev: mouseEvent ) {
    ExternalInterface.call(_root.loaderInfo.parameters.openFUNCTION);
});

Amendment: to measure events in flash creatives - in case of Flash creatives we need to use the Flash variables. (the campaign managers will need to know the names of flash variables, and the trackingURL created by him/her ('Goa3 AV link').

Tracking clicks with 3rd party tracking URLs

In the examples the Flash variables's name is 'cTrack', and the 'button' is the name of the button that we measure.

function getFlashVars():Object {
    return Object( LoaderInfo( this.loaderInfo ).parameters );
}
 
import flash.net.URLRequest;
import flash.net.URLLoader;
import flash.external.ExternalInterface;
import flash.events.MouseEvent;
 
function doTrack (e:MouseEvent):void {
 
  	var tracker:URLRequest = new URLRequest(); 
	tracker.url = getFlashVars().cTrack;
	tracker.method = URLRequestMethod.GET;
 
	var loader:URLLoader = new URLLoader(); 
	loader.load(tracker);
}
 
this.button1.addEventListener(MouseEvent.CLICK, doTrack);

Measuring clicks with measuretype-s provided

In our example we measure the video start interacion. For this we use a measure type called play. Code sould be placed into the object.

import flash.external.*;
 
trackButton.addEventListener(MouseEvent.CLICK, function ( ev : MouseEvent ) {
    ExternalInterface.call(root.loaderInfo.parameters.play_fire);
});


You could leave a comment if you were logged in.
creatives/flash-en.txt · Last modified: 2015/09/29 11:20 by avarga