ActionScript with the SpotX Ad Player Integration
Overview: If you already have an FLV player that you use to play video content on your site, and strong ActionScript development skills, you can use this method to call SpotXchange for pre-, mid- or post-roll InStream ads as well as for Overlay ads.
Technology: This integration option can be thought of as a SWF within a SWF, in which the SWF you use to display your video content interfaces with the SpotX Ad Player SWF. The SpotX Ad Player SWF makes the parameterized calls to the SpotXchange ad servers, parses the ad data returned, and displays the video commercials.
This integration option involves taking our integration kit and modifying it to work with your FLV player. The type of ads requested (Overlay and/or InStream), their display order (pre-, mid- or post-roll) and frequency depend on the integration code you create. This is the most flexible and sophisticated integration we offer and it supports querying multiple ad syndication partners.
Download the integration kit: UsingAdPlayer.zip
Note on testing: When developing and testing in the Adobe Flash Authoring tool or testing a SWF from the filesystem the integration will generate "*** Security Sandbox Violation ***"warnings. This is because the integration loads the ad player SWF from our servers and loading a SWF from the network and filesystem together is not allowed by Flash.
Description: In the example below, a pre-roll video ad plays before a piece of video content and a matching 300x250 Companion Banner is placed adjacent to the video player. Clicking either the video ad or the companion banner opens a new tab in your browser and directs you to the advertiser's landing page.
When the pre-roll has completed, the video content begins playing. Three seconds into play, an Overlay Invitation appears atop the video content. Clicking it pauses the content and plays the corresponding video advertisement. When the video ad has completed playing, the content is un-paused and continues playing to its conclusion.
When the content has reached its conclusion, a post-roll ad and its companion banner are displayed.
Refreshing your browser plays the next available ad, until all available ads have been shown. When all available ads have been shown, ads will not be available to you until after 20 minutes have expired (or until you clear your cookies), at which point the sequence will begin anew starting with the first available ad.
You can watch the headers when this example page loads to see the series of events. First, the SWF used to play the video content (SimplePlayer_AS2.swf) loads, followed by the SpotX Ad Player (/ad_player/[RELEASE DATE].swf). The Ad Player then places the parameterized ad call to http://search.spotxchange.com. The Ad Player plays a video ad as a pre-roll, firing each tracking beacon in succession.
When the pre-roll completes, the Ad Player dissolves, revealing the SimplePlayer_AS2.swf, which begins playing the video content (Pepper the Dog).
The Ad Player makes another ad request, this time for the Overlay ad unit. At the appropriate point in the Pepper the Dog video, the Ad Player displays the invitation banner. The Ad Player communicates back and forth with the PubPlayer, letting it know that a click has occurred and the content should be paused, as well as when to restart the content.
Troubleshooting: If you don't see any ads, even after you've cleared your cookies, your browser may not be sending a valid US IP address. If you are not in the US or if you are behind a firewall, please contact your SpotXchange account representative for assistance in viewing this example.
Alternative Integration Options: SpotXchange offers a number of flexible ways to query our network for video ads. If this particular method does not meet your needs, please review the integration options page for alternative methods.


