Chapter 3: Using Actionscript To Create Components - Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual

Creating and extending flex 2 components
Hide thumbs Also See for FLEX 2 - CREATING AND EXTENDING COMPONENTS:
Table of Contents

Advertisement

CHAPTER 3
Using ActionScript to Create
Components
You use ActionScript code to create ActionScript components for Adobe Flex, or to add logic
to MXML components. ActionScript provides flow control and object manipulation features
that are not available in MXML.
This topic contains a summary of the general rules for using ActionScript code in custom
components. This topic does not replace the information contained in the ActionScript
reference documentation. For additional information on ActionScript, see the following
resources:
Adobe Flex 2 Language Reference: Contains the API reference for ActionScript 3.0.
Programming ActionScript 3.0: Contains information on using ActionScript 3.0.
Contents
Using ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Using ActionScript
Before you start developing custom components, you should be familiar with basic
ActionScript coding practices.
Using the package statement
You must define your ActionScript custom components within a package. The package
reflects the directory location of your component within the directory structure of your
application. To define the package structure, you include the
definition, as the following example shows:
package myComponents
{
// Class definition goes here.
}
statement in your class
package
3
25

Advertisement

Table of Contents
loading

Table of Contents