11.1 Principles Behind UI Components

UI components are essentially movie clips that have three added features:

  • A Property inspector, in which you can set properties at authoring time.

  • A live preview that shows a display of what the component might look like.

  • The ability to be loaded in once, at the time the movie loads. If you have one instance of a component or a hundred instances, the overhead is the same.

A properly built component is created as a class, with all methods declared on the prototype. This insures that the component code exists in only one place?in the prototype?and not in each individual instance of a component. This is unlike Flash 5 SmartClips, in which each instance had its own copies of methods.

UI components also offer the ability to create rich interfaces and give Flash developers the ability to put together these interfaces with the same ease that Visual Basic (VB) developers can create interfaces.

Flash Pro includes a new screens-based metaphor intended to appeal to VB developers, but here were cover using UI components with Flash's traditional timeline-based metaphor supported in Flash MX and Flash 2004.

UI components, however, are easily modified using simple ActionScript. The next section shows several enhancements you can make to components to make your Flash Remoting application development easier.



    Part III: Advanced Flash Remoting
     
    ASPTreeView.com
     
    Evaluation has јЩєГБexpired.
    Info...