Tutorial 1-show banner ad at top of air applicationadmin To Published in 2015-07-09 flash air( Read:2534

Show Banner at top of flash air application 

package
{
import com.keymob.AdPositions;
import com.keymob.AdSizes;
import com.keymob.KeymobAd;

import flash.display.Sprite;

public class BannerDemo extends Sprite
{
public function BannerDemo()
{
super();
KeymobAd.getInstance().initFromKeymobService("1");
KeymobAd.getInstance().showRelationBanner(AdSizes.BANNER,AdPositions.TOP_CENTER,10);
}
}
}

1. add Import 

        import com.keymob.AdPositions;
	import com.keymob.AdSizes;
	import com.keymob.KeymobAd;
2. init Keymob ,we init Keymob from Keymob service,we got a appid "1" from www.keymob.com

KeymobAd.getInstance().initFromKeymobService("1");

3. show banner ,we show a stand banner size AdSizes.BANNER,and show it ad relation position AdPositions.TOP_CENTER,there are many ad size such as AdSizes.FULL_BANNER,AdSizes.SMART_BANNER and many Ad position values such as AdPositions.TOP_LEFT,AdPositions.MIDDLE_CENTER,AdPositions.BOTTOM_RIGHT and so on.

KeymobAd.getInstance().showRelationBanner(AdSizes.BANNER,AdPositions.TOP_CENTER,10);

4. sample code with flash cc 


import com.keymob.AdPositions;
import com.keymob.AdSizes;
import com.keymob.KeymobAd;
KeymobAd.getInstance().initFromKeymobService("1");
KeymobAd.getInstance().showRelationBanner(AdSizes.BANNER,AdPositions.TOP_CENTER,10);



0 Reviews,0 Participation.

Previous Next 0

Latest comments

No comment Oh!