Example: bankruptcy

Programming ActionScript 3 - Duke University

Programming ActionScript 2007 Adobe Systems Incorporated. All rights ActionScript this guide is distributed with software that includes an end-user agreement, this guide, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end-user license content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated.

Programming ActionScript3.0 If this guide is distributed with software that includes an end-user agreement, this guide, as well as the software described i n it, is furnished under license and may be used or copied only in accordance with the terms of such license.

Tags:

  Programming, Actionscript, Programming actionscript 3, Programming actionscript

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Programming ActionScript 3 - Duke University

1 Programming ActionScript 2007 Adobe Systems Incorporated. All rights ActionScript this guide is distributed with software that includes an end-user agreement, this guide, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end-user license content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated.

2 Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this remember that existing artwork or images that you may want to include in your project may be protected under copyright law. The unauthorized incorporation of such material into your new work could be a violation of the rights of the copyright owner. Please be sure to obtain any permission required from the copyright references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual , the Adobe logo, Flex, Flex Builder and Flash Player are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries.

3 Macintosh is a trademark of Apple Inc., registered in the United States and other countries. All other trademarks are the property of their respective owners. Speech compression and decompression technology licensed from Nellymoser, Inc. ( ).Sorenson Spark video compression and decompression technology licensed from Sorenson Media, browser Copyright 1995-2002 Opera Software ASA and its suppliers. All rights Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USAN otice to government end users. The software and documentation are Commercial Items, as that term is defined at 48 , consisting of Commercial Computer Software and Commercial Computer Software Documentation, as such terms are used in 48 or 48 , as applicable.

4 Consistent with 48 or 48 through , as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to Government end users (a) only as Commercial items and (b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished-rights reserved under the copyright laws of the United States. Adobe Systems Incorporated, 345 Park Avenue, San Jose, CA 95110-2704, USA. For Government End Users, Adobe agrees to comply with all applicable equal opportunity laws including, if appropriate, the provisions of Executive Order 11246, as amended, Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 (38 USC 4212), and Section 503 of the Rehabilitation Act of 1973, as amended, and the regulations at 41 CFR Parts 60-1 through 60-60, 60-250 ,and 60-741.

5 The affirmative action clause and regulations contained in the preceding sentence shall be incorporated by this manual .. 13 Using this manual .. 14 Accessing ActionScript documentation .. 15 ActionScript learning resources .. 17 Chapter 1: Introduction to ActionScript .. 19 About ActionScript .. 19 Advantages of ActionScript .. 20 What s new in ActionScript .. 21 Core language features .. 21 Flash Player API features .. 23 Compatibility with previous versions .. 24 Chapter 2: Getting started with ActionScript ..27 Programming fundamentals..27 What computer programs do ..27 Variables and constants .. 28 Data types .. 29 Working with objects .. 31 Properties .. 31 Methods .. 32 Events.

6 33 Basic event handling .. 34 Examining the event-handling process .. 35 Event-handling examples .. 39 Creating object instances.. 40 Common program elements .. 42 Example: Animation portfolio piece .. 44 Building applications with ActionScript ..47 Options for organizing your code .. 48 Choosing the right tool .. 50 The ActionScript development process .. 51 Creating your own classes .. 53 Strategies for designing a class .. 53 Writing the code for a class .. 544 Suggestions for organizing your classes .. 56 Example: Creating a basic application .. 56 Running subsequent examples .. 63 Chapter 3: ActionScript language and syntax .. 67 Language overview .. 68 Objects and classes .. 69 Packages and namespaces.

7 70 Packages .. 70 Namespaces .. 75 Variables .. 83 Data types .. 87 Type checking .. 88 Dynamic classes .. 93 Data type descriptions .. 94 Type conversions .. 97 Syntax .. 103 Operators .. 109 Conditionals .. 117 Looping .. 119 Functions.. 122 Basic function concepts .. 122 Function parameters .. 128 Functions as objects .. 134 Function scope .. 135 Chapter 4: Object-oriented Programming in ActionScript .. 137 Basics of object-oriented Programming .. 138 Classes.. 140 Class definitions ..141 Class property attributes .. 144 Variables .. 147 Methods .. 148 Enumerations with classes .. 156 Embedded asset classes.. 158 Interfaces.. 158 Inheritance.. 162 Advanced topics .. 171 Example: GeometricShapes.

8 1805 Chapter 5: Working with dates and times.. 191 Basics of dates and times.. 191 Managing calendar dates and times .. 193 Controlling time intervals ..196 Example: Simple analog clock..199 Chapter 6: Working with strings .. 203 Basics of strings .. 204 Creating strings .. 205 The length property .. 207 Working with characters in strings .. 208 Comparing strings .. 208 Obtaining string representations of other objects .. 209 Concatenating strings .. 209 Finding substrings and patterns in strings ..210 Converting strings between uppercase and lowercase .. 215 Example: ASCII art .. 216 Chapter 7: Working with arrays .. 223 Basics of arrays.. 223 Indexed arrays .. 225 Associative arrays .. 234 Multidimensional arrays.

9 239 Cloning arrays .. 241 Advanced topics .. 241 Example: PlayList .. 247 Chapter 8: Handling errors .. 253 Basics of error handling .. 254 Types of errors .. 257 Error handling in ActionScript .. 259 ActionScript error-handling elements .. 260 Error-handling strategies .. 261 Working with the debugger version of Flash Player .. 261 Handling synchronous errors in an application .. 262 Creating custom error classes .. 267 Responding to error events and status .. 2686 Comparing the Error classes .. 272 ECMAS cript core Error classes .. 272 ActionScript core Error classes .. package Error classes .. 276 Example: CustomErrors application .. 278 Chapter 9: Using regular expressions .. 285 Basics of regular expressions.

10 286 Regular expression syntax..288 Creating an instance of a regular expression ..289 Characters, metacharacters, and metasequences .. 290 Character classes ..293 Quantifiers .. 295 Alternation .. 297 Groups .. 297 Flags and properties.. 301 Methods for using regular expressions with strings .. 305 Example: A Wiki parser .. 306 Chapter 10: Handling events .. 313 Basics of handling events .. 314 How ActionScript event handling differs from earlier versions . 317 The event flow .. 320 Event objects ..322 Event listeners .. 327 Example: Alarm Clock ..335 Chapter 11: Working with XML .. 343 Basics of XML .. 344 The E4X approach to XML processing ..348 XML objects .. 350 XMLList objects.


Related search queries