ページへ戻る

− Links

 印刷 

AndroidでのAdmobのANEの作成_ANEを実際に使う の変更点 :: NJF Wiki

xpwiki:AndroidでのAdmobのANEの作成_ANEを実際に使う の変更点

« Prev[3]  
2: 2016-07-21 (木) 17:18:29 njf[4] ソース[5] バックアップ No.2 を復元して編集[6] 現: 2016-08-15 (月) 15:35:23 njf[4] ソース[7] 編集[8]
Line 2: Line 2:
ここでは「[[AndroidでのAdmobのANEの作成_ANEの作成]]」で作成したANEファイルを実際に使う方法を解説します。 ここでは「[[AndroidでのAdmobのANEの作成_ANEの作成]]」で作成したANEファイルを実際に使う方法を解説します。
-flaファイルを作成し、ANEを取り込むところまでは「[[AndroidでのANEの作成4_Flashでの実際の使い方]]」と同じなので、こちらを参照してください。+flaファイルを作成し、ANEを取り込むところまでは「[[AndroidでのANEの作成/Flashでの実際の使い方]]」と同じなので、こちらを参照してください。
*app.xmlの編集 [#yf59b493] *app.xmlの編集 [#yf59b493]
Line 45: Line 45:
 import jp.njf.admob.ANEAdmob;  import jp.njf.admob.ANEAdmob;
 import flash.profiler.showRedrawRegions;  import flash.profiler.showRedrawRegions;
 + 
 var aneAdmob:ANEAdmob = new ANEAdmob();  var aneAdmob:ANEAdmob = new ANEAdmob();
 + 
 aneAdmob.setAppID("YOUR_APP_ID");  aneAdmob.setAppID("YOUR_APP_ID");
 aneAdmob.setBannerID("YOUR_BANNER_ID");  aneAdmob.setBannerID("YOUR_BANNER_ID");
 + 
 aneAdmob.setInterstitialID("YOUR_INTERSTITIAL_ID")  aneAdmob.setInterstitialID("YOUR_INTERSTITIAL_ID")
- +  
 + 
 showAdBtn.addEventListener(MouseEvent.MOUSE_DOWN,function(e:MouseEvent):void{  showAdBtn.addEventListener(MouseEvent.MOUSE_DOWN,function(e:MouseEvent):void{
    aneAdmob.showBanner();     aneAdmob.showBanner();
 });  });
 + 
 hideAdBtn.addEventListener(MouseEvent.MOUSE_DOWN,function(e:MouseEvent):void{  hideAdBtn.addEventListener(MouseEvent.MOUSE_DOWN,function(e:MouseEvent):void{
    aneAdmob.hideBanner();     aneAdmob.hideBanner();
 });  });
 + 
 loadInterstitialBtn.addEventListener(MouseEvent.MOUSE_DOWN,function(e:MouseEvent):void{  loadInterstitialBtn.addEventListener(MouseEvent.MOUSE_DOWN,function(e:MouseEvent):void{
    aneAdmob.loadInterstitial();     aneAdmob.loadInterstitial();
 });  });
 + 
 showInterBtn.addEventListener(MouseEvent.MOUSE_DOWN,function(e:MouseEvent):void{  showInterBtn.addEventListener(MouseEvent.MOUSE_DOWN,function(e:MouseEvent):void{
    aneAdmob.showInterstitial();     aneAdmob.showInterstitial();
« Prev[3]