Conduit API
Case Study
Mini-Games -> Conduit API
 
Now that we have covered the Flash part, it’s time to learn about some extra goodies included in the conduit engine JavaScript API. If you check out the source of “index.html”, you’ll notice a link to “BrowserCompApi.js” that’s hosted on api.conduit.com. This script file makes all features of the API available to use in our component. After we’ve included this script in our page we can call any of the API functions, and add callbacks to API events.

Although we will not cover the entire API list of features in this tutorial, there are some pretty nice features there worth mentioning. To learn more about the API, go to:

http://www.conduit.com/Developers/overview.aspx
 
By calling the ChangeWidth / ChangeHeight / GetCurrentWidth methods you can get and set the displayed area of the component on the toolbar. Changing the width affects the position of other components appearing next to our component.
 
These methods let us store and retrieve persistent data on the user’s computer, as a pair of key and value.
 
You can the EBSearchTermChanged method to your component and it will be called by the engine every time the user changes the search term in the toolbar search box.

Visit Conduit’s Developer Center for full documentation and examples of these methods.

While all these features are available as JavaScript, you can call them from flash, or have them call methods in flash, using ActionScript’s ExternalInterface API. For more information on that topic you can visit this API’s official documentation.