0% found this document useful (0 votes)
272 views

Components in Action Script 2.0 UNIT 3

Components are prebuilt Flash elements that can be reused to build applications. They include user interface elements, media players, and data connectors. Components save work by providing functionality that would otherwise need to be coded. Components have parameters that can be set during authoring and have ActionScript methods to customize behavior at runtime. They are designed to allow reuse and sharing of code while allowing non-coders to customize without programming.

Uploaded by

k.nagendra
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
272 views

Components in Action Script 2.0 UNIT 3

Components are prebuilt Flash elements that can be reused to build applications. They include user interface elements, media players, and data connectors. Components save work by providing functionality that would otherwise need to be coded. Components have parameters that can be set during authoring and have ActionScript methods to customize behavior at runtime. They are designed to allow reuse and sharing of code while allowing non-coders to customize without programming.

Uploaded by

k.nagendra
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Components in action script 2.

0 :
Components are the building blocks for the rich Internet applications that provide these
experiences. A component is a movie clip with parameters that are set during authoring in
Flash, and with ActionScript methods, properties, and events that allow you to customize
the component at runtime. Components are designed to allow developers to reuse and
share code, and to encapsulate complex functionality that designers can use and customize
without using ActionScript.

Creating an Application with Components

Components are prebuilt Flash elements that you can use when creating Flash applications.
Components include user interface controls, data access and connectivity mechanisms, and
media-related elements. Components save you work when building a Flash application by
providing you with elements and behavior that you would need to create from scratch
otherwise.

Adding components during authoring:

You can add a component to a document by using the Components panel, and then add
additional instances of the component to the document by dragging the component from the
Library panel to the Stage. You can set properties for additional instances in the Parameters
tab of the Property inspector or in the Parameters tab in the Component inspector.

To add a component to a Flash document by using the Components panel:

Set your publish settings to publish for ActionScript 2.0.


1. (Select File > Publish Settings > Flash tab and select ActionScript 2.0 in the
ActionScript dropdown menu.)
2. Select Window > Components.
Do one of the following:
Drag a component from the Components panel to the Stage.
Double-click a component in the Components panel.
If the component is a FLA file (all installed version 2 components are SWC files) and
if you have edited skins for another instance of the same component, or for a
component that shares skins with the component you are adding, do one of the
following:
Select Don't Replace Existing Items to preserve the edited skins and apply the edited
skins to the new component.
Select Replace Existing Items to replace all the skins with default skins. The new
component and all previous versions of the component, or of components that share
its skins, will use the default skins.
Select the component on the Stage.
Select Window > Properties > Properties.
In the Property inspector, enter an instance name for the component instance.
Click the Parameters tab and specify parameters for the instance.
The following illustration shows the Property inspector for the TextInput component that is
in the TipCalculator.fla sample file.

Change the size of the component as desired by editing the values for the width and height.
For more information on sizing specific component types.
If you want to change the color and text formatting of a component, do one or more of
the following:
Set or change a specific style property value for a component instance by using
thesetStyle() method, which is available to all components.
Edit multiple properties in the global style declaration assigned to all version 2 components.
Create a custom style declaration for specific component instances.
If you want to customize the appearance of the component, do one of the following:
Apply a theme,Edit a component's skins

Component categories

Components included with Flash fall into the following five categories (the locations of their
ActionScript source files roughly correspond to these categories as well and are listed in
parentheses):

Data components (mx.data.*)


Data components that allow you to load and manipulate information from data sources;
the WebServiceConnector and XMLConnector components are data components.The
source files for the data components aren't installed with Flash. However, some of the
supporting ActionScript files are installed.
FLVPlayback component (mx.video.FLVPlayback)
The FLVPlayback component lets you readily include a video player in your Flash
application to play progressive streaming video over HTTP, from a Flash Video Streaming
Service (FVSS), or from Flash Media Server.
Media components (mx.controls.*)
Media components let you play back and control streaming media; MediaController,
MediaPlayback, and MediaDisplay are media components.
User interface components (mx.controls.*)
User interface components (often referred to as "UI Components") allow you to interact
with an application; for example, the RadioButton, CheckBox, and TextInput
components are user interface controls.
Managers (mx.managers.*)
Managers are non-visual components that allow you to manage a feature, such as focus
or depth, in an application; the FocusManager, DepthManager, PopUpManager,
StyleManager, and SystemManager components are manager components.
Screens (mx.screens.*)
The screens category includes the ActionScript classes that allow you to control forms
and slides in Flash.

component features in action script 2.0

This section outlines the features of version 2 components (compared to version 1


components) from the perspective of a developer using components to build Flash
applications.
The Component inspector allows you to change component parameters while authoring in
Adobe Flash and Dreamweaver.
The listener event model allows listeners to handle events. Flash doesn't have
a clickHandler parameter in the Property inspector; you must write ActionScript code
to handle events.
Skin properties let you load individual skins (for example, up and down arrows or the
check for a check box) at runtime.
CSS-based styles allow you to create a consistent look and feel across applications.
Themes allow you to drag a predesigned appearance from the library onto a set of
components.
The Halo theme is the default theme that the version 2 components use.
Manager classes provide an easy way to handle focus and depth in a application.
The base classes UIObject and UIComponent provide core methods, properties, and events to
components that extend them.
Packaging as a SWC file allows easy distribution and concealable code.
Built-in data binding is available through the Component inspector
An easily extendable class hierarchy using ActionScript 2.0 allows you to create unique
namespaces, import classes as needed, and subclass easily to extend components.

You might also like