Packagecom.distriqt.extension.adverts.nativeads
Interfacepublic interface NativeAd extends flash.events.IEventDispatcher

Defines the functionality for using Native Ads



Public Properties
 PropertyDefined By
  isLoaded : Boolean
[read-only] Whether the current ad has a loaded ad available to be shown
NativeAd
  isLoading : Boolean
[read-only] Whether the current ad has a load operation in progress
NativeAd
  visible : Boolean
Visibility of the advert.
NativeAd
Public Methods
 MethodDefined By
  
destroy():void
Destroy the ad.
NativeAd
  
Retrieve the current view params.
NativeAd
  
load(request:AdRequest):void
Initiate a load operation with the given AdRequest
NativeAd
  
Set the view parameters of this AdView to change the position / alignment of the ad.
NativeAd
  
showWithTemplate(template:String, params:AdViewParams, styles:NativeAdTemplateStyle = null):Boolean
Displays the loaded native ad using predefined template and adds it to the view
NativeAd
Events
 Event Summary Defined By
   NativeAd
   NativeAd
   NativeAd
   NativeAd
   NativeAd
Property Detail
isLoadedproperty
isLoaded:Boolean  [read-only]

Whether the current ad has a loaded ad available to be shown


Implementation
    public function get isLoaded():Boolean
isLoadingproperty 
isLoading:Boolean  [read-only]

Whether the current ad has a load operation in progress


Implementation
    public function get isLoading():Boolean
visibleproperty 
visible:Boolean

Visibility of the advert. This can be used to remove the view from the app without destroying the ad


Implementation
    public function get visible():Boolean
    public function set visible(value:Boolean):void
Method Detail
destroy()method
public function destroy():void

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

getViewParams()method 
public function getViewParams():AdViewParams

Retrieve the current view params. This will contain the current width and height of the advert, not the values you set. Useful if you are auto sizing the advert by not specifying a width or height value. Note: this will only be correct if the ad is visible. If the ad is not visible and you change the view params then this will not be correct until the view is visible again.

Returns
AdViewParams — Layout parameters for the ad
load()method 
public function load(request:AdRequest):void

Initiate a load operation with the given AdRequest

Parameters

request:AdRequest

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 — layout parameters for the ad

showWithTemplate()method 
public function showWithTemplate(template:String, params:AdViewParams, styles:NativeAdTemplateStyle = null):Boolean

Displays the loaded native ad using predefined template and adds it to the view

Parameters

template:String — The name of the template from the values in NativeAdTemplate
 
params:AdViewParams — Initial layout parameters for the ad - must provide a valid width and height
 
styles:NativeAdTemplateStyle (default = null) — The style definitions to use for the template (optional)

Returns
Booleantrue if the show was initiated successfully

See also

Event Detail
nativead:clicked Event
Event Object Type: com.distriqt.extension.adverts.events.NativeAdEvent
NativeAdEvent.type property = com.distriqt.extension.adverts.events.NativeAdEvent.CLICKED

nativead:closed Event  
Event Object Type: com.distriqt.extension.adverts.events.NativeAdEvent
NativeAdEvent.type property = com.distriqt.extension.adverts.events.NativeAdEvent.CLOSED

nativead:error Event  
Event Object Type: com.distriqt.extension.adverts.events.NativeAdEvent
NativeAdEvent.type property = com.distriqt.extension.adverts.events.NativeAdEvent.ERROR

nativead:loaded Event  
Event Object Type: com.distriqt.extension.adverts.events.NativeAdEvent
NativeAdEvent.type property = com.distriqt.extension.adverts.events.NativeAdEvent.LOADED

nativead:opened Event  
Event Object Type: com.distriqt.extension.adverts.events.NativeAdEvent
NativeAdEvent.type property = com.distriqt.extension.adverts.events.NativeAdEvent.OPENED