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

Using Components

There are times when you’ll create an interface element, like a scroll bar or a check box, which you’ll want to use in multiple projects, but in slightly varying ways. For one movie, you may want your scroll bar to move text vertically, but for another movie, you may want it to move text horizontally. Or you may want to hand off your scroll bar to a designer or animator for their own use, but you want to provide them with easy guide-lines so they can customize the scroll bar without recoding any of your ActionScript. How do you develop this modular piece of interactivity that can be easily customized, even by non-ActionScript coders? The solution is to use components. Components are specialized movie clips that have been programmed by one developer to be used by other developers who can easily modify some of the movie clip’s functionality. Components are sometimes described as “parameterized” movie clips because you pass parameters to customize the way they look and do their job.

If this sounds very general, it’s because components are meant to tackle any sort of task— not just scroll bars, check boxes, and other user-interface elements, but data handling, graphics behaviors, sound manipulation, and many other kinds of interactivity as well. Components are like templates. They provide the general functionality as well as the parameters to help you make them fit your particular needs.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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