sfmultimedia.net

sfmultimedia :: actionscript salons :: using and building as1 components

/

Actionscript Salon #10: Using and Building Components (AS1)

This month, special guest speaker MD DUNDON , author of Macromedia Flash MX Production Techniques, will tag-team with AS Salon regular Marc Tanenbaum to cover the use and creation of components. Marc will explain what components are, why they're useful, and how you can deploy them to speed up development of your .fla.

MD will pick it up from there, delving into the nitty-gritty of constructing your own components, including basic development practices and common pitfalls. By the time you leave, you'll have a solid grasp of how you can utilize someone else's component or author your own.

We'll be sticking to Actionscript 1 components this time around.

Relevance/availability: this presentation was developed to discuss components in Flash MX (Player 6). Many of the techniques are out of date.

Marc's Notes (Using Flash MX UI Components)

Presentation slides (swf)

CheckBox. Introduction to the checkbox, the changeHandler and Actionscript-controlled skinning.

Download the .fla file (Zip 49k)

RadioButton. Two groups of RadioButtons.

Download the .fla file (Zip 54k)

PushButton. A very simple example of a very simple component.

Download the .fla file (Zip 47k)

ComboBox and ListBox . These two components operate in very much the same way.

Download the .fla file (Zip 150k)

ScrollBar. Like ScrollBars everywhere. This one controls a text field.

Download the .fla file (Zip 55k)

ScrollBar 2. Another ScrollBar example, this one controls a dynamically created MovieClip. (This example is from the Macromedia documentation).

Download the .fla file (Zip 58k)

ScrollPane. The ScrollPane give us a window in which to view a MovieClip. This example shows the ScrollPane populated by a symbol from the library (linked) and from an external source.

Download the .zip file (Zip 419k)

 

MD's Notes (Building Production Components)

Notes (html)

Component Scroll. This useful and flexible component loads text from an external file, adding a scrollbar only if the article length dictates. Follow the creation method described in MD's notes to see how it's done (and why it's important to improve your workflow!).

Download the .zip file (Zip 102k)

Component Menu. A standard menu system that every developer uses, made easy by conversion to a component. This system is built using functions, then "re-mastered" using OOP practices.

Component Menu 2. A variation on the above, which improves functionality by making each menu aware of the others.

Download all versions (Zip 34k)