R Blank


19 February 2008


Prerequisite knowledge

Some knowledge of Flex.

Required products
Flex Builder 3 (Download trial)
Download the complete chapter
Chapter 11: Advertising and Flex (928 KB)

User level


Note: This article was created based on the Flex 3 beta releases. Minor changes in the description and code may be necessary before it can be applied to Flex 3.
Note: OpenAds was completely redone with the latest release. As a result, the author is in the process of updating the chapter.
Advertising is a vital aspect of many Internet-based projects, and the RMX is no different.
This chapter discusses some of the options available for banner and instream (or video) advertising, explaines the problems with using most mainstream solutions inside of Flash-based applications, and shows how we solved these issues for our project—utilizing open source technologies. First I'll show you how to set up OpenAds so that you have an ad management and delivery system in place, and then I'll demonstrate how to get into Flex to consume those ads.
In particular, this chapter covers the following topics:
  • Why advertising matters
  • Setting up OpenAds
  • Consuming OpenAds in Flex
  • Really, how powerful is this solution?

To open source or not to open source?

As with most any similar decision, the verdict comes down to this: do you have money to spend, and are the open source alternatives usable? In the case of advertising on the RMX, the answers were "Not really, no" and "Yes." The paid ad management systems like Accipiter, 24/7, and DoubleClick (now owned by Google) provide tremendous functionality and performance. At the same time, they can cost a lot of money, anywhere from $1,000 – 10,000 a month and much more depending on your traffic.
So, for this reason, we chose one of the preeminent open source advertising campaign managers, OpenAds. OpenAds (formerly known as phpAdsNew) is a pretty powerful and functional open source ad management system, well supported by its community with frequent updates.
I'll get into how we actually work with OpenAds in one moment. But first, I want to touch on a couple of additional aspects of online advertising that are very relevant for Flex and Flash developers to understand and consider when planning applications.