dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


advertisement
 

Master the Time-saving Power of Flash Components, Part 2

In part 1 of this series, you learned to build components that worked with multiple versions of Flash. In this follow-up you'll learn all the little extras that allow you to customize, extend, and distribute your components, for maximum ease and peace of mind.


advertisement

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


n Flash, components have the power to save you a great deal of time and frustration. These pluggable, self-contained units—consisting of handy combinations of graphics and/or code—are just dropped into place as needed to fulfill a role in your application. You can use them over and over.

While pre-built components are often just what you need, knowing how to build your own, custom components is a skill that no one should eschew. This two-part article series is designed to show you everything you need to know to build custom components that can work in multiple versions of the Flash player.

In part 1, I covered the basic heavy-lifting of creating the component. In this follow-up, I'll show you how to really extend the usefulness of that component to get the biggest bang for the buck.

In part 1, I started with a hard-coded MovieClip. From there, the clip was converted to accept a user-defined parameter, allowing the user to modify the values of the component remotely. I then added a Live Preview file for immediate visual feedback during adjustments, a plain text description about the functionality of the component, and a custom icon.

In this article, I will:
  • Add a custom user interface for the component to the Properties pane
  • Enhance the component with a custom class when it is initialized
  • Make the code friendlier, and better insulated, by defining best-practices "getter" and "setter" wrappers
  • Use XML to enhance the Reference panel description, and add the custom actions to the Action panel
  • Package the component for distribution with the Extension Manager.
Author's Note: The material from which this article was derived will be presented in a session called "Authoring Components" at the FlashForward 2005 conference in San Francisco, April 6-8.

To download the souce code for this article:

The first article covers steps 1 through 5, sequentially. Picking up where we left off, then is ...



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date