ActionScript 3.0 Cookbook
O'Reilly Media (Verlag)
978-0-596-52695-5 (ISBN)
Well before Ajax and Microsoft's Windows Presentation Foundation hit the scene, Macromedia offered the first method for building web pages with the responsiveness and functionality of desktop programs with its Flash-based "Rich Internet Applications". Now, new owner Adobe is taking Flash and its powerful capabilities beyond the Web and making it a full-fledged development environment. Rather than focus on theory, the ActionScript 3.0 Cookbook concentrates on the practical application of ActionScript, with more than 300 solutions you can use to solve a wide range of common coding dilemmas. You'll find recipes that show you how to: Detect the user's Flash Player version or their operating system Build custom classes Format dates and currency types Work with strings Build user interface components Work with audio and video Make remote procedure calls using Flash Remoting and web services Load, send, and search XML data And much, much more ...Each code recipe presents the Problem, Solution, and Discussion of how you can use it in other ways or personalize it for your own needs, and why it works.
You can quickly locate the recipe that most closely matches your situation and get the solution without reading the whole book to understand the underlying code. Solutions progress from short recipes for small problems to more complex scripts for thornier riddles, and the discussions offer a deeper analysis for resolving similar issues in the future, along with possible design choices and ramifications. You'll even learn how to link modular ActionScript pieces together to create rock-solid solutions for Flex 2 and Flash applications. When you're not sure how ActionScript 3.0 works or how to approach a specific programming dilemma, you can simply pick up the book, flip to the relevant recipe(s), and quickly find the solution you're looking for. Adobe Developer Library is a co-publishing partnership between O'Reilly Media and Adobe Systems, Inc. and is designed to produce the number one information resources for developers who use Adobe technologies. Created in 2006, the Adobe Developer Library is the official source for comprehensive learning solutions to help developers create expressive and interactive web applications that can reach virtually anyone on any platform.
With top-notch books and innovative online resources covering the latest in rich Internet application development, the Adobe Developer Library offers expert training and in-depth resources, straight from the source.
Joey Lott is the author of Complete Flash Remoting MX as well as the co-author of the ActionScript Bible. Joey has been teaching Flash and ActionScript since 1999 when he first began training throughout Southern California. Joey has professional experience in the Internet industry beginning in 1996 including co-founding RightSpring, Inc. and consulting for YourMobile/Premium Wireless Services (J2EE B2C application) and Ads.com (leading the development of a J2EE B2B application). Darron Schall has a BS in Computer Science from Lehigh University. Darron is an independent consultant specializing in Rich Internet Applications and Flash Platform development. He maintains a Flash Platform related weblog at http://www.darronschall.com and is an active voice in the Flash and Flex communities Keith Peters is currently working full time doing freelance and contract Flash development and various writing projects. His experimental Flash site, BIT-101 (www.bit-101.com) won an award at the Flashforward 2003 Flash Film Festival in the Experimental category. In addition to the experiments on the site, there are several highly regarded Flash tutorials which have been translated into many languages and are now posted on web sites throughout the world. Keith has authored or contributed to several books on Flash and ActionScript.
Preface 1. ActionScript Basics 1.1 Creating an ActionScript Project 1.2 Customizing the Properties of an Application 1.3 Where to Place ActionScript Code 1.4 How to Trace a Message 1.5 Handling Events 1.6 Responding to Mouse and Key Events 1.7 Using Mathematical Operators 1.8 Checking Equality or Comparing Values 1.9 Performing Actions Conditionally 1.10 Performing Complex Conditional Testing 1.11 Repeating an Operation Many Times 1.12 Repeating a Task over Time 1.13 Creating Reusable Code 1.14 Generalizing a Method to Enhance Reusability 1.15 Exiting a Method 1.16 Obtaining the Result of a Method 1.17 Handling Errors 2. Custom Classes 2.1 Creating a Custom Class 2.2 Determining Where to Save a Class 2.3 Creating Properties That Behave As Methods 2.4 Creating Static Methods and Properties 2.5 Creating Subclasses 2.6 Implementing Subclass Versions of Superclass Methods 2.7 Creating Constants 2.8 Dispatching Events 3. Runtime Environment 3.1 Detecting the Player Version 3.2 Detecting the Operating System 3.3 Checking the Player Type 3.4 Checking the System Language 3.5 Detecting Display Settings 3.6 Scaling the Movie 3.7 Changing the Alignment 3.8 Hiding the Flash Player's Menu Items 3.9 Detecting the Device's Audio Capabilities 3.10 Detecting the Device's Video Capabilities 3.11 Prompting the User to Change Player Settings 3.12 Dealing with System Security 4. Numbers and Math 4.1 Representing Numbers in Different Bases 4.2 Converting Between Different Number Systems 4.3 Rounding Numbers 4.4 Inserting Leading or Trailing Zeros or Spaces 4.5 Formatting Numbers for Display Without a Mask 4.6 Formatting Currency Amounts 4.7 Generating a Random Number 4.8 Simulating a Coin Toss 4.9 Simulating Dice 4.10 Simulating Playing Cards 4.11 Generating a Unique Number 4.12 Converting Angle Measurements 4.13 Calculating the Distance Between Two Points 4.14 Determining Points Along a Circle 4.15 Converting Between Units of Measurement5. Arrays 5.1 Adding Elements to the Start or End of an Array 5.2 Looping Through an Array 5.3 Searching for Matching Elements in an Array 5.4 Removing Elements 5.5 Inserting Elements in the Middle of an Array 5.6 Converting a String to an Array 5.7 Converting an Array to a String 5.8 Creating a Separate Copy of an Array 5.9 Storing Complex or Multidimensional Data 5.10 Sorting or Reversing an Array 5.11 Implementing a Custom Sort 5.12 Randomizing the Elements of an Array 5.13 Getting the Minimum or Maximum Element 5.14 Comparing Arrays 5.15 Creating an Associative Array 5.16 Reading Elements of an Associative Array 6. Display List 6.1 Adding an Item to the Display List 6.2 Removing an Item from the Display List 6.3 Moving Objects Forward and Backward 6.4 Creating Custom Visual Classes 6.5 Creating Simple Buttons 6.6 Loading External Images at Runtime 6.7 Loading and Interacting with External Movies 6.8 Creating Mouse Interactions 6.9 Dragging and Dropping Objects with the Mouse 7. Drawing and Masking 7.1 Setting a Line Style 7.2 Setting Gradient Line Styles 7.3 Drawing a Line 7.4 Drawing a Curve 7.5 Drawing an Arc 7.6 Drawing a Rectangle 7.7 Drawing a Circle 7.8 Drawing an Ellipse 7.9 Drawing a Triangle 7.10 Drawing Regular Polygons 7.11 Drawing a Star 7.12 Filling a Shape with a Solid or Translucent Color 7.13 Filling a Shape with a Gradient 7.14 Filling a Shape with a Bitmap 7.15 Scripting Masks 8. Bitmaps 8.1 Creating a BitmapData Object 8.2 Adding a Bitmap to the Display List 8.3 Drawing a Display Object to a Bitmap 8.4 Loading an External Image into a Bitmap 8.5 Manipulating Pixels 8.6 Creating Rectangular Fills 8.7 Creating a Flood Fill 8.8 Copying Pixels 8.9 Copying Channels 8.10 Creating Noise 8.11 Creating Perlin Noise 8.12 Using Threshold 8.13 Applying a Filter to a Bitmap 8.14 Dissolving Between Two Bitmaps 8.15 Scrolling a Bitmap 9. Text 9.1 Creating an Outline Around a Text Field 9.2 Creating a Background for a Text Field 9.3 Making a User Input Field 9.4 Making a Password Input Field 9.5 Filtering Text Input 9.6 Setting a Field's Maximum Length 9.7 Displaying Text 9.8 Displaying HTML-Formatted Text 9.9 Condensing Whitespace 9.10 Sizing Text Fields to Fit Contents 9.11 Scrolling Text Programmatically 9.12 Responding to Scroll Events 9.13 Formatting Text 9.14 Formatting User-Input Text 9.15 Formatting a Portion of Existing Text 9.16 Setting a Text Field's Font 9.17 Embedding Fonts 9.18 Creating Text That Can Be Rotated 9.19 Displaying Unicode Text 9.20 Assigning Focus to a Text Field 9.21 Selecting Text with ActionScript 9.22 Setting the Insertion Point in a Text Field 9.23 Responding When Text Is Selected or Deselected 9.24 Responding to User Text Entry 9.25 Adding a Hyperlink to Text 9.26 Calling ActionScript from Hyperlinks 9.27 Working with Advanced Text Layout 9.28 Applying Advanced Anti-Aliasing 9.29 Replacing Text 9.30 Retrieving a List of System Fonts 10. Filters and Transforms 10.1 Applying Color Changes 10.2 Applying Color Tints 10.3 Resetting Color 10.4 Shearing 10.5 Applying Basic Filters 10.6 Applying Advanced Filter Effects (Emboss, etc.) 10.7 Embossing 10.8 Detecting Edges 10.9 Sharpening 10.10 Making a Digital Negative 10.11 Applying Grayscale 10.12 Changing Saturation 10.13 Changing Brightness 10.14 Changing Contrast 11. Programmatic Animation 11.1 Moving an Object 11.2 Moving an Object in a Specific Direction 11.3 Easing 11.4 Acceleration 11.5 Springs 11.6 Using Trigonometry 11.7 Applying Animation Techniques to Other Properties 12. Strings 12.1 Joining Strings 12.2 Using Quotes and Apostrophes in Strings 12.3 Inserting Special Whitespace Characters 12.4 Searching for a Substring 12.5 Extracting a Substring 12.6 Parsing a String into Words 12.7 Removing and Replacing Characters and Words 12.8 Retrieving One Character at a Time 12.9 Converting Case 12.10 Trimming Whitespace 12.11 Reversing a String by Word or by Character 12.12 Converting Between Strings and Unicode or ASCII 13. Regular Expressions 13.1 Understanding Regular Expression Patterns 13.2 Testing Regular Expressions 13.3 Looking for Pattern Matches 13.4 Removing and Replacing Characters and Words Using Patterns 13.5 Creating a Nongreedy Pattern 13.6 Validating User Input with Common Patterns 14. Dates and Times 14.1 Finding the Current Date and Time 14.2 Retrieving the Date Values 14.3 Retrieving the Day or Month Name 14.4 Formatting the Date and Time 14.5 Formatting Seconds or 17. Storing Persistent Data 17.1 Creating and Opening a Local Shared Object 17.2 Writing Data to a Shared Object 17.3 Saving a Local Shared Object 17.4 Reading Data from a Shared Object 17.5 Removing Data from a Shared Object 17.6 Serializing Custom Classes 17.7 Sharing Data Between Flash Applications 17.8 Controlling the Size of Local Shared Objects 18. Communicating with Other Movies 18.1 Creating Local Connections 18.2 Sending Data 18.3 Validating Receipt of Communication over Local Connections 18.4 Accepting Local Communications from Other Domains 19. Sending and Loading Data 19.1 Loading Variables from a Text File 19.2 Loading Variables from a Server-Side Script 19.3 Loading a Block of Text (Including HTML and XML) 19.4 Checking Load Progress 19.5 Accessing Data Being Downloaded 19.6 Sending Data to a Server-Side Script 19.7 Sending Variables and Handling a Returned Result 20. XML 20.1 Understanding XML Structure (Reading and Writing XML) 20.2 Creating an XML Object 20.3 Adding Elements to an XML Object 20.4 Adding Text Nodes to an XML Object 20.5 Adding Attributes to an XML Element 20.6 Reading Elements in an XML Tree 20.7 Finding Elements by Name 20.8 Reading Text Nodes and Their Values 20.9 Reading an Element's Attributes 20.10 Removing Elements, Text Nodes, and Attributes 20.11 Loading XML 20.12 Loading XML from Different Domains 20.13 Sending XML 20.14 Searching XML 20.15 Using HTML and Special Characters in XML 21. Web Services and Flash Remoting 21.1 Calling Web Services Methods 21.2 Handling Web Services Responses 21.3 Handling Web Services Errors 21.4 Calling Flash Remoting Methods 21.5 Handling Flash Remoting Responses 22. Building Integrated Applications 22.1 Calling JavaScript Functions 22.2 Calling ActionScript Functions 22.3 Passing Parameters from HTML 23. File Management 23.1 Downloading Files 23.2 Detecting When a User Selects a File to Upload 23.3 Monitoring Download Progress 23.4 Browsing for Files 23.5 Filtering Files That Display in the Browser Window 23.6 Detecting When the User Has Selected a File to Upload 23.7 Uploading Files 23.8 Monitoring File Upload Progress 24. Socket Programming 24.1 Connecting to a Socket Server 24.2 Sending Data 24.3 Receiving Data 24.4 Handshaking with a Socket Server 24.5 Disconnecting from a Socket Server 24.6 Handling Socket Errors Appendix. Unicode Escape Sequences for Latin 1 Characters Index
Erscheint lt. Verlag | 31.10.2006 |
---|---|
Reihe/Serie | Adobe Developer Library |
Verlagsort | Sebastopol |
Sprache | englisch |
Einbandart | Paperback |
Themenwelt | Informatik ► Grafik / Design ► Film- / Video-Bearbeitung |
Informatik ► Web / Internet ► Web Design / Usability | |
ISBN-10 | 0-596-52695-4 / 0596526954 |
ISBN-13 | 978-0-596-52695-5 / 9780596526955 |
Zustand | Neuware |
Haben Sie eine Frage zum Produkt? |
aus dem Bereich