Custom Components


One of the most exciting aspects of components in Flash 8 is being able to make your own creations for distribution or reuse. Custom components usually require a significant amount of ActionScript or at least a solid understanding of the language in order to modify an established component. If you learn how to make your own components to suit common requirements, you will inevitably save a lot of valuable development time. Components were created to be easily reused among projects, and they also allow for simple modifications without having to alter the ActionScript code in the component. Given the robust nature of components, you should be able to develop complex applications, detailed right down to custom icons for the library. While we will not go into detail on how to create custom components in this chapter due to their complexity, we do explore more custom component creation in Chapter 35, "Building an Image Gallery Component."

Tip 

As you learned earlier in this chapter, components can be compiled clips. Flash 8 enables you to compile your own custom components so that you can distribute the components without giving away your source code.

Live Preview

If you are creating custom components, a Live Preview can be extremely useful. This feature enables you to create an updated view of your component in the authoring environment, so you do not have to publish your movie to view the current state of your component. Creating a Live Preview requires a number of steps to set up your movie structure properly and also to activate ActionScript. It is definitely worth it if you are spending a lot of time creating your own components.

Tip 

If you create a component, a live preview layer is automatically generated for your component. Usually, anything within the component that uses a getter/setter property is automatically included in the automatic live preview in the compiled clip.

Exchanging and Acquiring Components

After you have made your own components, you may be interested in distributing them. Or you may also be looking for a place to find new prebuilt elements for your Web site. Luckily, there are many extensive resources online where you can find components for download or for submission. A good place to start searching is at Macromedia:

  • www.macromedia.com/exchange/flash

To install components, you need to download the free Extension Manager 1.7 (or higher), which is the first version to be compatible with Flash 8. There is also a specific method for making your components ready for exchange. You need to package it into a .mxi file, which this Manager can read. The file tells the Manager information regarding the file and the creator. Information about making your components ready for the Extension Manager is available from the same section of the Web site, which includes help and FAQ links.

Web Resource 

We'd like to know what you think about this chapter. Visit www.flashsupport.com/feedback to send us your comments.




Macromedia Flash 8 Bible
Macromedia Flash8 Bible
ISBN: 0471746762
EAN: 2147483647
Year: 2006
Pages: 395

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net