Monday, August 11, 2008

Flash Component Topics - Accessibility and components

A growing requirement for web content is that it should be accessible; that is, usable for people with a variety of disabilities. Visual content in Flash applications can be made accessible to the visually impaired with the use of screen reader software, which provides a spoken audio description of the contents of the screen.

When a component is created, the author can write ActionScript that enables communication between the component and a screen reader. When a developer uses that component to build an application in Flash, the developer uses the Accessibility panel to configure each component instance.

Most components built by Macromedia are designed for accessibility. To find out whether a component is accessible, see its entry in the Components Language Reference. When you’re building an application in Flash, you’ll need to add one line of code for each component (mx.accessibility.ComponentNameAccImpl.enableAccessibility();), and set the accessibility parameters in the Accessibility panel. Accessibility for components works the same way as it works for all Flash movie clips.

Most components built by Macromedia are also navigable by the keyboard. Each component’s entry in the Components Language Reference indicates whether you can control the component with the keyboard.

Flash Component Topics - Benefits of using components

Components enable you to separate the process of designing your application from the process of coding. They also let you to reuse code, either in components that you create, or by downloading and installing components created by other developers.

Components allow coders to create functionality that designers can use in applications. Developers can encapsulate frequently used functionality into components and designers can customize the look and behavior of components by changing parameters in the Property inspector or the Component inspector.

Flash developers can use the Macromedia Exchange at www.macromedia.com/go/exchange to exchange components. By using components, you no longer need to build each element in a complex web application from scratch. You can find the components you need and put them together in a Flash document to create a new application.

Components that are based on the version 2 architecture share core functionality such as styles, event handling, skinning, focus management, and depth management. When you add the first version 2 component to an application, there is approximately 25K added to the document that provides this core functionality. When you add additional components, that same 25K is reused for them as well, resulting in a smaller increase in size to your document than you may expect.

Flash Component Topics - Installing components

A set of Macromedia components is already installed when you start Flash for the first time. You can view them in the Components panel. To view the Flash Basic 8 or Flash Professional 8 components:
  1. Start Flash.
  2. Select Window > Components to open the Components panel if it isn’t already open.
  3. Select User Interface to expand the tree and view the installed components.
You can also download components from the Macromedia Exchange at www.macromedia.com/exchange. To install components downloaded from the Exchange, download and install the Macromedia Extension Manager at www.macromedia.com/ exchange/em_download/
Any component can appear in the Components panel in Flash. Follow these steps to install components on either a Windows or Macintosh computer.

To install components on a Windows-based or a Macintosh computer:
  1. Quit Flash.
  2. Place the SWC or FLA file containing the component in the following folder on your hard disk:
  • In Windows: C:\Program Files\Macromedia\Flash 8\language\Configuration\Components
  • On the Macintosh: Macintosh HD/Applications/Macromedia Flash 8/Configuration/Components (Macintosh)
  1. Start Flash.
  2. Select Window > Components to view the component in the Components panel if it isn’t already open.

Components are installed in the following locations:
  • Windows 2000 or Windows XP: C:\Program Files\Macromedia\ Flash 8\language\Configuration\Components
  • Mac OS X: Macintosh HD/Applications/Macromedia Flash 8/Configuration/ Components