开发者

How to display AdMob ads in FlashBuilder 4.5.1 mobile project?

I am currently developing an application in the latest version of FlashBuilder and I cant seem to find out how I can incorporate AdMob ads or any other Ads into my application. Does anyone know how this can be done? There seen to be a few tutorials on开发者_如何学编程line focused on Flash however im not sure how to get those to work in the Flex environment. Thanks


Anything that works in AS3 will work in Flex (since Flex is built up on top of AS3) it's just going to be a matter of making sure you've included the appropriate swc dependencies in your project (or AS3 code if you're just copying it in). The only other thing to be aware of is that the Flex 3 framework requires that elements added to components are a UIComponent or sub-class thereof, since this object isn't present in the Flash player itself (it's part of the Flex framework code) you sometimes need to add the Sprite or MovieClip or whatever to a UIComponent then add that to your "page" or component. Please drop a URL to the code you're trying to integrate with and I'll edit this answer to include specifics.

Also to note I specified Flex 3 because in Flex 4 the requirement is that the component implements IVisualElement (and is added via addElement vs addChild).


Well, There are always the Adobe Docs that are a good reference (under "Displaying Ads"). They suggest using the StageWebView object viewport. But, Jespers tells you how to do the same thing, and mentions Rohde's wrapper class that makes the whole thing easier. Choose your favourite.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜