Developer Network Home  Help 

YDN Flash Developer Center Badge Kit Deployment
Flash Developer Center

ASTRA Badge Kit

The Badge Kit is an an XML-based framework for rapid development of small interactive Flash applications. You can learn how to use the Badge Kit very quickly, and most of the usage scenarios require no knowledge of Flash.


Deploying Components

To actually use classes such as UI components or or services in a Badge, you'll need to compile the code into a swf and load that at runtime. You've got a few options as a Flash developer to compile your swf.

Using Flash

Generally, the easiest way is using the Flash authoring environment to compile code into a swf. We use this approach in the default set of components for the Badge Kit. You might have noticed the import of swf called base_components.swf in the examples. Using a resources tag, most badges will import this swf so that they can use basic UI components and services, such as buttons and lists.

You can edit this swf by opening the source for it at source/base_components.fla. There you'll notice in the library of this FLA file is a number of basic UI components, which you can add to or remove as you see fit. To add your classes to this file, we recommend either adding components to your library or doing the following:

Note that you can also use a document class instead of putting code on the timeline. The same rules apply.

Using Flex

You can also compile a SWF using the Flex compiler. This should work very easily with general service classes and other utilities you might build. However, for compiling UI components that extend from the fl.core.UIComponent class (as any Badge Kit element should), it may be easier to use Flash to compile.

Once you publish (compile) your code into a SWF and this SWF is imported into your badge using the resources tag, you can use it in a badge.

We recommend the approach of opening up base_components.fla and recompiling it. That way, when you compile the resulting base_components.swf, you'll only need to import that one swf, which will save you a bit of bandwidth. However, you're welcome to compile into a separate SWF, which you might find useful for sharing components for use in the Badge Kit. You might find that you want to include all your UI components in one SWF, while services or other assets are in another. It's all up to you.

Using the Classes

Once you've compiled a swf, place it in the swf directory of your individual badge. Then you can import this swf using the resources tag.