From September, Flash will no longer be supported by Chrome. Prepare for the shift towards HTML5 by visiting our Flash to HTML5 help page

Check it out!

Local Connection Ads

Local connection banners - separate ads communicating with each other in a special way. Below you can find all you need to know about building Adform Local connection ads.

Project setup and preview

  1. In order to work with Sync banners it's needed to have have a login for Adform Studio. Ask for it your local Adform office or send mail to technical[eta]adform.com
  2. Login and set up your members as separate Studio projects. You can work from scratch or upload your project:



  3. In order to preview all members in one window, go to your studio History and select the each member Project. Click button "Preview Selected":



  4. Now it's possible to see all members working in one place, use Positioning button to place them as you wish:

Adform Local Connection API

dhtml.connect([channel])
Connects to a given channel and returns the connection object.
Channel name is optional, so you can use dhtml.connect(); and it will fall back to bn. This is useful only to synch banners, as their child banners have the same bn.

connection.emit(type[, var1[, ...[, varN]]]);
Emits a new message. First argument is message type, it is followed by any number of optional arguments, that will be passed with the message.
E.g. connection.emit('myMessage'); connection.emit('myMessageWithArguments', 'a', 1);

connection.on(type, function([var1[, ...[, varN]]]) {});
Listens to a message type. First argument is message type to listen to, after that goes callback function with variables got from emit.
E.g. connection.on('myMessage', function() {}); connection.on('myMessageWithArguments', function(var1, var2) {});
It has a special 'member' message type for new members.
E.g. connection.on('member', function(info) {}); Listens to new members joining the channel.

connection.expect(number, function() {});
Waits for specified number of members and then executes the callback function.
E.g. connection.expect(2, function() {});

connection.join([info]);
Joins the connection. It should be called after all listeners have been setup.
Info is an optional argument with information about joining member. It wil be passed to connection.on('member', function(info) {}); and can be accessed via connection.members;
E.g. connection.join(); connection.join('a'); connection.join({id: 1});

Example:
var connection = dhtml.connect('myChannelName');

/*
connection = {
    on: function,
    emit: function,
    expect: function,
    join: function,
    members: []
}
*/

connection.on('test', function(test) {
    console.log('test', test);
});

connection.on('member', function(info) {
    console.log('new member joined', info);
    console.log('current members', connection.members);
});

connection.expect(1, function() {
    console.log('connection now has 1 member');
    connection.emit('test', 'something');
});

connection.join('me');

Tip: all the messages are sent to all members in the channel, so a banner sending them will also receive them and can listen to them. In this example one banner joins the channel. It will emit message and console the results of all available methods. To get it working for multiple banners simply connect them to the same channel, join it and add/edit listeners accordingly.

 

Exporting banner and uploading to Adform

Once the banner is finished you need to export all members separately and upload to Adform one by one.

  1. Export each project and setup in Adform as Toolkit ads
  2. Create Sync banner in Adform system

Note: for all questions please write an email to technical[eta]adform.com