Chapter 2: Creating Custom Classes With Actionscript; Principles Of Object-Oriented Programming - MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Creating Custom Classes with ActionScript 2.0
ActionScript 2.0 provides several powerful programming features found in other programming
languages, such as Java. ActionScript 2.0 encourages program structures that are reusable,
scalable, robust, and maintainable. It also decreases development time by providing users
thorough coding assistance and debugging information. ActionScript 2.0 conforms more closely
to the ECMA-262 Edition 3 standard (see
Ecma-262.htm).
The main features of ActionScript 2.0 include the following:
Familiar object-oriented programming (OOP) model
ActionScript 2.0 is a familiar model for creating object-oriented programs. ActionScript 2.0
implements several object-oriented concepts and keywords such as class, interface, and packages
that will be familiar to you if you've programmed with Java.
Strict data typing
function parameters, and function return types. For example, the following code declares a
variable named
var userName:String = "";
Compiler warnings and errors
enable the compiler to provide warnings and error messages that help you find bugs in your
applications.

Principles of object-oriented programming

This section provides a brief introduction to principles involved in developing object-oriented
programs. These principles are described in more depth in the rest of this chapter, along with
details on how they are implemented in Macromedia Flex.
To learn about object-oriented programming principles, see the following topics:
"Objects" on page 46
"Classes and class members" on page 46
"Inheritance" on page 46
"Interfaces" on page 47
ActionScript 2.0 also lets you explicitly specify data types for variables,
of type String (a built-in ActionScript data type, or class).
userName
The previous two features (OOP model and strict data typing)
www.ecma-international.org/publications/standards/
The primary feature of
CHAPTER 2
45

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents