
Essential ActionScript 2.0
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Intro
- Table of Contents
- Foreword
- Preface
- This Book Wants You
- What This Book Is Not
- Who Should (and Shouldn't) Read This Book
- ActionScript 2.0 Versus ActionScript 1.0
- Deciphering Flash Versions
- Example Files and Resources
- Typographical Conventions
- Using Code Examples
- We'd Like to Hear from You
- Acknowledgments
- Part I
- ActionScript 2.0 Overview
- ActionScript 2.0 Features
- Features Introduced by Flash Player 7
- Flash MX 2004 Version 2 Components
- ActionScript 1.0 and 2.0 in Flash Player 6 and 7
- Setting a Movie's ActionScript Version and Player Version
- Changes to ActionScript 1.0 in Flash Player 7
- Flash 4 Slash Syntax Is Not Supported in ActionScript 2.0
- Let's Go OOP
- Object-Oriented ActionScript
- Procedural Programming and Object-Oriented Programming
- Key Object-Oriented Programming Concepts
- Class Syntax
- Object Creation
- Object Usage
- Encapsulation
- Datatypes
- Inheritance
- Packages
- Compilation
- Starting an Objected-Oriented Application
- But How Do I Apply OOP?
- On with the Show!
- Datatypes and Type Checking
- Why Static Typing?
- Type Syntax
- Declaring Variable and Property Datatypes
- Declaring Method Parameter and Return Value Datatypes
- Why Post-Colon Syntax?
- Compatible Types
- Handling Any Datatype
- Compatibility with null and undefined
- Built-in Dynamic Classes
- Circumventing Type Checking
- Creating Parameters That Accept Multiple Types
- Allowing Property and Method Creation on a Class's Instances
- Bypassing Type Checking on a Per-Use Basis
- Casting
- Casting Terminology
- Runtime Casting Support
- Casting Does Not Affect Method or Property Selection
- Casting Versus Conversion
- ActionScript 2.0's Lenient Compile-Time Casting
- Problems Casting to String, Number, Boolean, Date, and Array
- Datatype Information for Built-in Classes
- ActionScript 2.0 Type Checking Gotchas
- Global Variables Can't Be Typed
- Type Checking and Timeline Code
- Type Checking XML Instances
- No Type Checking with the [] Operator
- Array Elements and Type Checking
- Up Next: Creating Classes- Your Own Datatypes!
- Classes
- Defining Classes
- Class Attributes
- The dynamic attribute
- The intrinsic attribute
- Constructor Functions (Take 1)
- Properties
- Property Attributes
- Restricting property access with the private and public attributes
- Defining class properties with the static attribute
- Global variables versus class properties
- Subclasses and class properties
- Compile-Time Constant Expressions
- Enumerating Properties with for-in loops
- Methods
- Referring to the Current Object with the Keyword this
- Passing the current object to a method
- Managing parameter/property name conflicts
- Redundant use of the keyword this
- Method Attributes
- Controlling method access with the public and private attributes
- Defining class methods with the static attribute
- Accessor Methods
- Local Variables
- Nesting Functions in Methods
- Accessing the current object from a function nested in a method
- Getter and Setter Methods
- Simulating read-only properties
- Extra or Missing Arguments
- Constructor Functions (Take 2)
- Simulating Multiple Constructor Functions
- Using this in Constructor Functions
- Constructor Functions Versus Default Property Values
- Completing the Box Class
- Putting Theory into Practice
- Authoring an ActionScript 2.0 Class
- Class Authoring Quick Start
- Designing the ImageViewer Class
- From Functional Requirements to Code
- ImageViewer Implementation (Take 1)
- Using ImageViewer in a Movie
- Preloading the ImageViewer Class
- ImageViewer Implementation (Take 2)
- ImageViewer (Take 2), Design Summary
- ImageViewer Implementation (Take 2)
- Using ImageViewer (Take 2)
- ImageViewer Implementation (Take 3)
- Deleting a Class's Resources
- The Final ImageViewer Code
- Back to the Classroom
- Inheritance
- A Primer on Inheritance
- Class Method and Class Property Inheritance
- Subclasses as Subtypes
- An OOP Chat Example
- Overriding Methods and Properties
- Overriding Instance Methods
- Invoking an Overridden Instance Method
- Overriding Class Methods
- Overriding Properties
- The super keyword and overridden property access
- Member Access from Inherited, Overriding, and Overridden Instance Methods
- Member access from an inherited instance method
- Member access from an overriding instance method
- Member access from an overridden method invoked via super
- Member Access from Inherited and Overridden Class Methods
- Best Practices for Overriding
- Constructor Functions in Subclasses
- Extraneous Superclass Constructor Invocation in Flash Player 6
- Subclassing Built-in Classes
- Built-in Classes that Store Function Libraries
- Augmenting Built-in Classes and Objects
- The Theory of Inheritance
- Why Inheritance?
- Polymorphism and Dynamic Binding
- Inheritance Versus Composition
- Is-A, Has-A, and Uses-A
- When to use composition over inheritance
- Using composition to shed an old habit
- Abstract and Final Classes Not Supported
- Let's Try Inheritance
- Authoring an ActionScript 2.0 Subclass
- Extending ImageViewer's Capabilities
- The ImageViewerDeluxe Skeleton
- Adding setPosition( ) and setSize( ) Methods
- Autosizing the Image Viewer
- Using ImageViewerDeluxe
- Moving Right Along
- Interfaces
- The Case for Interfaces
- Interfaces and Multidatatype Classes
- Interface Syntax and Use
- Interface Naming Conventions
- Interface Inheritance
- Marker Interfaces
- Multiple Type Inheritance with Interfaces
- Up Next, Packages
- Packages
- Package Syntax
- The import Statement
- Importing an Entire Package
- Package Naming Conventions
- Defining Packages
- Package Access and the Classpath
- Adding a New Directory to the Classpath
- Simulating Packages in ActionScript 1.0
- Just a Little More Theory
- Exceptions
- The Exception-Handling Cycle
- Handling Multiple Types of Exceptions
- Determining Exception Type Granularity
- Using a single custom exception type
- Using configurable debugging messages
- Multiple custom BoxDimensionException subclasses
- Exception Bubbling
- Uncaught Exceptions
- The finally Block
- Nested Exceptions
- A Nested Exception Bug
- Control Flow Changes in try/catch/finally
- Limitations of Exception Handling in ActionScript 2.0
- No Checked Exceptions
- No Built-in Exceptions
- Exception Performance Issues
- From Concepts to Code
- Part II
- An OOP Application Framework
- The Basic Directory Structure
- The Flash Document (.fla file)
- The Classes
- The Document Timeline
- The Exported Flash Movie (.swf file)
- Projects in Flash MX Professional 2004
- Let's See It in Action!
- Using Components with ActionScript 2.0
- Currency Converter Application Overview
- Preparing the Flash Document
- Adding Components to the Document
- Starting the Application
- The CurrencyConverter Class
- Importing the Components' Package
- CurrencyConverter Properties
- The main( ) method
- The Class Constructor
- Creating the User Interface
- The interface container
- The title Label component
- The instructions Label component
- The input TextInput component
- The currencyPicker ComboBox component
- The convertButton Button component
- The result TextArea component
- Converting Currency Based on User Input
- Exporting the Final Application
- Handling Component Events
- Components Complete
- MovieClip Subclasses
- The Duality of MovieClip Subclasses
- Avatar: A MovieClip Subclass Example
- The AvatarSymbol Movie Clip
- The Avatar Class
- Linking AvatarSymbol to the Avatar Class
- Creating Avatar Instances
- Initializing Avatar Instances
- Avatar: The Composition Version
- Issues with Nested Assets
- Properties and Methods of Nested Assets Initially Undefined
- Nested Assets Not Automatically Recognized by Compiler
- A Note on MovieClip Sub-subclasses
- Curiouser and Curiouser
- Distributing Class Libraries
- Sharing Class Source Files
- Loading Classes at Runtime
- Create the classes in the class library
- Create the class library .swf file
- Create the movie that loads the class library .swf file
- Create the exclusion XML file
- Try it out
- Sharing Classes Without Sharing Source Files
- Runtime Versus Compile Time
- Creating a No-Source Compile-time Class Library
- Create the classes in the class library
- Create the component icon
- Create the component class
- Create the component
- Distribute the component to developers
- Try it out
- Creating a No-Source Runtime Class Library
- Solving Real OOP Problems
- Part III
- Introduction to Design Patterns
- Bring on the Patterns
- The Observer Design Pattern
- Implementing Observer in ActionScript 2.0
- Logger: A Complete Observer Example
- The LogMessage Class
- The OutputPanelView Class
- The TextFieldView Class
- The Logger Class
- Inheritance Misuse?
- Using the Logger Class
- Memory Management Issues with Observer
- Beyond Observer
- The Singleton Design Pattern
- Implementing Singleton in ActionScript 2.0
- The Singleton Pattern in the Logger Class
- Singleton Versus Class Methods and Class Properties
- A Warning Against Singletons as Globals
- On to User Interfaces
- The Model-View-Controller Design Pattern
- The General Architecture of MVC
- Communication in MVC
- Class Responsibilities in MVC
- Responsibilities of the model
- Responsibilities of the view
- Responsibilities of the controller
- What Creates the MVC Classes?
- A Generalized MVC Implementation
- The View Implementation
- The Controller Implementation
- An MVC Clock
- The ClockModel Class
- The ClockUpdate Class
- The ClockAnalogView and ClockDigitalView Classes
- The ClockTools Class
- The ClockController Class
- Putting It All Together: The Clock Class
- Further Exploration
- The Delegation Event Model
- Structure and Participants
- The Event Source
- The Event Object
- The Event Listener
- Are Observer and Delegation Event Model Equivalent?
- The Flow of Logic
- Core Implementation
- The EventListenerList Class
- The EventObject Class
- The EventListener Interface
- NightSky: A Delegation Event Model Example
- The Event Source
- The EventListener Subinterface
- The EventObject Subclass
- The Event Listener Class
- The Overall Structure
- Randomizer, RandomizerListener, and RandomizerEvent
- Multiple event types from a single event source
- The NightSky Class
- Using NightSky in an Application
- Other Event Architectures in ActionScript
- From Some Place to Some OtherPlace
- Part IV
- ActionScript 2.0 Language Quick Reference
- Global Properties
- Global Functions
- Accessibility Class
- Arguments Class
- Array Class
- Boolean Class
- Button Class
- Camera Class
- Color Class
- ContextMenu Class
- ContextMenuItem Class
- Date Class
- Function Class
- Key Class
- LoadVars Class
- LocalConnection Class
- Math Class
- Microphone Class
- Mouse Class
- MovieClip Class
- MovieClipLoader Class
- NetConnection Class
- NetStream Class
- Number Class
- Object Class
- PrintJob Class
- Selection Class
- SharedObject Class
- Sound Class
- Stage Class
- String Class
- System Class
- System.capabilities Class
- System.security Class
- TextField Class
- TextField.StyleSheet Class
- TextFormat Class
- TextSnapshot Class
- Video Class
- XML Class
- XMLNode Class
- XMLSocket Class
- Differences from ECMAScript Edition 4
- Index
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.