Table of Contents Next Section

Flash Hacks

This collection offers expert Flash tips and tricks for optimization, creating interesting effects, ActionScript programming, sound and video effects, and much more--and you don't need to be an expert to use them (although you'll certainly look like one). Ranging from practical hacks to the fun and quirky, the book covers Flash MX, Flash MX 2004, and Flash MX Professional 2004. If you want more than your average Flash user, Flash Hacks is for you.

    Foreword
    Preface
      Why Flash Hacks?
      Who This Book Is For
      How to Use This Book
      How This Book Is Organized
      Conventions Used in This Book
      Using Code Examples
      Chapter 1.  Visual Effects
      Hacks #1-7
      Section 1.  Fake Per-Pixel Transitions
      Section 2.  Per-Pixel Text Effects
      Section 3.  Simulate Old Film Grain
      Section 4.  Create SWFs from Animated GIFs
      Section 5.  Animate Photoshop PSD Files with Flash
      Section 6.  A Tree Grows in Brooklyn
      Section 7.  Blowin' in the Wind: Simulate Tree Movement
      Chapter 2.  Color Effects
      Hacks #8-13
      Section 8.  Video Color Effects
      Section 9.  Video Fade to Black and Fade to White
      Section 10.  A Custom Color Transform Class
      Section 11.  Create and Organize Custom Swatches
      Section 12.  Borrow Color Schemes from Nature
      Section 13.  Simulate Sepia Effects
      Chapter 3.  Drawing and Masking
      Hacks #14-25
      Section 14.  Create Filled Circles Quickly at Runtime
      Section 15.  Create Synthetic Art
      Section 16.  Create Seamless Tiles
      Section 17.  Fill Areas with Patterns
      Section 18.  Imitate Escher
      Section 19.  Fix Alpha Property Inaccuracies
      Section 20.  Use Complex Shapes as Masks
      Section 21.  Interference Patterns and Ripple Effects
      Section 22.  Feather Bitmap Edges
      Section 23.  Add a Vector Edge to a Bitmap
      Section 24.  Solve the Bitmap-Shift Bug
      Section 25.  A Page-Turn Effect (Exploit Symmetry and Masking)
      Chapter 4.  Animation
      Hacks #26-34
      Section 26.  Smooth Scripted Motion
      Section 27.  Time-Controlled Movement
      Section 28.  Quick, Bandwidth-Efficient Character Animation
      Section 29.  alt-Flash: Motion Graphics Alternatives
      Section 30.  Deja New Animations
      Section 31.  Hacking The Matrix
      Section 32.  Computer-Generated Character Animation
      Section 33.  Particle Effects
      Section 34.  Shape Tweening Complex Shapes
      Chapter 5.  3D and Physics
      Hacks #35-41
      Section 35.  Simulate 3D
      Section 36.  Panoramic Images
      Section 37.  An Optimized 3D Plotter
      Section 38.  Use Acceleration to Simulate Gravity and Friction
      Section 39.  Simulate a Throw
      Section 40.  Detect Multiple Collisions
      Section 41.  Turn Toward a Point
      Chapter 6.  Text
      Hacks #42-51
      Fonts
      Section 42.  Keep Text Legible
      Section 43.  Autocomplete Text Fields
      Section 44.  Store a List of All Input Words
      Section 45.  Import Complex Formatting in Flash
      Section 46.  HTML and CSS in Flash
      Section 47.  Use Accessibility Text as Help Text
      Section 48.  Text Effect Framework
      Section 49.  Typewriter Effect
      Section 50.  Time-Based Text Effects
      Section 51.  Timeline Text Effects
      Chapter 7.  Sound
      Hacks #52-60
      Section 52.  Create a Flash Speech Synthesizer
      Section 53.  A Talking, Lip-Synched Avatar
      Section 54.  The Ubiquitous Sound-Kicker Hack
      Section 55.  Turn Low-Bandwidth Monaural Sounds into Stereo Sounds
      Section 56.  Real-Time Sound Effects
      Section 57.  Quickly Create UI Sounds
      Section 58.  Optimize Sound
      Section 59.  Sound Time Codes (Cue Points)
      Section 60.  A Custom Sound Transform Class
      Chapter 8.  User Interface Elements
      Hacks #61-64
      Section 61.  Amit's Dials (Interactive Testing)
      Section 62.  Right and Middle Mouse Buttons
      Section 63.  Button Movie Clips
      Section 64.  Dude, Where's My Scrollbar?
      Chapter 9.  Performance and Optimization
      Hacks #65-73
      Optimize Filesize and Download Time
      Optimize Graphics
      Increase Code Performance
      Section 65.  Beat Flash File Bloat
      Section 66.  Bandwidth Testing for Complex Sites
      Section 67.  Hide Low-Quality Settings
      Section 68.  Optimize Graphics for Performance
      Section 69.  Benchmark Runtime Performance
      Section 70.  Adjust the Animation Complexity Dynamically
      Section 71.  Performance Budget
      Section 72.  Substitute Bitmaps for Vectors
      Section 73.  Optimize Component Downloading and Usage
      Chapter 10.  ActionScript
      Hacks #74-85
      Changes in Flash MX 2004
      Section 74.  External Script Editors
      Section 75.  Strict Typing and Casual Scripters
      Section 76.  Code Hints
      Section 77.  Clone an Object
      Section 78.  An Idle Timer (Timeout Event)
      Section 79.  Fast ActionScript Searches
      Section 80.  Lock the actions Layer
      Section 81.  Debug with trace( )
      Section 82.  Undocumented ActionScript
      Section 83.  ASnative( ) Back Door
      Section 84.  Obscure Operators
      Section 85.  Import ASC Files as XML
      Chapter 11.  Browser Integration
      Hacks #86-96
      Section 86.  Keep Your Site Browser Friendly
      Section 87.  A Universal Flash Plugin Sniffer
      Section 88.  Test Multiple Flash Plugins
      Section 89.  Preferences and Publishing Defaults
      Section 90.  Center Your SWF Without Scaling
      Section 91.  CSS-Based Browser Centering
      Section 92.  Dynamically Resize Content
      Section 93.  Create HTML Links in Flash
      Section 94.  Integrate the Back Button with Flash
      Section 95.  Give the Flash SWF Keyboard Focus
      Section 96.  Add Key Shortcuts to Your Site
      Chapter 12.  Security
      Hacks #97-100
      Privacy Settings
      Cross-Domain Policy
      Handling Local Executables
      Section 97.  Recover Content from a SWF
      Section 98.  Protect and Obfuscate Your Flash Files
      Section 99.  Make Your SWF Phone Home
      Section 100.  Review Compiled ActionScript
    Index

  Table of Contents Next Section