守望者--AIR技术交流

标题: iad-ane-ios-air [打印本页]

作者: 破晓    时间: 2015-3-31 14:25
标题: iad-ane-ios-air
iad-ane-ios-air

this is a free actionscript native extension of iad for flash air mobile application,enable as3 developter to add iad ad in ios app.this ane for air
is a ios ane ,not support android.apple ad network just support banner(iphone,ipad) and Interstitial(ipad),
and this air ane support all native function,include all size type banner,interstitial and event

1.to use this native extension ,you would enable iad inhttps://itunesconnect.apple.com/WebObjects/iTunesConnect.woa
2.requrie flash air sdk 3.9 or high
ref:http://labs.adobe.com
3.native extension has been test on iphone 4(ios 7) and ipad mini2(ios 7) work well
home:http://code.google.com/p/iad-ane-for-flash-air-mobile-ios/

usage:

1.add iad1.0.ane to your actionscript mobile project or flex mobile project
2.add as3 code

a. show iad banner in flash air application
  1. if(IAd.getInstance().supportDevice){    //check is ane air available,this will been true on device                    
  2.         IAd.getInstance().showBanner(IAd.BANNER,IAdPosition.BOTTOM_CENTER);
  3.     }
复制代码


b. show iad interstitial Advertisement with native extensions for air iad is this same easy
  1. if(IAd.getInstance().supportDevice&&IAd.getInstance().supportedInterstitial){//check ane support ,apple not provice Interstitial ad on iphone
  2.         IAd.getInstance().addEventListener(IAdEvent.onInterstitialReceive,onAdReceived);
  3.         IAd.getInstance().cacheInterstitial();
  4.     }
  5.       protected function onAdReceived(event:IAdEvent):void
  6.     {//when ad received success, show it
  7.         if(event.type==IAdEvent.onInterstitialReceive){
  8.             IAd.getInstance().showInterstitial();
  9.         }
  10.     }
复制代码
you may like

https://github.com/lilili87222/as3-air-ad-network-framework

if user like this lib,you can download and review our game
https://itunes.apple.com/us/artist/phonegame/id553087275?mt=8
donate and download more ane
http://www.cuo.so/ane-list/index.html





[attach]1000[/attach]



相关链接:


https://github.com/lilili87222/iad-ane-ios-air



作者: 破晓    时间: 2015-4-3 16:12
相关下载:

https://github.com/mg123123/iad-ane-for-flash-air-mobile-ios




欢迎光临 守望者--AIR技术交流 (http://www.airmyth.com/)