Info
Adform Video component ensures proper performance of Adform Video Banners.
Events
You are able to listen and dispatch these Adform video component events:
- AdformVideoEvent. PLAY
- AdformVideoEvent.STOP
- AdformVideoEvent. PAUSE
- AdformVideoEvent.LOAD_COMPLETE
- AdformVideoEvent.LOAD_PROGRESS
- AdformVideoEvent.PLAY_PROGRESS
- AdformVideoEvent.START_SEEK
- AdformVideoEvent.END_SEEK
- AdformVideoEvent.COMPLETE
- AdformVideoEvent.ON_CUE_POINT
- AdformVideoEvent.SOUND_ON
- AdformVideoEvent.SOUND_OFF
- AdformVideoEvent.FULL_SCREEN_ON
- AdformVideoEvent.FULL_SCREEN_OFF
- AdformVideoEvent.FULL_SCREEN_OFF
- AdformVideoEvent.ON_META_DATA
- AdformVideoEvent.NET_CONNECTION_STATUS
Examples
ActionScript2:
import com.adform.events.AdformEventDispatcher;
import com.adform.events.AdformVideoEvent;
//event listener
AdformEventDispatcher.addAdformEventListener(AdformVideoEvent.PLAY, eventHandler);
function eventHandler(eObj:Object):Void
{
// custom code
}
//event dispatch
this.btn.onRelease = function() : Void{
AdformEventDispatcher.dispatchAdformEvent({type:AdformVideoEvent.PLAY, targetsArr:["adformVideoPlayer"]});
}
ActionScript3:
import com.adform.events.AdformEventDispatcher;
import com.adform.events.AdformVideoEvent;
//event listener
AdformEventDispatcher.addAdformEventListener(AdformVideoEvent.PLAY, eventHandler);
function eventHandler(eObj:AdformVideoEvent):void
{
// custom code
}
//event dispatch
btn.addEventListener(MouseEvent.CLICK, playButtonClick);
function playButtonClick(e:MouseEvent):void{
AdformEventDispatcher.dispatchAdformEvent(new AdformVideoEvent(AdformVideoEvent.PLAY,["adformVideoPlayer"]));
}
Weight
ActionScript2:
- Video component – 9609 bytes;
- Video component with play, pause, sound buttons – 13908 bytes;
ActionScript3:
- Video component – 13152 bytes;
- Video component with play, pause, sound buttons – 17512 bytes;