Packagecom.brightcove.api.events
Classpublic class AdEvent
InheritanceAdEvent Inheritance flash.events.Event

Events that are dispatched by the ad module. To reference these events in JavaScript, use the name BCAdvertisingEvent in place of AdEvent.



Public Properties
 PropertyDefined By
  ad : Object
[read-only] Returns the current extenal or received ad.
AdEvent
  position : Number
[read-only] Returns the ad's current position
AdEvent
Public Methods
 MethodDefined By
  
AdEvent(type:String, position:Number = 0, ad:Object = null)
Constructor.
AdEvent
  
clone():Event
[override] Returns a copy of the event instance.
AdEvent
Public Constants
 ConstantDefined By
  AD_CLICK : String = adClick
[static] The AdEvent.AD_CLICK constant defines the value of the type property of the event object for an adClick event.
AdEvent
  AD_COMPLETE : String = adComplete
[static] The AdEvent.AD_COMPLETE constant defines the value of the type property of the event object for an adComplete event.
AdEvent
  AD_PAUSE : String = adPause
[static] The AdEvent.AD_PAUSE constant defines the value of the type property of the event object for an adPause event.
AdEvent
  AD_POSTROLLS_COMPLETE : String = adPostRollsComplete
[static] The AdEvent.AD_POSTROLLS_COMPLETE constant defines the value of the type property of the event object for an adPostRollsComplete event.
AdEvent
  AD_PROGRESS : String = adProgress
[static] The AdEvent.AD_PROGRESS constant defines the value of the type property of the event object for an adProgress event.
AdEvent
  AD_RECEIVED : String = adReceived
[static] The AdEvent.AD_RECEIVED constant defines the value of the type property of the event object for an adReceived event.
AdEvent
  AD_RESUME : String = adResume
[static] The AdEvent.AD_RESUME constant defines the value of the type property of the event object for an adResume event.
AdEvent
  AD_RULES_READY : String = adRulesReady
[static] The AdEvent.AD_RULES_READY constant defines the value of the type property of the event object for an adRulesReady event.
AdEvent
  AD_START : String = adStart
[static] The AdEvent.AD_START constant defines the value of the type property of the event object for an adStart event.
AdEvent
  EXTERNAL_AD : String = externalAd
[static] The AdEvent.EXTERNAL_AD constant defines the value of the type property of the event object for an externalAd event.
AdEvent
Property Detail
adproperty
ad:Object  [read-only]

Returns the current extenal or received ad.


Implementation
    public function get ad():Object
positionproperty 
position:Number  [read-only]

Returns the ad's current position


Implementation
    public function get position():Number
Constructor Detail
AdEvent()Constructor
public function AdEvent(type:String, position:Number = 0, ad:Object = null)

Constructor.

Parameters
type:String — event name.
 
position:Number (default = 0) — current position of the ad.
 
ad:Object (default = null)
Method Detail
clone()method
override public function clone():Event

Returns a copy of the event instance.

Returns
Event — A copy of the event.
Constant Detail
AD_CLICKConstant
public static const AD_CLICK:String = adClick

The AdEvent.AD_CLICK constant defines the value of the type property of the event object for an adClick event. This fires when an ad has been clicked. Right now this only works for video ads- other types of ads will not fire this event.

AD_COMPLETEConstant 
public static const AD_COMPLETE:String = adComplete

The AdEvent.AD_COMPLETE constant defines the value of the type property of the event object for an adComplete event. This indicates when an ad completes.

AD_PAUSEConstant 
public static const AD_PAUSE:String = adPause

The AdEvent.AD_PAUSE constant defines the value of the type property of the event object for an adPause event. This indicates when a linear ad pauses. Linear ads include video ads and certain ad SWFs.

AD_POSTROLLS_COMPLETEConstant 
public static const AD_POSTROLLS_COMPLETE:String = adPostRollsComplete

The AdEvent.AD_POSTROLLS_COMPLETE constant defines the value of the type property of the event object for an adPostRollsComplete event. This event is fired after all post-roll ads have completed or immediately after a post-roll ad has been requested and no ad is returned. It also fires when the media completes if no post-rolls are enabled.

AD_PROGRESSConstant 
public static const AD_PROGRESS:String = adProgress

The AdEvent.AD_PROGRESS constant defines the value of the type property of the event object for an adProgress event. This indicates the progress of a linear ad. The position information can also be found through methods in the video module. Linear ads include video ads and certain ad SWFs.

AD_RECEIVEDConstant 
public static const AD_RECEIVED:String = adReceived

The AdEvent.AD_RECEIVED constant defines the value of the type property of the event object for an adReceived event. This indicates when an ad has been received. This event has a property named ad, the value of which is a string containing the original ad XML sent by the ad source. This ad XML can then be parsed to extract any of the XML nodes. This event fires before ad start.

AD_RESUMEConstant 
public static const AD_RESUME:String = adResume

The AdEvent.AD_RESUME constant defines the value of the type property of the event object for an adResume event. This indicates when a linear ad resumes after a pause. Linear ads include video ads and certain ad SWFs.

AD_RULES_READYConstant 
public static const AD_RULES_READY:String = adRulesReady

The AdEvent.AD_RULES_READY constant defines the value of the type property of the event object for an adRulesReady event. This event is fired when the adRulesReady() method is called in an Ad Rules SWF. This event was used in the past to indicate when a video could be loaded but is not needed for that purpose anymore, as the player now handles the timing for video loading with ad rules SWFs.

AD_STARTConstant 
public static const AD_START:String = adStart

The AdEvent.AD_START constant defines the value of the type property of the event object for an adStart event. This indicates when an ad starts.

EXTERNAL_ADConstant 
public static const EXTERNAL_AD:String = externalAd

The AdEvent.EXTERNAL_AD constant defines the value of the type property of the event object for an externalAd event. This fires when external ads are enabled and an external ad has been found.