将Mobclix添加到Cocos2d场景

时间:2012-06-07 01:49:23

标签: iphone cocos2d-iphone

有没有人将mobclix整合到cocos2d应用程序中?我试图通过使用Mobclix添加Ad的横幅,但它没有出现,我的代码:

//In appDelegate:
[Mobclix startWithApplicationId:@"4778FFA3-DDFF-4550-BFFE-7B7AB4B5765D"];
[Mobclix start]; 

//In my Scene
-(void)onEnter {

    adView = [MobclixAdViewiPhone_320x50 new];
    adView.delegate = self; //Optional

    // set position
   adView.frame = CGRectMake(10, 20, 320, 50);
   dView.refreshTime = 15;

    // add to view
   [[[CCDirector sharedDirector] openGLView] addSubview:adView];

   // set refresh (automatically gets one ad when changing the property)
   [adView getAd];

   [super onEnter];

有人帮我在场景中展示Adbanner吗?

0 个答案:

没有答案