Cover image for ActionScript: The Definitive Guide

Book description

Given its ability to deliver high-impact experiences even over low-bandwidth connections, Flash has become the de facto standard for hundreds of thousands of multimedia web developers worldwide. Flash 5 now includes a new full-fledged programming language called "ActionScript" for controlling animation and multimedia. It's a quantum leap from the bare-bones "Actions" supported in Flash 4, and ActionScript: The Definitive Guide is the first book dedicated entirely to documenting and demonstrating this new language. ActionScript includes all fundamental programming constructs (variables, loops, conditionals, functions, etc.), and is inextricably fused with Flash's authoring behaviors and animation timelines. Because ActionScript is based heavily on the ECMAScript Language Specification (ECMA-262) and is syntactically nearly identical to JavaScript, Macromedia expects thousands of existing JavaScript programmers to migrate to ActionScript. This book is divided into three sections.

  • "ActionScript Fundamentals" introduces both programmers and non-programmers to the new language by first describing fundamental programming concepts and then delineating in detail the components, syntax, and usage of ActionScript.

  • "Applied ActionScript Code Depot" shows you how to use common applications, such as processing online forms.

  • "Language Reference" is a concise and detailed reference that makes all ActionScript globals, properties, and objects, including extensive implementation samples, easy to find quickly.

  • Step-by-step tutorials of the most common ActionScript behaviors

  • Object-oriented programming in Flash

  • Intelligent interface development

  • Server communication

  • Dynamic content generation

  • Password protection

  • String handling

  • Message boards

  • Basic physics

  • Games

Code samples are also available from the "Code Depot" on the author's web site devoted to Flash developers. Topics covered in this book include:

ActionScript: The Definitive Guide is structured so both programmers and non-programmers can learn how to use ActionScript. This book will take you well beyond simple Flash animations so you can create your own enhanced Flash-driven sites.

Table of Contents

  1. ActionScript: The Definitive Guide
    1. Foreword
    2. Preface
      1. What Can ActionScript Do?
        1. Timeline Control
        2. Interactivity
        3. Visual and Audio Content Control
        4. Programmatic Content Generation
        5. Server Communication
      2. The Code Depot
      3. Showcase
      4. Typographical Conventions
      5. We’d Like to Hear from You
      6. Acknowledgments
    3. I. ActionScript Fundamentals
      1. 1. A Gentle Introduction for Non-Programmers
        1. Some Basic Phrases
          1. Creating Code
          2. Say Hi to Flash
          3. Keeping Track of Things ( Variables)
            1. Official variable nomenclature
          4. The Wizard Behind the Curtain (the Interpreter)
          5. Extra Info Required (Arguments)
          6. ActionScript’s Glue (Operators)
          7. Putting It All Together
        2. Further ActionScript Concepts
          1. Flash Programs
          2. Expressions
          3. Two Vital Statement Types: Conditionals and Loops
            1. Making choices using conditionals
            2. Repeating tasks using loops
          4. Modular Code (Functions)
            1. Built-in functions
          5. Movie Clip Instances
          6. The Event-Based Execution Model
        3. Building a Multiple-Choice Quiz
          1. Quiz Overview
          2. Building the Layer Structure
          3. Creating the Interface and Questions
          4. Initializing the Quiz
          5. Adding Frame Labels
          6. Scripting the Answer Buttons
          7. Building the Quiz End
          8. Testing Our Quiz
        4. Onward!
      2. 2. Variables
        1. Creating Variables (Declaration)
          1. Automatic Variable Creation
          2. Legal Variable Names
            1. Creating dynamically named variables
          3. Declare Variables at the Outset
        2. Assigning Variables
        3. Changing and Retrieving Variable Values
          1. Checking Whether a Variable Has a Value
        4. Types of Values
          1. Automatic Typing
          2. Automatic Value Conversion
          3. Determining the Type Manually
        5. Variable Scope
          1. Scenario 1
          2. Scenario 2
          3. Scenario 3
          4. Variable Accessibility (Scope)
          5. Movie Clip Variables
            1. Scenario 4
          6. Accessing Variables on Different Timelines
            1. The _root and _ parent properties
            2. Accessing variables on different document levels
            3. Flash 4 versus Flash 5 variable access syntax
          7. Movie Clip Variable Life Span
            1. Scenario 5
          8. Local Variables
            1. Local variables in subroutines
        6. Some Applied Examples
        7. Onward!
      3. 3. Data and Datatypes
        1. Data Versus Information
        2. Retaining Meaning with Datatypes
          1. The ActionScript Datatypes
        3. Creating and Categorizing Data
          1. Automatic Literal Typing
          2. Automatic Complex Expression Typing
        4. Datatype Conversion
          1. Automatic Type Conversion
          2. Explicit Type Conversion
            1. Converting to a string with the toString( ) method
            2. Converting to a string with the String( ) function
            3. Converting to a string with empty string concatenation
            4. Converting to a number with the Number( ) function
            5. Converting to a number by subtracting zero
            6. Converting to a number using the parseInt( ) and parseFloat( ) functions
            7. Converting to a Boolean
          3. Conversion Duration
          4. Flash 4-to-Flash 5 Datatype Conversion
          5. Determining the Type of an Existing Datum
        5. Primitive Data Versus Composite Data
        6. Onward!
      4. 4. Primitive Datatypes
        1. The Number Type
        2. Integers and Floating-Point Numbers
        3. Numeric Literals
          1. Integer Literals
          2. Floating-Point Literals
            1. Floating-point precision
          3. Special Values of the Number Datatype
            1. Not-a-Number: NaN
            2. Minimum and maximum allowed values: MIN_VALUE and MAX_VALUE
            3. Infinity and negative infinity: Infinity and -Infinity
            4. Irrational numbers
        4. Working with Numbers
          1. Using Operators
          2. Built-in Mathematical Functions
        5. The String Type
          1. Character Encoding
          2. String Literals
            1. The empty string
            2. Escape sequences
            3. Unicode-style escape sequences
        6. Working with Strings
          1. Joining Strings Together
            1. The concat( ) function
          2. Comparing Strings
            1. Using the equality (==) and inequality (!=) operators
            2. Character order and alphabetic comparisons
          3. Using Built-in String Functions
          4. Character Indexing
          5. Examining Strings
            1. The length property
            2. The charAt( ) function
            3. The indexOf( ) function
            4. The lastIndexOf( ) Function
            5. No regular expressions
          6. Retrieving Portions of Strings
            1. The substring( ) function
            2. The substr( ) function
            3. The slice( ) function
            4. The split( ) function
            5. String extraction performance issues
          7. Combining String Examination with Substring Extraction
          8. Character Case Conversion
            1. The toUpperCase( ) function
            2. The toLowerCase( ) function
          9. Character Code Functions
            1. The fromCharCode( ) function
            2. The charCodeAt( ) function
          10. Executing Code in a String with eval
          11. Flash 4 Versus Flash 5 String Operators and Functions
        7. The Boolean Type
          1. Using Boolean Values to Build a Preloader
        8. Undefined
        9. Null
        10. Onward!
      5. 5. Operators
        1. General Features of Operators
          1. Operators and Expressions
          2. Number of Operands
          3. Operator Precedence
          4. Operator Associativity
          5. Datatypes and Operators
        2. The Assignment Operator
          1. Combining Operations with Assignment
        3. Arithmetic Operators
          1. Addition
          2. Increment
          3. Subtraction
          4. Decrement
          5. Multiplication
          6. Division
          7. Modulo Division
          8. Unary Negation
        4. The Equality and Inequality Operators
          1. Primitive Datatype Equality
          2. Composite Datatype Equality
          3. Equality and Datatype Conversion
          4. The Inequality Operator
          5. Common Uses of Equality Operations
        5. The Comparison Operators
          1. The Less-Than Operator
          2. The Greater-Than Operator
          3. The Less-Than-or-Equal-to Operator
          4. The Greater-Than-or-Equal-to Operator
          5. Comparison Operations and Datatype Conversion
        6. The String Operators
        7. The Logical Operators
          1. Logical OR
          2. Logical AND
          3. Logical NOT
          4. Logical Expressions and Data Values
        8. The Grouping Operator
        9. The Comma Operator
        10. The void Operator
        11. Other Operators
          1. The Bitwise Operators
          2. The typeof Operator
          3. The new Operator
          4. The delete Operator
          5. Array-Element/Object-Property Operator
          6. The dot Operator
          7. The conditional Operator
          8. The Function Call Operator
        12. Onward!
      6. 6. Statements
        1. Types of Statements
        2. Statement Syntax
          1. Statement Blocks
        3. The ActionScript Statements
          1. Loops and Conditionals
          2. Expression Statements
          3. The var Statement
          4. The set Statement (Set Variable)
          5. The function Statement
          6. Function Call Statements
          7. The call( ) Statement
          8. The return Statement
          9. The with Statement
          10. The ifFrameLoaded Statement
          11. The Empty Statement
        4. Statements Versus Actions
        5. Onward!
      7. 7. Conditionals
        1. The if Statement
        2. The else Statement
          1. The Conditional Operator
        3. The else if Statement
        4. Simulating the switch Statement
        5. Compact Conditional Syntax
        6. Onward!
      8. 8. Loop Statements
        1. The while Loop
        2. Loop Terminology
        3. The do-while Loop
        4. The for Loop
          1. Multiple Iterators in for Loops
        5. The for-in Loop
        6. Stopping a Loop Prematurely
          1. The break Statement
          2. The continue Statement
          3. Maximum Number of Iterations
        7. Timeline and Clip Event Loops
          1. Creating an Empty-Clip Timeline Loop
          2. Flash 5 Clip Event Loops
            1. Keeping event loops portable
          3. Frame Rate’s Effect on Timeline and Clip Event Loops
        8. Onward!
      9. 9. Functions
        1. Creating Functions
        2. Running Functions
        3. Passing Information to Functions
          1. Creating Functions with Parameters
          2. Invoking Functions with Parameters
        4. Exiting and Returning Valuesfrom Functions
          1. Terminating a Function
          2. Returning Values from Functions
        5. Function Literals
        6. Function Availability and Life Span
          1. Function Availability
          2. Function Life Span
        7. Function Scope
          1. The Scope Chain
          2. Local Variables
        8. Function Parameters Revisited
          1. Number of Parameters
          2. The arguments Object
            1. Retrieving parameter values from the arguments array
            2. The callee property
          3. Primitive Versus Composite Parameter Values
        9. Recursive Functions
        10. Internal Functions
          1. Internal Function Availability
        11. Functions as Objects
          1. Passing Functions to Functions
        12. Centralizing Code
        13. The Multiple-Choice Quiz Revisited
          1. Organizing the Quiz Code into Functions
            1. Calling the quiz functions
        14. Onward!
      10. 10. Events and Event Handlers
        1. Synchronous Code Execution
        2. Event-Based AsynchronousCode Execution
        3. Types of Events
        4. Event Handlers
        5. Event Handler Syntax
        6. Creating Event Handlers
          1. Attaching Event Handlers to Buttons and Movie Clips
          2. Attaching Event Handlers to Other Objects
        7. Event Handler Scope
          1. Movie Clip Event Handler Scope
          2. Button Event Handler Scope
          3. Other Object Event Handler Scope
        8. Button Events
          1. press
          2. release
          3. releaseOutside
          4. rollOver
          5. rollOut
          6. dragOut
          7. dragOver
          8. keyPress
        9. Movie Clip Events Overview
        10. Movie-Playback Movie Clip Events
          1. enterFrame
          2. load
          3. unload
          4. data
            1. Using a data event handler with loadVariables( )
            2. Using a data event handler with loadMovie( )
        11. The User-Input Movie Clip Events
          1. mouseDown
          2. mouseUp
          3. mouseMove
          4. keyDown
            1. Handling special keys
          5. keyUp
        12. Order of Execution
        13. Copying Clip Event Handlers
        14. Refreshing the Screen with updateAfterEvent
        15. Code Reusability
        16. Dynamic Movie Clip Event Handlers
        17. Event Handlers Applied
        18. Onward!
      11. 11. Arrays
        1. What Is an Array?
        2. The Anatomy of an Array
          1. Array Elements
          2. Array Element Indexing
          3. Array Size
        3. Creating Arrays
          1. The Array Constructor
          2. Array Literals
        4. Referencing Array Elements
          1. Retrieving an Element’s Value
          2. Setting an Element’s Value
        5. Determining the Size of an Array
        6. Named Array Elements
          1. Creating and Referencing Named Array Elements
          2. Removing Named Elements
        7. Adding Elements to an Array
          1. Adding New Elements Directly
          2. Adding New Elements with the length Property
          3. Adding New Elements with Array Methods
            1. The push( ) method
            2. The unshift( ) method
            3. The splice( ) method
            4. The concat( ) method
        8. Removing Elements from an Array
          1. Removing Elements with the delete Operator
          2. Removing Elements with the length Property
          3. Removing Elements with Array Methods
            1. The pop( ) method
            2. The shift( ) method
            3. The splice( ) method
        9. General Array-Manipulation Tools
          1. The reverse( ) Method
          2. The sort( ) Method
          3. The slice( ) Method
          4. The join( ) Method
          5. The toString( ) Method
          6. Arrays as Objects
        10. Multidimensional Arrays
        11. The Multiple-Choice Quiz, Take 3
        12. Onward!
      12. 12. Objects and Classes
        1. The Anatomy of an Object
        2. Instantiating Objects
        3. Object Properties
          1. Referring to Properties
          2. Using a for-in Loop to Access an Object’s Properties
        4. Methods
        5. Classes and Object-Oriented Programming
          1. Object Classes
          2. Making a Class
            1. Creating members of a class
            2. Assigning custom properties to the objects of a class
            3. Assigning methods to objects of a class
          3. Object Property Inheritance
            1. Creating inherited properties with the prototype property
            2. Overriding inherited properties
            3. The constructor property
            4. The _ _ proto_ _ property
          4. Superclasses and Subclasses
            1. Making a superclass
            2. Polymorphism
            3. Determining whether an object belongs to a superclass
            4. The end of the inheritance chain
            5. Comparing Java terminology
          5. Object-Oriented Programming Summary
        6. Built-in ActionScript Classes and Objects
          1. Built-in Classes
          2. Built-in Objects
          3. Learning the Ropes
        7. Onward!
      13. 13. Movie Clips
        1. The “Objectness” of Movie Clips
        2. Types of Movie Clips
          1. Main Movies
          2. Regular Movie Clips
          3. Smart Clips
          4. Process Clips
          5. Script Clips
          6. Linked Clips
          7. Seed Clips
        3. Creating Movie Clips
          1. Movie Clip Symbols and Instances
          2. Creating Instances
            1. Manually creating instances
            2. Creating instances with duplicateMovieClip( )
            3. Creating instances with attachMovie( )
          3. Instance Names
          4. Importing External Movies
            1. Load movie execution order
        4. Movie and Instance Stacking Order
          1. The Internal Layer Stack
          2. The Programmatically Generated Clip Stack
            1. How clips generated via attachMovie( ) are added to the stack
            2. How clips generated via duplicateMovieClip( ) are added to the stack
            3. Assigning depths to instances in the programmatically generated clip stack
          3. The .swf Document “_level” Stack
          4. Stacks and Order of Execution
        5. Referring to Instances and Main Movies
          1. Using Instance Names
          2. Referring to the Current Instance or Movie
            1. Self-references with the this keyword
          3. Referring to Nested Instances
          4. Referring to Main Movies with _root and _leveln
            1. Referencing the current level’s main movie using _root
            2. Referencing other documents in the Player using _leveln
          5. Authoring Instance References with Insert Target Path
          6. Dynamic References to Clip Objects
            1. Using the array-element access operator
            2. Storing references to clips in data containers
            3. Using for-in to access movie clips
            4. The _name property
            5. The _target property
            6. The targetPath( ) function
          7. Whither Tell Target?
        6. Removing Clip Instances and Main Movies
          1. Using unloadMovie( ) with Instances and Levels
            1. Using unloadMovie( ) with levels
            2. Using unloadMovie( ) with instances
          2. Using removeMovieClip( ) to Delete Instances
          3. Removing Manually Created Instances Manually
        7. Built-in Movie Clip Properties
        8. Movie Clip Methods
          1. Creating Movie Clip Methods
          2. Invoking Movie Clip Methods
          3. Built-in Movie Clip Methods
            1. Method versus global function overlap issues
        9. Applied Movie Clip Examples
          1. Building a Clock with Clips
        10. The Last Quiz
        11. Onward!
      14. 14. Lexical Structure
        1. Whitespace
        2. Statement Terminators (Semicolons)
        3. Comments
        4. Reserved Words
        5. Identifiers
        6. Case Sensitivity
        7. Onward!
      15. 15. Advanced Topics
        1. Copying, Comparing, and Passing Data
        2. Bitwise Programming
          1. Bitwise AND
          2. Bitwise OR
          3. Bitwise XOR
          4. Bitwise NOT
          5. The Bitwise Shift Operators
            1. Signed right shift
            2. Unsigned right shift
            3. Left shift
          6. Bitwise Operations Applied
            1. Why bitwise?
        3. Advanced Function Scope Issues
        4. The movieclip Datatype
        5. Onward!
    4. II. Applied ActionScript
      1. 16. ActionScript Authoring Environment
        1. The Actions Panel
          1. Editing Modes
            1. Normal Mode
            2. Expert Mode
            3. Setting the editing mode
        2. Adding Scripts to Frames
        3. Adding Scripts to Buttons
        4. Adding Scripts to Movie Clips
        5. Where’s All the Code?
        6. Productivity
        7. Externalizing ActionScript Code
          1. Import From File (Author-Time Import)
          2. #include (Compile-Time Import)
          3. Shared Library (Runtime Import)
        8. Packaging Components as Smart Clips
          1. Building a Smart Clip with a Standard Interface
            1. Adding a standard interface to a Smart Clip
            2. Configuring standard clip parameters
            3. Removing and reordering standard clip parameters
          2. Building a Smart Clip with a Customized Interface
            1. Creating a custom interface .swf file
            2. Adding a custom interface to a Smart Clip
          3. Using Smart Clips
        9. Onward!
      2. 17. Flash Forms
        1. The Flash Form Data Cycle
          1. Flash Client-Side User Input
          2. Transmitting Data for Server-Side Processing
          3. The Data-Handling Application
          4. Flash Receives and Interprets Results
        2. Creating a Flash Fill-in Form
          1. Building the Frontend
          2. Sending Data to the Server
          3. The Perl Script, echo.pl
          4. Receiving Results from the Server
        3. Onward!
      3. 18. On-Screen Text Fields
        1. Dynamic Text Fields
          1. Creating a Dynamic Text Field
          2. Changing the Content of a Dynamic Text Field
          3. Retrieving the Value of a Dynamic Text Field
        2. User-Input Text Fields
          1. Creating a User-Input Text Field
          2. Changing the Content of an Input Text Field
          3. Retrieving and Using the Value of an Input Text Field
          4. User-Input Text Fields and Forms
        3. Text Field Options
          1. Line Display
          2. Variable
          3. Border/Bg
          4. Word Wrap
          5. Selectable
          6. Max Characters
          7. Embed Fonts
        4. Text Field Properties
          1. The scroll Property
          2. The maxscroll Property
          3. Typical Text-Scrolling Code
          4. The _changed Event
        5. HTML Support
          1. <B> (Bold)
          2. <I> (Italics)
          3. <U> (Underline)
          4. <FONT> (Font Control)
          5. <P> (Paragraph Break)
          6. <BR> (Line Break)
          7. < A> (Anchor or Hypertext Link)
          8. Anchor Tag Tab Order
          9. Quoting Attribute Values
          10. Unrecognized Tags and Attributes
          11. Using HTML as Output
          12. Using HTML as Input
          13. Executing JavaScript from HTML Links
          14. Calling ActionScript Functions from HTML Links
        6. Working with Text Field Selections
        7. Empty Text Fields and the for-in Statement
        8. Onward!
      4. 19. Debugging
        1. Debugging Tools
          1. The trace( ) Function
          2. The List Variables Command
          3. The List Objects Command
          4. The Bandwidth Profiler
          5. The Debugger
        2. Debugging Methodology
          1. Recognizing Bugs
          2. Identifying the Source of a Bug
          3. Common Sources of Bugs
          4. Fixing Bugs
        3. Onward!
    5. III. Language Reference
      1. 20. ActionScript Language Reference
        1. Global Functions
        2. Global Properties
        3. Built-in Classes and Objects
        4. Entry Headings
        5. Alphabetical Language Reference
          1. Arguments Object
          2. arguments.callee Property
          3. arguments.length Property
          4. Array Class
          5. Array.concat( ) Method
          6. Array.join( ) Method
          7. Array.length Property
          8. Array.pop( ) Method
          9. Array.push( ) Method
          10. Array.reverse( ) Method
          11. Array.shift( ) Method
          12. Array.slice( ) Method
          13. Array.sort( ) Method
          14. Array.splice( ) Method
          15. Array.toString( ) Method
          16. Array.unshift( ) Method
          17. Boolean( ) Global Function
          18. Boolean Class
          19. Boolean.toString( ) Method
          20. Boolean.valueOf( ) Method
          21. Call( ) Global Function
          22. Color Class
          23. Color.getRGB( ) Method
          24. Color.getTransform( ) Method
          25. Color.setRGB( ) Method
          26. Color.setTransform( ) Method
          27. Date( ) Global Function
          28. Date Class
          29. Date.getDate( ) Method
          30. Date.getDay( ) Method
          31. Date.getFullYear( ) Method
          32. Date.getHours( ) Method
          33. Date.getMilliseconds( ) Method
          34. Date.getMinutes( ) Method
          35. Date.getMonth( ) Method
          36. Date.getSeconds( ) Method
          37. Date.getTime( ) Method
          38. Date.getTimezoneOffset( ) Method
          39. Date.getUTCDate( ) Method
          40. Date.getUTCDay( ) Method
          41. Date.getUTCFullYear( ) Method
          42. Date.getUTCHours( ) Method
          43. Date.getUTCMilliseconds( ) Method
          44. Date.getUTCMinutes( ) Method
          45. Date.getUTCMonth( ) Method
          46. Date.getUTCSeconds( ) Method
          47. Date.getYear( ) Method
          48. Date.setDate( ) Method
          49. Date.setFullYear( ) Method
          50. Date.setHours( ) Method
          51. Date.setMilliseconds( ) Method
          52. Date.setMinutes( ) Method
          53. Date.setMonth( ) Method
          54. Date.setSeconds( ) Method
          55. Date.setTime( ) Method
          56. Date.setUTCDate( ) Method
          57. Date.setUTCFullYear( ) Method
          58. Date.setUTCHours( ) Method
          59. Date.setUTCMilliseconds( ) Method
          60. Date.setUTCMinutes( ) Method
          61. Date.setUTCMonth( ) Method
          62. Date.setUTCSeconds( ) Method
          63. Date.setYear( ) Method
          64. Date.toString( ) Method
          65. Date.UTC( ) Class Method
          66. Date.valueOf( ) Method
          67. duplicateMovieClip( ) Global Function
          68. escape( ) Global Function
          69. eval( ) Global Function
          70. _focusrect Global Property
          71. fscommand( ) Global Function
          72. getProperty( ) Global Function
          73. getTimer( ) Global Function
          74. getURL( ) Global Function
          75. getVersion( ) Global Function
          76. gotoAndPlay( ) Global Function
          77. gotoAndStop( ) Global Function
          78. _highquality Global Property
          79. #include Directive
          80. Infinity Global Property
          81. -Infinity Global Property
          82. int( ) Global Function
          83. isFinite( ) Global Function
          84. isNaN( ) Global Function
          85. Key Object
          86. Key.getAscii( ) Method
          87. Key.getCode( ) Method
          88. Key.isDown( ) Method
          89. Key.isToggled( ) Method
          90. _leveln Global Property
          91. loadMovie( ) Global Function
          92. loadMovieNum( ) Global Function
          93. loadVariables( ) Global Function
          94. loadVariablesNum( ) Global Function
          95. Math Object
          96. Math.abs( ) Method
          97. Math.acos( ) Method
          98. Math.asin( ) Method
          99. Math.atan( ) Method
          100. Math.atan2( ) Method
          101. Math.ceil( ) Method
          102. Math.cos( ) Method
          103. Math.E Property
          104. Math.exp( ) Method
          105. Math.floor( ) Method
          106. Math.LN10 Property
          107. Math.LN2 Property
          108. Math.log( ) Method
          109. Math.LOG10E Property
          110. Math.LOG2E Property
          111. Math.max( ) Method
          112. Math.min( ) Method
          113. Math.PI Property
          114. Math.pow( ) Method
          115. Math.random( ) Method
          116. Math.round( ) Method
          117. Math.sin( ) Method
          118. Math.sqrt( ) Method
          119. Math.SQRT1_2 Property
          120. Math.SQRT2 Property
          121. Math.tan( ) Method
          122. maxscroll Property
          123. Mouse Object
          124. Mouse.hide( ) Method
          125. Mouse.show( ) Method
          126. MovieClip “Class”
          127. MovieClip._alpha Property
          128. MovieClip.attachMovie( ) Method
          129. MovieClip._currentframe Property
          130. MovieClip._droptarget Property
          131. MovieClip.duplicateMovieClip( ) Method
          132. MovieClip._framesloaded Property
          133. MovieClip.getBounds( ) Method
          134. MovieClip.getBytesLoaded( ) Method
          135. MovieClip.getBytesTotal( ) Method
          136. MovieClip.getURL( ) Method
          137. MovieClip.globalToLocal( ) Method
          138. MovieClip.gotoAndPlay( ) Method
          139. MovieClip.gotoAndStop( ) Method
          140. MovieClip._height Property
          141. MovieClip.hitTest( ) Method
          142. MovieClip.loadMovie( ) Method
          143. MovieClip.loadVariables( ) Method
          144. MovieClip.localToGlobal( ) Method
          145. MovieClip._name Property
          146. MovieClip.nextFrame( ) Method
          147. MovieClip._parent Property
          148. MovieClip.play( ) Method
          149. MovieClip.prevFrame( ) Method
          150. MovieClip.removeMovieClip( ) Method
          151. MovieClip._rotation Property
          152. MovieClip.startDrag( ) Method
          153. MovieClip.stop( ) Method
          154. MovieClip.stopDrag( ) Method
          155. MovieClip.swapDepths( ) Method
          156. MovieClip._target Property
          157. MovieClip._totalframes Property
          158. MovieClip.unloadMovie( ) Method
          159. MovieClip._url Property
          160. MovieClip.valueOf( ) Method
          161. MovieClip._visible Property
          162. MovieClip._width Property
          163. MovieClip._x Property
          164. MovieClip._xmouse Property
          165. MovieClip._xscale Property
          166. MovieClip._y Property
          167. MovieClip._ymouse Property
          168. MovieClip._yscale Property
          169. NaN Global Property
          170. newline Constant
          171. nextFrame( ) Global Function
          172. nextScene( ) Global Function
          173. Number( ) Global Function
          174. Number Class
          175. Number.MAX_VALUE Property
          176. Number.MIN_VALUE Property
          177. Number.NaN Property
          178. Number.NEGATIVE_INFINITY Property
          179. Number.POSITIVE_INFINITY Property
          180. Number.toString( ) Method
          181. Object Class
          182. Object.constructor Property
          183. Object.__proto__ Property
          184. Object.toString( ) Method
          185. Object.valueOf( ) Method
          186. parseFloat( ) Global Function
          187. parseInt( ) Global Function
          188. play( ) Global Function
          189. prevFrame( ) Global Function
          190. prevScene( ) Global Function
          191. print( ) Global Function
          192. printAsBitmap( ) Global Function
          193. printAsBitmapNum( ) Global Function
          194. printNum( ) Global Function
          195. _quality Global Property
          196. random( ) Global Function
          197. removeMovieClip( ) Global Function
          198. _root Global Property
          199. scroll Property
          200. Selection Object
          201. Selection.getBeginIndex( ) Method
          202. Selection.getCaretIndex( ) Method
          203. Selection.getEndIndex( ) Method
          204. Selection.getFocus( ) Method
          205. Selection.setFocus( ) Method
          206. Selection.setSelection( ) Method
          207. setProperty( ) Global Function
          208. Sound Class
          209. Sound.attachSound( ) Method
          210. Sound.getPan( ) Method
          211. Sound.getTransform( ) Method
          212. Sound.getVolume( ) Method
          213. Sound.setPan( ) Method
          214. Sound.setTransform( ) Method
          215. Sound.setVolume( ) Method
          216. Sound.start( ) Method
          217. Sound.stop( ) Method
          218. _soundbuftime Global Property
          219. startDrag( ) Global Function
          220. stop( ) Global Function
          221. stopAllSounds( ) Global Function
          222. stopDrag( ) Global Function
          223. String( ) Global Function
          224. String Class
          225. String.charAt( ) Method
          226. String.charCodeAt( ) Method
          227. String.concat( ) Method
          228. String.fromCharCode( ) Class Method
          229. String.indexOf( ) Method
          230. String.lastIndexOf( ) Method
          231. String.length Property
          232. String.slice( ) Method
          233. String.split( ) Method
          234. String.substr( ) Method
          235. String.substring( ) Method
          236. String.toLowerCase( ) Method
          237. String.toUpperCase( ) Method
          238. targetPath( ) Global Function
          239. tellTarget( ) Global Function
          240. toggleHighQuality( ) Global Function
          241. trace( ) Global Function
          242. unescape( ) Global Function
          243. unloadMovie( ) Global Function
          244. unloadMovieNum( ) Global Function
          245. updateAfterEvent( ) Global Function
          246. $version “Global” Property
          247. XML Class
          248. XML.appendChild( ) Method
          249. XML.attributes Property
          250. XML.childNodes Property
          251. XML.cloneNode( ) Method
          252. XML.contentType Property
          253. XML.createElement( ) Method
          254. XML.createTextNode( ) Method
          255. XML.docTypeDecl Property
          256. XML.firstChild Property
          257. XML.hasChildNodes( ) Method
          258. XML.ignoreWhite Property
          259. XML.insertBefore( ) Method
          260. XML.lastChild Property
          261. XML.load( ) Method
          262. XML.loaded Property
          263. XML.nextSibling Property
          264. XML.nodeName Property
          265. XML.nodeType Property
          266. XML.nodeValue Property
          267. XML.onData( ) Event Handler
          268. XML.onLoad( ) Event Handler
          269. XML.parentNode Property
          270. XML.parseXML( ) Method
          271. XML.previousSibling Property
          272. XML.removeNode( ) Method
          273. XML.send( ) Method
          274. XML.sendAndLoad( ) Method
          275. XML.status Property
          276. XML.toString( ) Method
          277. XML.xmlDecl Property
          278. XMLnode Class
          279. XMLSocket Class
          280. XMLSocket.close( ) Method
          281. XMLSocket.connect( ) Method
          282. XMLSocket.onClose( ) Event Handler
          283. XMLSocket.onConnect( ) Event Handler
          284. XMLSocket.onData( ) Event Handler
          285. XMLSocket.onXML( ) Event Handler
          286. XMLSocket.send( ) Method
    6. IV. Appendixes
      1. A. Resources
        1. ActionScript and Programming
        2. ECMA-262 Resources
        3. Object-Oriented Programming
        4. SWF File Format
      2. B. Latin 1 Character Repertoire and Keycodes
      3. C. Backward Compatibility
        1. Updates to the Flash 5 Player, Build 41
        2. Controlling Movie Clips
      4. D. Differences from ECMA-262 and JavaScript
    7. Index
    8. Colophon