This article presents a player plug-in you can use to control the logic for mid-roll ads. If you're looking to get ad logic to match that of something like Hulu, you can include this plug-in with your player. If you're unfamiliar with this type of ad logic, I first want to point out that it's best used for long form content since you're inserting mid-roll ads. Since mid-roll ads can be an invasive experience, you'll want to make sure that your material is compelling enough that your viewers will stick around. This example demonstrates the ad behavior, but it is a great example of what not to do (short video with many mid-roll ads).
All of that said, here's how it works: when a viewer skips past an ad break, if they haven't already seen an ad for that break, the player makes an ad request. If the viewer has already seen the ad break (whether by skipping past it and watching an ad or by letting it play naturally), the player continues playing and doesn't make the ad request.
The plug-in is non-rendering, meaning it simply handles the logic for this kind of ad request behavior. This SWF does not deal with the display of any ad markers on the timeline. You can download the compiled SWF to use the plug-in as-is. Just add it to your player, using the Edit Settings: Plug-ins tab in the Brightcove Studio Publishing module. Or, if you want to modify the code (or just look at for learning purposes), you can download the ActionScript source code. If you're the adventurous type and you download the code, you'll find that you can import it into FlexBuilder as an existing project. A walk-through of the flow of logic is outlined in comments in the constructor. Any bugs or issues that you find with the plug-in should be reported to Brightcove Customer Support.