Packagecom.hdi.nativeExtensions
Classpublic class NativeAds
InheritanceNativeAds Inheritance Object



Public Properties
 PropertyDefined By
  dispatcher : EventDispatcher
[static] [read-only] Dispatcher object, which will dispatch different events.
NativeAds
  isSupported : Boolean
[static] [read-only] Is the extension supported on this platform.
NativeAds
Public Methods
 MethodDefined By
  
[static] Hide native ad view if it's visible Usually this method is called on view.deactivate
NativeAds
  
dispose():void
[static] Clean up the extension - only if you no longer need it or want to free memory.
NativeAds
  
hideAd():void
[static] Hide ad view.
NativeAds
  
initAd(x:int, y:int, width:int, height:int):void
[static] Init ad on a screen, in the specified rectangle.
NativeAds
  
removeAd():void
[static] Removes the ad view
NativeAds
  
restoreAd():void
[static] Restor ad state.
NativeAds
  
setAdMode(isInRelaMode:Boolean):void
[static] Set ad mode.
NativeAds
  
setUnitId(unitId:String):void
[static] Set unit-id
NativeAds
  
showAd(x:int, y:int, width:int, height:int):void
[static] Show ad on a screen, in the specified rectangle.
NativeAds
Property Detail
dispatcherproperty
dispatcher:EventDispatcher  [read-only]

Dispatcher object, which will dispatch different events. If you wat to be notified when an event is fired add a listenr to this object. For more information look at NativeAdsEvent


Implementation
    public static function get dispatcher():EventDispatcher

See also

isSupportedproperty 
isSupported:Boolean  [read-only]

Is the extension supported on this platform. Adobe recomment to implement this method in every native extension.


Implementation
    public static function get isSupported():Boolean
Method Detail
deactivateAd()method
public static function deactivateAd():void

Hide native ad view if it's visible Usually this method is called on view.deactivate

dispose()method 
public static function dispose():void

Clean up the extension - only if you no longer need it or want to free memory.

hideAd()method 
public static function hideAd():void

Hide ad view.

initAd()method 
public static function initAd(x:int, y:int, width:int, height:int):void

Init ad on a screen, in the specified rectangle. Works on iOS only.

Parameters

x:int
 
y:int
 
width:int
 
height:int

removeAd()method 
public static function removeAd():void

Removes the ad view

restoreAd()method 
public static function restoreAd():void

Restor ad state. If the ad was visible then it will be displayed automatically. Usually this method is called on view.activate

setAdMode()method 
public static function setAdMode(isInRelaMode:Boolean):void

Set ad mode. Default value is false, which means that the the component will display test ad. If true is passed then all request will return real ads. Be sure that it's true, when the app is published. Otherwise no impresions will be tracked and your users will see the test ad only.

Parameters

isInRelaMode:Boolean

setUnitId()method 
public static function setUnitId(unitId:String):void

Set unit-id

Parameters

unitId:String

showAd()method 
public static function showAd(x:int, y:int, width:int, height:int):void

Show ad on a screen, in the specified rectangle. This works similar to StageWebView class in AIR

Parameters

x:int
 
y:int
 
width:int
 
height:int