Package | com.distriqt.extension.adverts.nativeads |
Interface | public interface NativeAd extends flash.events.IEventDispatcher |
Property | Defined 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 |
Method | Defined By | ||
---|---|---|---|
destroy():void
Destroy the ad. | NativeAd | ||
Retrieve the current view params. | NativeAd | ||
Initiate a load operation with the given AdRequest
| NativeAd | ||
setViewParams(params:AdViewParams):void
Set the view parameters of this AdView to change the position / alignment of the ad. | NativeAd | ||
Displays the loaded native ad using predefined template and adds it to the view
| NativeAd |
Event | Summary | Defined By | ||
---|---|---|---|---|
NativeAd | ||||
NativeAd | ||||
NativeAd | ||||
NativeAd | ||||
NativeAd |
isLoaded | property |
isLoaded:Boolean
[read-only] Whether the current ad has a loaded ad available to be shown
public function get isLoaded():Boolean
isLoading | property |
isLoading:Boolean
[read-only] Whether the current ad has a load operation in progress
public function get isLoading():Boolean
visible | property |
visible:Boolean
Visibility of the advert. This can be used to remove the view from the app without destroying the ad
public function get visible():Boolean
public function set visible(value:Boolean):void
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.
ReturnsAdViewParams — 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)
|
Boolean — true if the show was initiated successfully
|
See also
nativead:clicked | Event |
com.distriqt.extension.adverts.events.NativeAdEvent
com.distriqt.extension.adverts.events.NativeAdEvent.CLICKED
nativead:closed | Event |
com.distriqt.extension.adverts.events.NativeAdEvent
com.distriqt.extension.adverts.events.NativeAdEvent.CLOSED
nativead:error | Event |
com.distriqt.extension.adverts.events.NativeAdEvent
com.distriqt.extension.adverts.events.NativeAdEvent.ERROR
nativead:loaded | Event |
com.distriqt.extension.adverts.events.NativeAdEvent
com.distriqt.extension.adverts.events.NativeAdEvent.LOADED
nativead:opened | Event |
com.distriqt.extension.adverts.events.NativeAdEvent
com.distriqt.extension.adverts.events.NativeAdEvent.OPENED