Packagecom.distriqt.extension.adverts
Interfacepublic interface AdView extends flash.events.IEventDispatcher



Public Methods
 MethodDefined By
  
destroy():void
Destroy the ad view.
AdView
  
Returns the size of the ad.
AdView
  
getAdUnitId():String
Returns the ad unit ID.
AdView
  
hide():Boolean
Hides the advert by removing it from the view
AdView
  
isLoading():Boolean
Returns true if the ad is loading.
AdView
  
load(request:AdRequest):void
Starts loading the ad on a background thread.
AdView
  
setAdaptiveAdSize(width:int = -1, orientation:String = auto):void
Sets an anchored adaptive advert size based on the requested width and orientation.
AdView
  
setAdSize(size:AdSize):void
Sets the size of the ad.
AdView
  
setAdUnitId(adUnitId:String):void
Sets the ad unit ID.
AdView
  
setInlineAdaptiveAdSize(width:int = -1, orientation:String = auto):void
Sets an inline anchored adaptive advert size based on the requested width and orientation.
AdView
  
setInlineAdaptiveAdSizeWithMaxHeight(maxHeight:int, width:int = -1):void
Sets an inline anchored adaptive advert size based on the requested width and maximum height.
AdView
  
Set the view parameters of this AdView to change the position / alignment of the ad.
AdView
  
show():Boolean
Shows the advert by adding it to the view
AdView
Events
 Event Summary Defined By
   When a user returns to the app after viewing an ad's destination URL, this event is dispatched.AdView
   Dispatched if the ad failed to load.AdView
  AdView
   This event is dispatched when an ad has finished loading.AdView
   This event is dispatched when an ad opens an overlay that covers the screen..AdView
   Dispatched when an impression occurs that results in revenue data.AdView
Method Detail
destroy()method
public function destroy():void

Destroy the ad view. No other methods should be called on the ad view after destroy() is called.

getAdSize()method 
public function getAdSize():AdSize

Returns the size of the ad. Returns null if setAdSize(AdSize) hasn't been called yet.

Returns
AdSize
getAdUnitId()method 
public function getAdUnitId():String

Returns the ad unit ID.

Returns
String
hide()method 
public function hide():Boolean

Hides the advert by removing it from the view

Returns
Boolean
isLoading()method 
public function isLoading():Boolean

Returns true if the ad is loading.

Returns
Booleantrue if the ad is loading
load()method 
public function load(request:AdRequest):void

Starts loading the ad on a background thread.

Parameters

request:AdRequest

setAdaptiveAdSize()method 
public function setAdaptiveAdSize(width:int = -1, orientation:String = auto):void

Sets an anchored adaptive advert size based on the requested width and orientation. If left to the defaults the extension will apply the current available width and device orientation to calculate these values. Note: You must set the ad size before loading.

Parameters

width:int (default = -1) — The available width for the adaptive advert
 
orientation:String (default = auto) — The requested orientation, or "auto" for the current orientation

setAdSize()method 
public function setAdSize(size:AdSize):void

Sets the size of the ad. Note: You must set the ad size before loading.

Parameters

size:AdSize

setAdUnitId()method 
public function setAdUnitId(adUnitId:String):void

Sets the ad unit ID.

Parameters

adUnitId:String

setInlineAdaptiveAdSize()method 
public function setInlineAdaptiveAdSize(width:int = -1, orientation:String = auto):void

Sets an inline anchored adaptive advert size based on the requested width and orientation. If left to the defaults the extension will apply the current available width and device orientation to calculate these values. Note: You must set the ad size before loading.

Parameters

width:int (default = -1) — The available width for the adaptive advert
 
orientation:String (default = auto) — The requested orientation, or "auto" for the current orientation

setInlineAdaptiveAdSizeWithMaxHeight()method 
public function setInlineAdaptiveAdSizeWithMaxHeight(maxHeight:int, width:int = -1):void

Sets an inline anchored adaptive advert size based on the requested width and maximum height. This ad size allows the service to choose an optimal ad size with a height less than or equal to the max height given in the maxHeight parameter Note: You must set the ad size before loading.

Parameters

maxHeight:int — The maximum height for the ad view
 
width:int (default = -1) — The available width for the adaptive ad view (default: -1 uses the current device width)

setViewParams()method 
public function setViewParams(params:AdViewParams):void

Set the view parameters of this AdView to change the position / alignment of the ad.

Parameters

params:AdViewParams

show()method 
public function show():Boolean

Shows the advert by adding it to the view

Returns
Boolean
Event Detail
adview:closed Event
Event Object Type: com.distriqt.extension.adverts.events.AdViewEvent
AdViewEvent.type property = com.distriqt.extension.adverts.events.AdViewEvent.CLOSED

When a user returns to the app after viewing an ad's destination URL, this event is dispatched. Your app can use it to resume suspended activities or perform any other work necessary to make itself ready for interaction.

adview:error Event  
Event Object Type: com.distriqt.extension.adverts.events.AdViewEvent
AdViewEvent.type property = com.distriqt.extension.adverts.events.AdViewEvent.ERROR

Dispatched if the ad failed to load.

adview:leftapplication Event  
Event Object Type: com.distriqt.extension.adverts.events.AdViewEvent
AdViewEvent.type property = com.distriqt.extension.adverts.events.AdViewEvent.LEFT_APPLICATION

adview:loaded Event  
Event Object Type: com.distriqt.extension.adverts.events.AdViewEvent
AdViewEvent.type property = com.distriqt.extension.adverts.events.AdViewEvent.LOADED

This event is dispatched when an ad has finished loading.

If you want to delay displaying an ad until you're sure an ad will be loaded you should wait for this event before adding the view.

adview:opened Event  
Event Object Type: com.distriqt.extension.adverts.events.AdViewEvent
AdViewEvent.type property = com.distriqt.extension.adverts.events.AdViewEvent.OPENED

This event is dispatched when an ad opens an overlay that covers the screen..

paidevent_paid Event  
Event Object Type: com.distriqt.extension.adverts.events.PaidEvent
PaidEvent.type property = com.distriqt.extension.adverts.events.PaidEvent.PAID

Dispatched when an impression occurs that results in revenue data. By implementing this handler, you can use the data to calculate a user's life time value, or forward the data downstream to other relevant systems.