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!

Adform Core Component


Adform Core component is responsible for the event tracking, polite mode and other features in Flash banners. All the banners should contain this component. AdformCore component can be simply added into a banner by dragging it from the components window directly on the stage, or it can also be added dynamically from the library (see code examples below).

ActionScript 2 example

_root.attachMovie("AdformCore", "AdformCore", _root.getNextHighestDepth());

ActionScript 3 example

var adformCore:AdformCore = new AdformCore(this.stage);


Note: AdformCore can also be used in the Flex 2/Flex 3/Flash Builder 4 by adding its swc into the project library and using the following ActionScript 3 code.


Using ClickTags

AdformCore is also used for clickTAGs, but only in banners made with the ActionScript 3 (see the following code examples).

There is a possibility to control the landing page target from FlashVars, "landingPageTarget" parameter. It may be set in the system or by creating a banner with Creative Toolkit in the Preferences → Settings. The default value is "_blank".

ActionScript 2 example:

button.onRelease = function() : Void {
getURL(_root.clickTAG, _root.landingPageTarget);

ActionScript 3 example:

ADFGlobal.object.ADFclickedthis_buttonclickTAG = function(event:MouseEvent) {

if (!button.hasEventListener(MouseEvent.CLICK)) {
button.addEventListener(MouseEvent.CLICK, ADFGlobal.object.ADFclickedthis_buttonclickTAG);


Using Custom Events

Custom events can be used to track custom actions on banners. They work in a similar way on both the ActionScript 2 and ActionScript 3. To use these events you need to have AdformCore component placed on the stage. Also, you need to write a custom code to send a custom event on any action, for example, on a button click or on finishing an animation.

eventId - (String) Id of a custom event. Can be from 1 to 19.
eventName - (String) Custom event name.
eventVars - (Object) Object with custom variables which should be assigned for a current event. Variable names are limited to the following - bv1, bv2, ... , bv100. Their values should be the "String" type.


var eventId:String = "1";
var eventName:String = "MyCustomEvent";
var eventVars:Object = {
bv1: "John",
bv2: "Colin",
bv3: "24"
AdformCore.ADFevent(eventId, eventName, eventVars);


Note: Full query string must not exceed 4000 symbols.


Public Methods


public static function ADFevent(eventId:String, eventName:String, eventVars:Object):void

Calls Adform Custom Event.


public static function showFloating():void

Shows floating ad.

navigateToUrl [AS3 only]

public static function navigateToUrl(url:*, target:String = '_blank'):void

Utility function to wrap up changing pages. Avoids over-aggressive popup blockers.

parameterExist [AS3 only]

public static function parameterExist(...args):Boolean

Checks if specified parameters exist in flashvars.

getFlashVar [AS3 only]

public static function getFlashVar(name:String, defaultVal:String = null):String

Get single flashvar by a specified name, or return default value, if undefined.

ActionScript2: AdformCore – 4731 bytes;
ActionScript3: AdformCore – 5901 bytes;