This code example represents the second part of the Ad API Hello World example found on the Developer Center. This simple example changes the text displayed in the ad’s header based on which tab is in focus. To see it in action, do the following:
- Log into your Flite Console and create a new ad. The Make an Ad page opens, prompting you to select a template.
- Select the desired template and initialize the ad:
- Click Socializer.
- Leave the dimensions as they are and click Make Ad to create a new 300×250 ad in Ad Studio.
- Add a YouTube tab:
- Click the YouTube icon under Add New Content. A new setting block appears.
- Add the SWF file to the header:
- In Ad Studio, click the Theme button to switch to the Theme Editor.
- Expand the Color setting block and change the Background to white (ffffff).
- Expand the Image setting block in the Header tab at the bottom.
- Click the Choose button and upload the HelloWorld-Part2.swf file found in this folder using the Upload As Is option.
You are done! The preview panel will display the default Socializer ad, and the text in the header will say “Tweet tweet!” because the ad is on the Twitter tab. Switch to the YouTube tab to change the header text to “Watch me!” Finally, switch to the Feed tab to change the header text to “Chicken feed”.
Download the FLA and AS files and open them in Adobe Flash if you want to make changes to this example.