Info

Adform Widget component ensures the proper performance of Adform Widget Banners.

Examples

ActionScript2:

import com.adform.events.AdformEventDispatcher;
import com.adform.events.AdformWidgetEvent;

AdformEventDispatcher.addAdformEventListener(AdformWidgetEvent.SHOW, callback);
AdformEventDispatcher.addAdformEventListener(AdformWidgetEvent.EMAIL, callback);
AdformEventDispatcher.addAdformEventListener(AdformWidgetEvent.NETWORK_BUTTON_CLICKED,callback);
function callback(e) {
  var response:String = "";
  switch(e.type) {
        case AdformWidgetEvent.SHOW:
                response = "Show widget event";
                break;
        case AdformWidgetEvent.EMAIL:
                esponse = "Email button click event ["+e.wfParameters.senderName+"]";
                break;
         case AdformWidgetEvent.NETWORK_BUTTON_CLICKED:
                response = "Network button click event ["+e.wfParameters.network+"]";
                break;
     }
     race(response);
}

ActionScript3:

import com.adform.events.AdformEventDispatcher;
import com.adform.events.AdformWidgetEvent;

AdformEventDispatcher.addAdformEventListener(AdformWidgetEvent.EMAIL, callback);
AdformEventDispatcher.addAdformEventListener(AdformWidgetEvent.NETWORK_BUTTON_CLICKED, callback);

private function callback(e:AdformWidgetEvent):void {
  var response:String = "";
  switch(e.type) {
        case AdformWidgetEvent.EMAIL:
              response = "Email button click event ["+e.wfParameters.senderName+"]";
              break;
        case AdformWidgetEvent.NETWORK_BUTTON_CLICKED:
              response = "Network button click event ["+e.wfParameters.network+"]";
              break;
      }
      trace(response + "\n");
}

Weight

ActionScript2:

ADFWidget – 10376 bytes;
AdformWidgetShareButton - 7054 bytes.

ActionScript3:

ADFWidget – 12273 bytes;
AdformWidgetShareButton - 7023 bytes.