Thursday, August 21, 2008
Tuesday, August 12, 2008
Using Flash Component - Working with Components
The files used in this session are TipCalulator.fla and TipCalculator.swf. The files are installed in the following locations on your hard disk:
- (Windows) Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Components\TipCalculator
- (Macintosh) Applications/Macromedia Flash 8/Samples and Tutorials/Samples/ Components/TipCalculator
All components in the user-level configuration/Components directory are displayed in the Components panel.
To display the Components panel:
Select Window > Components.
To display components that were installed after Flash starts:
- Select Window > Components.
- Select Reload from the Components panel pop-up menu.
Monday, August 11, 2008
Flash Component Topics - Accessibility and components
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 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
- Start Flash.
- Select Window > Components to open the Components panel if it isn’t already open.
- Select User Interface to expand the tree and view the installed components.
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:
- Quit Flash.
- 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)
- Start Flash.
- 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
Saturday, August 9, 2008
Flash Component Topics - About Components
Macromedia Flash components are movie clips with parameters that allow you to modify their appearance and behavior. A component can be a simple user interface control, such as a radio button or a check box, or it can contain content, such as a scroll pane; a component can also be non-visual, like the focus manager that allows you to control which object receives focus in an application.
Components enable you to build complex Macromedia Flash applications, even if you don’t have an advanced understanding of ActionScript. Rather than creating custom buttons, combo boxes, and lists, you can drag these components from the Components panel to add functionality to your applications. You can also easily customize the look and feel of components to suit your design needs.
Components are built on version 2 of the Macromedia Component Architecture, which allows you to build robust applications, easily and quickly, with a consistent appearance and behavior.
Each component has predefined parameters that you can set while authoring in Flash. Each component also has a unique set of ActionScript methods, properties, and events, also called an API (application programming interface), that allows you to set parameters and additional options at runtime.