ActionScript 3.0 Cookbook
Home > Computing and Information Technology > Graphical and digital media applications > Web graphics and design > ActionScript 3.0 Cookbook: (Cookbooks Ser.)
ActionScript 3.0 Cookbook: (Cookbooks Ser.)

ActionScript 3.0 Cookbook: (Cookbooks Ser.)

|
     0     
5
4
3
2
1




International Edition


About the Book

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.

Table of Contents:
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


Best Sellers


Product Details
  • ISBN-13: 9780596526955
  • Publisher: O'Reilly Media
  • Publisher Imprint: O'Reilly Media
  • Height: 231 mm
  • No of Pages: 586
  • Returnable: Y
  • Spine Width: 31 mm
  • ISBN-10: 0596526954
  • Publisher Date: 31 Oct 2006
  • Binding: Paperback
  • Language: English
  • Returnable: Y
  • Series Title: Cookbooks Ser.
  • Width: 179 mm


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
ActionScript 3.0 Cookbook: (Cookbooks Ser.)
O'Reilly Media -
ActionScript 3.0 Cookbook: (Cookbooks Ser.)
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

ActionScript 3.0 Cookbook: (Cookbooks Ser.)

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!