ActionScript for Flash MX: The Definitive Guide, Second Edition

Book description

Updated to cover Flash MX, the newest version of Macromedia Flash, ActionScript for Flash MX: The Definitive Guide, Second Edition is the one book no serious Flash developer should be without. ActionScript is Macromedia's programming language for Flash MX, the popular authoring tool for creating rich internet applications and animations for the Web. With Macromedia's new focus on application development, ActionScript now includes a direct drawing API, loading of external MP3 and JPG files, improved sound control, an extensive set of text formatting tools, complete support for component development using movie clip subclasses, local data storage, accessibility features, and much more. And ActionScript for Flash MX: The Definitive Guide is the most complete, up-to-date reference available for the latest version of this language. Author Colin Moock, one of the most universally respected developers in the Flash community, has added hundreds of new code examples to show new Flash MX techniques in the real world: how to draw circles, save data to disk, convert arrays to onscreen tables, create reusable components, and preload variables, XML, and sounds. The book's language reference alone has nearly doubled from the first edition, with more than 250 new classes, objects, methods, and properties. You'll find exhaustive coverage of dozens of undocumented, under-documented, and mis-documented features. Along with the new material, Colin Moock has meticulously revised the entire text to conform to Flash MX best-coding practices. In particular, objected-oriented programming and the new event model get special attention in light of changes to Flash MX ActionScript. From sending data between two movies to creating getter/setter properties, the new edition of this book demystifies the often-confusing new features of Flash MX, giving developers easy access to its powerful new capabilities. ActionScript for Flash MX: The Definitive Guide is structured so non-programmers can learn how to use ActionScript and programmers can take their skills to new heights. If you are in the market to really learn about the hows and whys of ActionScript, then this is the book for you.

Table of contents

  1. Table of Contents (1/2)
  2. Table of Contents (2/2)
  3. Foreword
  4. Preface
    1. Second Edition Quick Start
    2. What’s New in Flash MX ActionScript
    3. What’s New in the Second Edition
      1. Updated Code Examples
      2. Hundreds of Tweaks
      3. Major Revisions Since the First Edition
    4. What’s Not in This Book
    5. Undocumented ActionScript Features
    6. Flash Naming Conventions
    7. What Can ActionScript Do?
      1. Timeline Control
      2. Interactivity
      3. Visual and Audio Content Control
      4. Programmatic Content Generation
      5. Server Communication
    8. The Code Depot
    9. Showcase
    10. Typographical Conventions
    11. We’d Like to Hear from You
    12. Acknowledgments
  5. Part I
  6. A Gentle Introduction for Nonprogrammers
    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. Objects and Object-Oriented Programming
      6. Movie Clip Instances
      7. 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!
  7. 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 Values to 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. Timeline Variables
        1. Scenario 1: Accessing a value defined earlier on the same timeline
        2. Scenario 2: Accessing a value defined later on the same timeline
      2. Variable Accessibility (Scope)
      3. Movie Clip Variables and Global Variables
        1. Scenario 3: Variables declared on separate timelines
      4. Accessing Variables on Different Timelines
        1. The _root and _ parent properties
        2. Accessing variables on different document levels
      5. Movie Clip Variable Life Span
        1. Scenario 4: Life span of movie clip variables
      6. Local Variables
      7. The Scope Chain
      8. Event Handler Scope
    6. Loading External Variables
    7. Some Applied Examples
    8. Onward!
  8. 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. Determining the Type of an Existing Datum
    5. Primitive Data Versus Composite Data
    6. Copying, Comparing, and Passing Data
    7. Onward!
  9. 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 escape sequences
      3. Entering Multilingual and Special Characters
    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. Flash 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
    7. The Boolean Type
      1. Using Boolean Values to Build a Preloader
    8. Undefined
    9. Null
    10. Onward!
  10. 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 Strict Equality and Inequality Operators
    6. 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
    7. The Flash 4 String Operators
    8. The Logical Operators
      1. Logical Expressions and Data Values
      2. Logical OR
      3. Logical AND
      4. Logical NOT
    9. The Grouping Operator
    10. The Comma Operator
    11. The void Operator
    12. Other Operators
      1. The typeof Operator
      2. The new Operator
      3. The delete Operator
      4. Array-Element/Object-Property Operator
      5. The Dot Operator
      6. The Conditional Operator
      7. The instanceof Operator
      8. The super “Operator”
      9. The Function Call Operator
      10. The Bitwise Operators
    13. Onward!
  11. 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 return Statement
      8. The with Statement
      9. The ifFrameLoaded Statement
      10. The Empty Statement
    4. Statements Versus Actions
    5. Onward!
  12. Conditionals
    1. The if Statement
    2. The else Statement
      1. The Conditional Operator
    3. The else if Statement
    4. The switch Statement
      1. Simulating the switch Statement in Flash 5
    5. Compact Conditional Syntax
    6. Onward!
  13. 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. Movie Clip onEnterFrame() Loops
      3. Frame Rate’s Effect on Timeline and onEnterFrame() Loops
    8. An Alternative to Timeline Loops: setInterval()
    9. Onward!
  14. 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 Values from 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. Functions and 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 and caller properties
      3. Passing Parameters by Value Versus by Reference
    9. Recursive Functions
    10. Nested Functions
      1. Nested Function Scope
    11. Built-in Functions
      1. Built-in Function Availability
    12. Functions as Objects
      1. Passing Functions to Functions
      2. Storing Functions in Variables
      3. Attaching Properties and Methods to Functions
      4. Returning Functions from Functions
    13. Centralizing Code
    14. The Multiple-Choice Quiz Revisited
      1. Organizing the Quiz Code into Functions
        1. Calling the answer() function
      2. Quiz Summary
    15. Onward!
  15. Events and Event Handling
    1. Synchronous Code Execution
    2. Event-Based Asynchronous Code Execution
    3. Types of Events
    4. Event Handling
    5. Event Handler Properties
    6. Listener Events
    7. Flash 5’s on() and onClipEvent() Handlers
      1. Attaching Event Handlers to Buttons and Movie Clips
    8. Event Handler Lifespan
    9. Event Handler Scope
      1. Scope of Event Handler Properties and Event Listener Methods
      2. Scope of onClipEvent() Handlers
      3. Scope of on() Handlers
      4. Scope Summary
    10. Values of the this Keyword
    11. Flash 5–style onClipEvent() Order of Execution
    12. Copying Movie Clip Event Handlers
    13. Refreshing the Screen with updateAfterEvent()
    14. Code Reusability
    15. Dynamic Movie Clip Event Handlers
    16. Event Handlers Applied
    17. Onward!
  16. 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. Array Literals
      2. The Array Constructor
    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 Numbered 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() and sortOn() Methods
      3. The slice() Method
      4. The join() Method
      5. The toString() Method
    10. Arrays as Objects
    11. Multidimensional Arrays
    12. The Multiple-Choice Quiz, Take 3
    13. Onward!
  17. 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 Iterate over an Object’s Properties
    4. Object Methods
    5. Classes and Object-Oriented Programming
      1. Object Classes
      2. Making a Class
        1. Creating instances of a class
        2. Creating a class’s properties
        3. Creating a class’s methods
        4. Getter and Setter Methods
        5. Alternate means of method assignment
        6. Static Methods and Properties
      3. Inheritance: Superclasses and Subclasses (1/2)
      4. Inheritance: Superclasses and Subclasses (2/2)
        1. Making a superclass
        2. Accessing overridden methods
        3. Polymorphism
        4. Determining whether an object belongs to a superclass
        5. The end of the inheritance chain
      5. Displaying the Ball on Screen
    6. Using Standalone Object Instances asAssociativeArrays
      1. Object Literals
    7. The Almighty Prototype Chain
      1. The __proto__ Property
      2. The constructor Property
      3. Advanced Issues with Standard SuperClass Assignment (1/2)
      4. Advanced Issues with Standard SuperClass Assignment (2/2)
        1. Issue 1: Overwriting of prototype.constructor
        2. Issue 2: Undesirable SuperClass constructor invocation
        3. Issue 3: Undefined properties appear in SubClass.prototype
        4. A custom setSuperClass() function
      5. Is There a Test?
    8. Built-in ActionScript Classes and Objects
      1. Built-in Classes
      2. Built-in Objects
      3. Learning the Ropes
      4. Adding Custom Methods and Properties toBuilt-inClassesandObjects
    9. OOP Quick Reference
      1. Some OOP Tips
      2. OOP Application Template
        1. Main application template
        2. Class template
        3. SubClass template
    10. Further Topics
      1. Custom Events
      2. Design Patterns and UML
    11. Simulating Namespaces
    12. The Multiple-Choice Quiz, OOP Style
    13. Onward!
  18. Movie Clips
    1. The “Objectness” of Movie Clips
      1. The MovieClip Class
    2. Types of Movie Clips
      1. Main Movies
      2. Regular Movie Clips
      3. Components
      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()
        4. Creating instances with createEmptyMovieClip()
      3. Movie Clip Instance Names
      4. Importing External Movies and Images
        1. Load movie execution order
    4. Movie and Instance Stacking Order
      1. Movie Clip Depths
      2. The Internal Layer Stack
      3. The Programmatically Generated Content Stack
        1. How clips generated via attachMovie() and createEmptyMovieClip() 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 content stack
      4. The .swf Document “_level” Stack
      5. 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
    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. Method Versus Global Function Overlap Issues
    8. Drawing in a Movie Clip at Runtime
    9. Using Movie Clips as Buttons
    10. Input Focus and Movie Clips
    11. Building a Clock with Clips
    12. Onward!
  19. Movie Clip Subclasses andComponents
    1. Creating the Library Symbol
    2. Creating and Invoking theSubclassConstructor
    3. Assigning the MovieClip Superclass
    4. Packaging Subclass Code and Library Symbols Together
    5. Making Movie Clip Components
      1. Packaging Component Graphics
      2. Component Template
    6. MovieClip Sub-Subclasses
    7. Summary
    8. Onward!
  20. Lexical Structure
    1. Whitespace
    2. Statement Terminators (Semicolons)
    3. Comments
    4. Reserved Words
    5. Identifiers
    6. Case Sensitivity
    7. Onward!
  21. 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. Defining Components
      1. Building a Component with a Standard Interface
        1. Adding a standard interface to a component
        2. Configuring standard component parameters
        3. Removing and reordering standard component parameters
      2. Building a Component with a Customized Interface
        1. Creating a custom interface .swf file
        2. Adding a custom interface to a component
      3. Professional Component Distribution Features
      4. Using Components
    9. Onward!
  22. Building a Flash Form
    1. The Flash Form Data Cycle
      1. Flash Client-Side User Input
      2. Transmitting Data for Server-Side Processing
      3. The Data-Handling Application
        1. Sending international characters to Flash
      4. Flash Receives and Interprets Results
    2. Creating a Flash Fill-in Form
      1. Building the Interface
      2. Sending Data to the Server
      3. The Perl Script, echo.pl
      4. Receiving Results from the Server
    3. Onward!
  23. Part II
  24. ActionScript Language Reference
    1. Global Functions
    2. Global Properties
    3. Built-in Classes and Objects
    4. Entry Headings
    5. Alphabetical Language Reference
      1. Accessibility Object
      2. Accessibility.isActive() Method
      3. Accessibility.sendEvent() Method
      4. Arguments Object
      5. arguments.callee Property
      6. arguments.caller Property
      7. arguments.length Property
      8. Array Class
      9. Array.concat() Method
      10. Array.join() Method
      11. Array.length Property
      12. Array.pop() Method
      13. Array.push() Method
      14. Array.reverse() Method
      15. Array.shift() Method
      16. Array.slice() Method
      17. Array.sort() Method
      18. Array.sortOn() Method
      19. Array.splice() Method
      20. Array.toString() Method
      21. Array.unshift() Method
      22. Boolean() Global Function
      23. Boolean Class
      24. Boolean.toString() Method
      25. Boolean.valueOf() Method
      26. Button Class
      27. Button._alpha Property
      28. Button.enabled Property
      29. Button._focusrect Property
      30. Button.getDepth() Method
      31. Button._height Property
      32. Button keyPress Event Handler
      33. Button._name Property
      34. Button.onDragOut() Event Handler
      35. Button.onDragOver() Event Handler
      36. Button.onKillFocus() Event Handler
      37. Button.onPress() Event Handler
      38. Button.onRelease() Event Handler
      39. Button.onReleaseOutside() Event Handler
      40. Button.onRollOut() Event Handler
      41. Button.onRollOver() Event Handler
      42. Button.onSetFocus() Event Handler
      43. Button._parent Property
      44. Button._rotation Property
      45. Button.tabEnabled Property
      46. Button.tabIndex Property
      47. Button._target Property
      48. Button.trackAsMenu Property
      49. Button._url Property
      50. Button.useHandCursor Property
      51. Button._visible Property
      52. Button._width Property
      53. Button._x Property
      54. Button._xmouse Property
      55. Button._xscale Property
      56. Button._y Property
      57. Button._ymouse Property
      58. Button._yscale Property
      59. call() Global Function
      60. Capabilities Object
      61. capabilities.hasAccessibility Property
      62. capabilities.hasAudio Property
      63. capabilities.hasAudioEncoder Property
      64. capabilities.hasMP3 Property
      65. capabilities.hasVideoEncoder Property
      66. capabilities.input Property
      67. capabilities.isDebugger Property
      68. capabilities.language Property
      69. capabilities.manufacturer Property
      70. capabilities.os Property
      71. capabilities.pixelAspectRatio Property
      72. capabilities.screenColor Property
      73. capabilities.screenDPI Property
      74. capabilities.screenResolutionX Property
      75. capabilities.screenResolutionY Property
      76. capabilities.serverString Property
      77. capabilities.version Property
      78. clearInterval() Global Function
      79. Color Class
      80. Color.getRGB() Method
      81. Color.getTransform() Method
      82. Color.setRGB() Method
      83. Color.setTransform() Method
      84. Date() Global Function
      85. Date Class
      86. Date.getDate() Method
      87. Date.getDay() Method
      88. Date.getFullYear() Method
      89. Date.getHours() Method
      90. Date.getMilliseconds() Method
      91. Date.getMinutes() Method
      92. Date.getMonth() Method
      93. Date.getSeconds() Method
      94. Date.getTime() Method
      95. Date.getTimezoneOffset() Method
      96. Date.getUTCDate() Method
      97. Date.getUTCDay() Method
      98. Date.getUTCFullYear() Method
      99. Date.getUTCHours() Method
      100. Date.getUTCMilliseconds() Method
      101. Date.getUTCMinutes() Method
      102. Date.getUTCMonth() Method
      103. Date.getUTCSeconds() Method
      104. Date.getYear() Method
      105. Date.setDate() Method
      106. Date.setFullYear() Method
      107. Date.setHours() Method
      108. Date.setMilliseconds() Method
      109. Date.setMinutes() Method
      110. Date.setMonth() Method
      111. Date.setSeconds() Method
      112. Date.setTime() Method
      113. Date.setUTCDate() Method
      114. Date.setUTCFullYear() Method
      115. Date.setUTCHours() Method
      116. Date.setUTCMilliseconds() Method
      117. Date.setUTCMinutes() Method
      118. Date.setUTCMonth() Method
      119. Date.setUTCSeconds() Method
      120. Date.setYear() Method
      121. Date.toString() Method
      122. Date.UTC() Class Method
      123. Date.valueOf() Method
      124. delete Operator
      125. duplicateMovieClip() Global Function
      126. #endinitclip Pragma
      127. escape() Global Function
      128. eval() Global Function
      129. _focusrect Global Property
      130. fscommand() Global Function
      131. Function Class
      132. Function.apply() Method
      133. Function.call() Method
      134. Function.prototype Property
      135. Function.toString() Method
      136. getProperty() Global Function
      137. getTimer() Global Function
      138. getURL() Global Function
      139. getVersion() Global Function
      140. _global Object
      141. gotoAndPlay() Global Function
      142. gotoAndStop() Global Function
      143. _highquality Global Property
      144. #include Directive
      145. Infinity Global Property
      146. -Infinity Global Property
      147. #initclip Pragma
      148. instanceof Operator
      149. int() Global Function
      150. isFinite() Global Function
      151. isNaN() Global Function
      152. Key Object
      153. Key.addListener() Method
      154. Key.getAscii() Method
      155. Key.getCode() Method
      156. Key.isDown() Method
      157. Key.isToggled() Method
      158. Key.onKeyDown() Listener Event
      159. Key.onKeyUp() Listener Event
      160. Key.removeListener() Method
      161. _leveln Global Property
      162. loadMovie() Global Function
      163. loadMovieNum() Global Function
      164. loadVariables() Global Function
      165. loadVariablesNum() Global Function
      166. LoadVars Class
      167. LoadVars.contentType Property
      168. LoadVars.decode() Method
      169. LoadVars.getBytesLoaded() Method
      170. LoadVars.getBytesTotal() Method
      171. LoadVars.load() Method
      172. LoadVars.loaded Property
      173. LoadVars.onData() Event Handler
      174. LoadVars.onLoad() Event Handler
      175. LoadVars.send() Method
      176. LoadVars.sendAndLoad() Method
      177. LoadVars.toString() Method
      178. LocalConnection Class
      179. LocalConnection.allowDomain() Event Handler
      180. LocalConnection.close() Method
      181. LocalConnection.connect() Method
      182. LocalConnection.domain() Method
      183. LocalConnection.onStatus() Event Handler
      184. LocalConnection.send() Method
      185. Math Object
      186. Math.abs() Method
      187. Math.acos() Method
      188. Math.asin() Method
      189. Math.atan() Method
      190. Math.atan2() Method
      191. Math.ceil() Method
      192. Math.cos() Method
      193. Math.E Property
      194. Math.exp() Method
      195. Math.floor() Method
      196. Math.LN10 Property
      197. Math.LN2 Property
      198. Math.log() Method
      199. Math.LOG10E Property
      200. Math.LOG2E Property
      201. Math.max() Method
      202. Math.min() Method
      203. Math.PI Property
      204. Math.pow() Method
      205. Math.random() Method
      206. Math.round() Method
      207. Math.sin() Method
      208. Math.sqrt() Method
      209. Math.SQRT1_2 Property
      210. Math.SQRT2 Property
      211. Math.tan() Method
      212. maxscroll Property
      213. Mouse Object
      214. Mouse.addListener() Method
      215. Mouse.hide() Method
      216. Mouse.onMouseDown() Listener Event
      217. Mouse.onMouseMove() Listener Event
      218. Mouse.onMouseUp() Listener Event
      219. Mouse.removeListener() Method
      220. Mouse.show() Method
      221. MovieClip Class (1/2)
      222. MovieClip Class (2/2)
      223. MovieClip._alpha Property
      224. MovieClip.attachMovie() Method
      225. MovieClip.beginFill() Method
      226. MovieClip.beginGradientFill() Method (1/2)
      227. MovieClip.beginGradientFill() Method (2/2)
      228. MovieClip.clear() Method
      229. MovieClip.createEmptyMovieClip() Method
      230. MovieClip.createTextField() Method
      231. MovieClip._currentframe Property
      232. MovieClip.curveTo() Method
      233. MovieClip._droptarget Property
      234. MovieClip.duplicateMovieClip() Method
      235. MovieClip.enabled Property
      236. MovieClip.endFill() Method
      237. MovieClip.focusEnabled Property
      238. MovieClip._focusrect Property
      239. MovieClip._framesloaded Property
      240. MovieClip.getBounds() Method
      241. MovieClip.getBytesLoaded() Method
      242. MovieClip.getBytesTotal() Method
      243. MovieClip.getDepth() Method
      244. MovieClip.getURL() Method
      245. MovieClip.globalToLocal() Method
      246. MovieClip.gotoAndPlay() Method
      247. MovieClip.gotoAndStop() Method
      248. MovieClip._height Property
      249. MovieClip.hitArea Property
      250. MovieClip.hitTest() Method
      251. MovieClip.lineStyle() Method
      252. MovieClip.lineTo() Method
      253. MovieClip.loadMovie() Method
      254. MovieClip.loadVariables() Method
      255. MovieClip.localToGlobal() Method
      256. MovieClip.moveTo() Method
      257. MovieClip._name Property
      258. MovieClip.nextFrame() Method
      259. MovieClip.onData () Event Handler
      260. MovieClip.onDragOut() Event Handler
      261. MovieClip.onDragOver() Event Handler
      262. MovieClip.onEnterFrame () Event Handler
      263. MovieClip.onKeyDown () Event Handler
      264. MovieClip.onKeyUp () Event Handler
      265. MovieClip.onKillFocus () Event Handler
      266. MovieClip.onLoad () Event Handler
      267. MovieClip.onMouseDown() Event Handler
      268. MovieClip.onMouseMove() Event Handler
      269. MovieClip.onMouseUp() Event Handler
      270. MovieClip.onPress() Event Handler
      271. MovieClip.onRelease() Event Handler
      272. MovieClip.onReleaseOutside() Event Handler
      273. MovieClip.onRollOut() Event Handler
      274. MovieClip.onRollOver() Event Handler
      275. MovieClip.onSetFocus() Event Handler
      276. MovieClip.onUnload() Event Handler
      277. MovieClip._parent Property
      278. MovieClip.play() Method
      279. MovieClip.prevFrame() Method
      280. MovieClip.removeMovieClip() Method
      281. MovieClip._rotation Property
      282. MovieClip.setMask() Method
      283. MovieClip.startDrag() Method
      284. MovieClip.stop() Method
      285. MovieClip.stopDrag() Method
      286. MovieClip.swapDepths() Method
      287. MovieClip.tabChildren Property
      288. MovieClip.tabEnabled Property
      289. MovieClip.tabIndex Property
      290. MovieClip._target Property
      291. MovieClip._totalframes Property
      292. MovieClip.trackAsMenu Property
      293. MovieClip.unloadMovie() Method
      294. MovieClip._url Property
      295. MovieClip.useHandCursor Property
      296. MovieClip.valueOf() Method
      297. MovieClip._visible Property
      298. MovieClip._width Property
      299. MovieClip._x Property
      300. MovieClip._xmouse Property
      301. MovieClip._xscale Property
      302. MovieClip._y Property
      303. MovieClip._ymouse Property
      304. MovieClip._yscale Property
      305. NaN Global Property
      306. new Operator
      307. newline Constant
      308. nextFrame() Global Function
      309. nextScene() Global Function
      310. Number() Global Function
      311. Number Class
      312. Number.MAX_VALUE Property
      313. Number.MIN_VALUE Property
      314. Number.NaN Property
      315. Number.NEGATIVE_INFINITY Property
      316. Number.POSITIVE_INFINITY Property
      317. Number.toString() Method
      318. Object Class
      319. Object.addProperty Method
      320. Object.constructor Property
      321. Object.hasOwnProperty() Method
      322. Object.__proto__ Property
      323. Object.registerClass() Class Method
      324. Object.toString() Method
      325. Object.unwatch() Method
      326. Object.valueOf() Method
      327. Object.watch() Method
      328. parseFloat() Global Function
      329. parseInt() Global Function
      330. play() Global Function
      331. prevFrame() Global Function
      332. prevScene() Global Function
      333. print() Global Function
      334. printAsBitmap() Global Function
      335. printAsBitmapNum() Global Function
      336. printNum() Global Function
      337. _quality Global Property
      338. random() Global Function
      339. removeMovieClip() Global Function
      340. _root Global Property
      341. scroll Property
      342. Selection Object
      343. Selection.addListener() Method
      344. Selection.getBeginIndex() Method
      345. Selection.getCaretIndex() Method
      346. Selection.getEndIndex() Method
      347. Selection.getFocus() Method
      348. Selection.onSetFocus() Listener Event
      349. Selection.removeListener() Method
      350. Selection.setFocus() Method
      351. Selection.setSelection() Method
      352. setInterval() Global Function
      353. setProperty() Global Function
      354. SharedObject Object
      355. SharedObject.data Property
      356. SharedObject.flush() Method
      357. SharedObject.getLocal() Method
      358. SharedObject.getSize() Method
      359. SharedObject.onStatus() Event Handler
      360. Sound Class
      361. Sound.attachSound() Method
      362. Sound.duration Property
      363. Sound.getBytesLoaded() Method
      364. Sound.getBytesTotal() Method
      365. Sound.getPan() Method
      366. Sound.getTransform() Method
      367. Sound.getVolume() Method
      368. Sound.id3 Property
      369. Sound.loadSound() Method
      370. Sound.onLoad() Event Handler
      371. Sound.onSoundComplete() Event Handler
      372. Sound.position Property
      373. Sound.setPan() Method
      374. Sound.setTransform() Method
      375. Sound.setVolume() Method
      376. Sound.start() Method
      377. Sound.stop() Method
      378. _soundbuftime Global Property
      379. Stage Object
      380. Stage.addListener() Method
      381. Stage.align Property
      382. Stage.height Property
      383. Stage.onResize() Listener Event
      384. Stage.removeListener() Method
      385. Stage.scaleMode Property
      386. Stage.showMenu Property
      387. Stage.width Property
      388. startDrag() Global Function
      389. stop() Global Function
      390. stopAllSounds() Global Function
      391. stopDrag() Global Function
      392. #strict Pragma
      393. String() Global Function
      394. String Class
      395. String.charAt() Method
      396. String.charCodeAt() Method
      397. String.concat() Method
      398. String.fromCharCode() Class Method
      399. String.indexOf() Method
      400. String.lastIndexOf() Method
      401. String.length Property
      402. String.slice() Method
      403. String.split() Method
      404. String.substr() Method
      405. String.substring() Method
      406. String.toLowerCase() Method
      407. String.toUpperCase() Method
      408. super “Operator”
      409. System Object
      410. System.capabilities Property
      411. System.security.allowDomain() Method
      412. System.showSettings() Method
      413. System.useCodepage Property
      414. targetPath() Global Function
      415. tellTarget() Global Function
      416. TextField Class
      417. TextField.addListener() Method
      418. TextField._alpha Property
      419. TextField.autoSize Property
      420. TextField.background Property
      421. TextField.backgroundColor Property
      422. TextField.border Property
      423. TextField.borderColor Property
      424. TextField.bottomScroll Property
      425. TextField.condenseWhite Property
      426. TextField.embedFonts Property
      427. TextField.getDepth() Method
      428. TextField.getFontList() Class Method
      429. TextField.getNewTextFormat() Method
      430. TextField.getTextFormat() Method
      431. TextField._height Property
      432. TextField.hscroll Property
      433. TextField.html Property
      434. TextField.htmlText Property
      435. TextField.length Property
      436. TextField.maxChars Property
      437. TextField.maxhscroll Property
      438. TextField.maxscroll Property
      439. TextField.multiline Property
      440. TextField._name Property
      441. TextField.onChanged() Event Handler and Listener Event
      442. TextField.onKillFocus() Event Handler
      443. TextField.onScroller() Event Handler and Listener Event
      444. TextField.onSetFocus() Event Handler
      445. TextField._parent Property
      446. TextField.password Property
      447. TextField.removeListener() Method
      448. TextField.removeTextField() Method
      449. TextField.replaceSel() Method
      450. TextField.restrict Property
      451. TextField._rotation Property
      452. TextField.scroll Property
      453. TextField.selectable Property
      454. TextField.setNewTextFormat() Method
      455. TextField.setTextFormat() Method
      456. TextField.tabEnabled Property
      457. TextField.tabIndex Property
      458. TextField._target Property
      459. TextField.text Property
      460. TextField.textColor Property
      461. TextField.textHeight Property
      462. TextField.textWidth Property
      463. TextField.type Property
      464. TextField._url Property
      465. TextField.variable Property
      466. TextField._visible Property
      467. TextField._width Property
      468. TextField.wordWrap Property
      469. TextField._x Property
      470. TextField._xmouse Property
      471. TextField._xscale Property
      472. TextField._y Property
      473. TextField._ymouse Property
      474. TextField._yscale Property
      475. TextFormat Class
      476. TextFormat.align Property
      477. TextFormat.blockIndent Property
      478. TextFormat.bold Property
      479. TextFormat.bullet Property
      480. TextFormat.color Property
      481. TextFormat.font Property
      482. TextFormat.getTextExtent() Method
      483. TextFormat.indent Property
      484. TextFormat.italic Property
      485. TextFormat.leading Property
      486. TextFormat.leftMargin Property
      487. TextFormat.rightMargin Property
      488. TextFormat.size Property
      489. TextFormat.tabStops Property
      490. TextFormat.target Property
      491. TextFormat.underline Property
      492. TextFormat.url Property
      493. toggleHighQuality() Global Function
      494. trace() Global Function
      495. typeof Operator
      496. unescape() Global Function
      497. unloadMovie() Global Function
      498. unloadMovieNum() Global Function
      499. updateAfterEvent() Global Function
      500. $version “Global” Property
      501. XML Class
      502. XML.appendChild() Method
      503. XML.attributes Property
      504. XML.childNodes Property
      505. XML.cloneNode() Method
      506. XML.contentType Property
      507. XML.createElement() Method
      508. XML.createTextNode() Method
      509. XML.docTypeDecl Property
      510. XML.firstChild Property
      511. XML.getBytesLoaded() Method
      512. XML.getBytesTotal() Method
      513. XML.hasChildNodes() Method
      514. XML.ignoreWhite Property
      515. XML.insertBefore() Method
      516. XML.lastChild Property
      517. XML.load() Method
      518. XML.loaded Property
      519. XML.nextSibling Property
      520. XML.nodeName Property
      521. XML.nodeType Property
      522. XML.nodeValue Property
      523. XML.onData() Event Handler
      524. XML.onLoad() Event Handler
      525. XML.parentNode Property
      526. XML.parseXML() Method
      527. XML.previousSibling Property
      528. XML.removeNode() Method
      529. XML.send() Method
      530. XML.sendAndLoad() Method
      531. XML.status Property
      532. XML.toString() Method
      533. XML.xmlDecl Property
      534. XMLNode Class
      535. XMLSocket Class (1/2)
      536. XMLSocket Class (2/2)
      537. XMLSocket.close() Method
      538. XMLSocket.connect() Method
      539. XMLSocket.onClose() Event Handler
      540. XMLSocket.onConnect() Event Handler
      541. XMLSocket.onData() Event Handler
      542. XMLSocket.onXML() Event Handler
      543. XMLSocket.send() Method
  25. Part III
  26. Resources
    1. ActionScript Books
    2. ActionScript and Programming Web Sites
    3. ECMA-262 Resources
    4. Object-Oriented Programming
    5. SWF File Format
    6. Character Encoding and Unicode
  27. Latin 1 Character Repertoire and Keycodes (1/2)
  28. Latin 1 Character Repertoire and Keycodes (2/2)
  29. Backward Compatibility and Player Build Updates
    1. Best Practices in Flash 6 ActionScript
    2. Player Build Updates
      1. Updates to Flash Player 6, Build 65
      2. Updates to Flash Player 6, Build 47
      3. Updates to Flash Player 6, Build 40
      4. Updates to Flash Player 6, Build 29
      5. Updates to Flash Player 5, Build 41 and 42
    3. Flash 4 Versus Flash 5 (and Later)
      1. Controlling Movie Clips
      2. Flash 4 Versus Flash 5 Variable Access Syntax
      3. Local Variables in Flash 4–Style Subroutines
      4. Flash 4–to–Flash 5 Datatype Conversion
      5. Flash 4 Events
      6. Flash 4 Versus Flash 5 String Operators
      7. Whither Tell Target?
  30. Differences from ECMA-262 andJavaScript
  31. HTML Support in Text Fields
    1. HTML Tag Support in Text Fields
      1. (Bold)
      2. (Italics)
      3. (Underline)
      4. (List Item)
      5. (Font Control)
      6. (Paragraph Break)
      7. (Line Break)
      8. (Anchor or Hypertext Link)
      9. (Formatting Support)
      10. (Tab Character)
    2. Entity Support
    3. Quoting Attribute Values
    4. Unrecognized Tags and Attributes
    5. Using HTML for Input and Output
    6. Executing JavaScript from HTML Links
    7. Calling ActionScript Functions fromHTMLLinks
  32. Support for GET and POST
    1. Browser-Based Support for GET and POST
    2. Standalone Player Support for GET and POST
  33. Flash UI Component Summary
    1. FCheckBox
    2. FComboBox and FListBox
    3. FPushButton
    4. FRadioButton and FRadioButtonGroup
    5. FScrollBar
    6. FScrollPane
    7. FStyleFormat
  34. Embedding a Flash Movie inaWebPage
    1. Attributes of the Tag
    2. Attributes of the Tag
    3. Common Attributes of the and Tags
    4. Runtime Access Affecting HTML Attributes
  35. Index (1/8)
  36. Index (2/8)
  37. Index (3/8)
  38. Index (4/8)
  39. Index (5/8)
  40. Index (6/8)
  41. Index (7/8)
  42. Index (8/8)

Product information

  • Title: ActionScript for Flash MX: The Definitive Guide, Second Edition
  • Author(s): Colin Moock
  • Release date: December 2002
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9780596003968