Component Development Guide > Development Workflow
Build
The goal of this step is to build out the component’s base functionality. So if your component is meant to enable live chat with a customer support representative, make sure it does that; if it is meant to help people find the closest theater playing a movie, make sure it does so; etc. This is where you execute your plan for what functionality your component should include, and how it should look.
Note that we've separated building out the component's base functionality from parameterizing the component. You are welcome to do both simultaneously if you like, but we find it easiest to separate the steps this way. That said, make sure to keep the decisions you made regarding parameterization in the back of your mind as you build out the component, and make sure to write your code in a way that lends itself well to parameterizing the desired features.
The majority of this component-building process actually takes place outside of the Flite Platform, and in your favorite Flash IDE, such as Adobe Flash Professional.
You can start out building your component as you would any other Flash application – design the assets you want to use, lay them out on the stage, and write some ActionScript 3 code to tie them together. There are three distinct categories of APIs that you are likely to use during the course of building your component. We discuss each of these below.
Service APIs
A component will typically incorporate some specialized functionality that adds value to an ad. This may be a service developed by your organization or by another party. You will usually need to invoke that service’s API in order to access such functionality. For instance:
- The Sweepstakes Promotion Component allows you to add an ePrize digital sweepstakes to your ad. The ePrize API had to be invoked to build this component.
- The MovieConnect Component allows you to display the movie theaters closest to a user’s zip code directly within the ad. The Aura Group’s MovieConnect API was used to build this.
Third Party Utility APIs
You will often need to use some third-party libraries in developing the Flash component. The Third Party Libraries for AS3 Component Development document lists some libraries that we like to use internally when developing components and other Flash content. Most of these libraries are open source and free to use. We invite you to peruse this list, or use your favorite utility libraries.
Flite APIs
You will almost always want to use the Flite Ad API to track user events within your component. As users interact with your component, you will want to track those interactions (clickthroughs, form submissions, shares, etc.). You can do this with the Ad API. Please refer to the Flite Metrics portion of this Developer Center for everything you want to know about Flite Metrics, including code examples on how to log metrics in a component.
You may want to use some other functionality available with the Flite Ad API as well – parsing feeds, geolocation, managing browser cookies, and broadcasting messages are just some of the things you can do using the API.
See the Ad API 3 section of this Developer Center for more information on using the Flite Ad API, and check out the API Reference for detailed information about each API function and property.
Publishing to Component Studio
Once you are done building your component in Flash, publish it to a SWF file. Next, you will need to import it into Flite’s Component Studio. You can do this as follows:
- Log into your Flite account.
- In the Flite Console, expand the Make New Item dropdown menu in the top left, and select Component. The Make a Component page appears.
- Click the Upload button next to the Flash SWF field, and upload the SWF file you created into Component Studio.
- In the Component Name field, enter a name for your new component.
- Click Continue. Flite’s Component Studio opens, with your SWF file loaded into it.
Replacing your SWF file
As you build your component, you will likely have to change and reload your SWF file multiple times until you iron out all the bugs and get everything right. You don't need to create a new component every time you do this. Instead, you can replace your component’s SWF file directly within Component Studio as follows.
- Open your component in Component Studio. The component will open in the Edit Module.
- Click the Upload button at the bottom of your Component Studio workspace. A file upload dialog box appears.
- Select the SWF file you want to upload and click Open to upload it. The dialog box disappears, and the component preview changes in accordance with the new SWF file.
Do this each time you update your SWF file.
