• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

What Are Components?

Components have been in Flash since Flash 5, when they were called Smart Clips. They're little self-contained movie clips, with frames, graphics, and scripting, all in a neat little package. In fact, in MX2004, components are compiled, which means that you can't take them apart to see how they tick (you could do this in Flash MX and see all the internal ActionScript, which is hidden by the compiling).

Drag a component to the Stage, and you can interact with it like any other movie clip. You can move it around, hide it, control it with ActionScript, and so on. Most components have their own little behaviors programmed in as well. For example, the ComboBox component (which looks like the HTML <select> form element) displays its menu items when you click on it. You don't have to code this item-showing behavior—it's already in the component. It just works. Components can be, well, anything a movie clip can be. You can get pretty sophistimacated. The only way to really understand them is to start using them, so let's do that.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint