Tài liệu Using Flash MX doc

438 359 1
Tài liệu Using Flash MX doc

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

macromedia ™ ® Using Flash Trademarks Afterburner, AppletAce, Attain, Attain Enterprise Learning System, Attain Essentials, Attain Objects for Dreamweaver, Authorware, Authorware Attain, Authorware Interactive Studio, Authorware Star, Authorware Synergy, Backstage, Backstage Designer, Backstage Desktop Studio, Backstage Enterprise Studio, Backstage Internet Studio, Design in Motion, Director, Director Multimedia Studio, Doc Around the Clock, Dreamweaver, Dreamweaver Attain, Drumbeat, Drumbeat 2000, Extreme 3D, Fireworks, Flash, Fontographer, FreeHand, FreeHand Graphics Studio, Generator, Generator Developer’s Studio, Generator Dynamic Graphics Server, Knowledge Objects, Knowledge Stream, Knowledge Track, Lingo, Live Effects, Macromedia, Macromedia M Logo & Design, Macromedia Flash, Macromedia Xres, Macromind, Macromind Action, MAGIC, Mediamaker, Object Authoring, Power Applets, Priority Access, Roundtrip HTML, Scriptlets, SoundEdit, ShockRave, Shockmachine, Shockwave, Shockwave Remote, Shockwave Internet Studio, Showcase, Tools to Power Your Ideas, Universal Media, Virtuoso, Web Design 101, Whirlwind and Xtra are trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words or phrases mentioned within this publication may be trademarks, servicemarks, or tradenames of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. Third-Party Information Speech compression and decompression technology licensed from Nellymoser, Inc. (www.nellymoser.com). Sorenson™ Spark™ video compression and decompression technology licensed from Sorenson Media, Inc. This guide contains links to third-party Web sites that are not under the control of Macromedia, and Macromedia is not responsible for the content on any linked site. If you access a third-party Web site mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites. Apple Disclaimer APPLE COMPUTER, INC. MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING THE ENCLOSED COMPUTER SOFTWARE PACKAGE, ITS MERCHANTABILITY OR ITS FITNESS FOR ANY PARTIC- ULAR PURPOSE. THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES. THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. THIS WARRANTY PROVIDES YOU WITH SPECIFIC LEGAL RIGHTS. THERE MAY BE OTHER RIGHTS THAT YOU MAY HAVE WHICH VARY FROM STATE TO STATE. Copyright © 2002 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced, translated, or converted to any electronic or machine-readable form in whole or in part without prior written approval of Macromedia, Inc. Acknowledgments Director: Erick Vera Producer: Wayne Wieseler Writing: Jody Bleyle, JuLee Burdekin, Mary Burger, Dale Crawford, Marcelle Taylor Instructional Design: Stephanie Gowin, Barbara Nelson Editing: Rosana Francescato, Lisa Stanziano, Anne Szabla Multimedia Design and Production: Aaron Begley, Benjamin Salles, Noah Zilberberg Print Design and Production: Chris Basmajian, Caroline Branch First Edition: February 2002 Macromedia, Inc. 600 Townsend St. San Francisco, CA 94103 3 CONTENTS INTRODUCTION Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 System requirements for Flash authoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 System requirements for the Flash Player. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Installing Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 What’s new in Flash MX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Guide to instructional media. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Launching Flash on a network. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 CHAPTER 1 Working in Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Artwork in Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Animation in Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Interactive movies in Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Application development in Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 The Stage and workspace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Creating a new document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Setting preferences in Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Using the Property inspector to change document attributes . . . . . . . . . . . . . . . . . . . . . 24 Customizing keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Using scenes and the Scene panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Using the Timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Using frames and keyframes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Using layers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Previewing and testing movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Using the Movie Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Speeding up movie display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Saving Flash documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Configuring a server for the Flash Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Printing Flash documents as you edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 CHAPTER 2 Working with Flash assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Assets and asset management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Panels and the Property inspector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Using the toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Using context menus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Using the library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 About components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Contents4 CHAPTER 3 Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 About vector and bitmap graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Flash drawing and painting tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 About overlapping shapes in Flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Drawing with the Pencil tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Drawing straight lines, ovals, and rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Using the Pen tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Painting with the Brush tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Reshaping lines and shape outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Erasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Modifying shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Snapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Choosing drawing settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 CHAPTER 4 Working with Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Using the Stroke Color and Fill Color controls in the toolbox. . . . . . . . . . . . . . . . . . . . 77 Using the Stroke Color and Fill Color controls in the Property inspector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Working with solid colors and gradient fills in the Color Mixer. . . . . . . . . . . . . . . . . . . 80 Modifying strokes with the Ink Bottle tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Applying solid, gradient, and bitmap fills with the Paint Bucket tool. . . . . . . . . . . . . . . 83 Transforming gradient and bitmap fills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Copying strokes and fills with the Eyedropper tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Locking a gradient or bitmap to fill the Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Modifying color palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 CHAPTER 5 Using Imported Artwork and Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Placing artwork into Flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Working with imported bitmaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Importing video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 CHAPTER 6 Adding Sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Importing sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Adding sounds to a movie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Adding sounds to buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Using sounds with Sound objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Using the sound-editing controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Starting and stopping sounds at keyframes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 About the onSoundComplete event. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Compressing sounds for export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 CHAPTER 7 Working with Graphic Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Selecting objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Grouping objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Moving, copying, and deleting objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Contents 5 Stacking objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 Transforming objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Flipping objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Restoring transformed objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Aligning objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Breaking apart groups and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 CHAPTER 8 Working with Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 About embedded fonts and device fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Creating text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Setting text attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Creating font symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Editing text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 About transforming text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Breaking text apart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Linking text to a URL (horizontal text only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Substituting missing fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 CHAPTER 9 Using Symbols, Instances, and Library Assets . . . . . . . . . . . . . . . . . . . . . . . 149 Types of symbol behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Creating symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Creating instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Creating buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Enabling, editing, and testing buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Editing symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Changing instance properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Breaking apart instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Getting information about instances on the Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Copying library assets between movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Using shared library assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Resolving conflicts between library assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 CHAPTER 10 Creating Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 About tweened animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 About frame-by-frame animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 About layers in animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Creating keyframes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Representations of animations in the Timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 About frame rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Extending still images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Distributing objects to layers for tweened animation . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Tweening instances, groups, and type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Tweening motion along a path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Tweening shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Using shape hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Creating frame-by-frame animations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 Editing animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Using mask layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Contents6 CHAPTER 11 Writing Scripts with ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Using the Actions panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Using an external text editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 About syntax highlighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 Setting Actions panel preferences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 Using code hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Assigning actions to a frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Assigning actions to a button. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 Assigning actions to a movie clip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 CHAPTER 12 Understanding the ActionScript Language . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Differences between ActionScript and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 About scripting in ActionScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 ActionScript terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Deconstructing a sample script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 Using ActionScript syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 About data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 About variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 Using operators to manipulate values in expressions . . . . . . . . . . . . . . . . . . . . . . . . . . 223 Using actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 Writing a target path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 Controlling flow in scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 Using built-in functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 Creating functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 About built-in objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 About custom objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 Using Flash MX ActionScript with older versions of Flash. . . . . . . . . . . . . . . . . . . . . . 242 CHAPTER 13 Working with Movie Clips and Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 About multiple Timelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 Using actions and methods to control movie clips . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 Handling events with ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Manipulating buttons with ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 CHAPTER 14 Creating Interaction with ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Controlling movie playback. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Creating complex interactivity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 CHAPTER 15 Using Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 Working with components in Flash MX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 Adding components to Flash documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 Deleting components from Flash documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 About component label size and component width and height . . . . . . . . . . . . . . . . . . 296 The CheckBox component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 The ComboBox component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 Contents 7 The ListBox component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 The PushButton component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 The RadioButton component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 The ScrollBar component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 The ScrollPane component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 Writing change handler functions for components . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 Customizing component colors and text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 Customizing component skins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 Creating forms using components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 CHAPTER 16 Connecting with External Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 Sending and loading variables to and from a remote source . . . . . . . . . . . . . . . . . . . . 319 Sending messages to and from the Flash Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 CHAPTER 17 Creating Printable Movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 Printing from the Flash Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 Adding a Print action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 Printing from the Flash Player context menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 About publishing a movie with printable frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 CHAPTER 18 Creating Accessible Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 About the Macromedia Flash Accessibility Web page. . . . . . . . . . . . . . . . . . . . . . . . . . 341 About screen reader technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 About accessible objects in Flash movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 Supported configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 Specifying basic accessibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 Specifying advanced accessibility options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 Suggestions for creating effective accessibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Testing accessible content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 CHAPTER 19 Testing a movie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 Optimizing movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 Testing movie download performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 Authoring and scripting guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 Using the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 Using the Output window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 CHAPTER 20 Publishing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Playing your Flash movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Unicode text encoding in Flash movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 Publishing Flash documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 About HTML publishing templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 Customizing HTML publishing templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 Editing Flash HTML settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 Previewing the publishing format and settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Contents8 Using the stand-alone player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Configuring a Web server for Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 Screening traffic to your Web site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 CHAPTER 21 Exporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 Exporting movies and images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 About export file formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 Updating Flash movies for Dreamweaver UltraDev . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 APPENDIX A Keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 Navigation keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 Action keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 Mouse actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 Menu items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 APPENDIX B Operator Precedence and Associativity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 APPENDIX C Keyboard Keys and Key Code Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 Letters A to Z and standard numbers 0 to 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 Keys on the numeric keypad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 Function keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 Other keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 APPENDIX D Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 9 INTRODUCTION Getting Started Macromedia Flash MX is the professional standard authoring tool for producing high-impact Web experiences. Whether you are creating animated logos, Web site navigation controls, long-form animations, entire Flash Web sites, or Web applications, you’ll find the power and flexibility of Flash ideal for your own creativity. System requirements for Flash authoring The following hardware and software are required to author Flash movies: • For Microsoft ® Windows: An Intel Pentium 200 MHz or equivalent processor running Windows 98 SE, Windows ME, Windows NT 4.0, Windows 2000, or Windows XP; 64 MB of RAM (128 MB recommended); 85 MB of available disk space; a 16-bit color monitor capable of 1024 x 768 resolution; and a CD-ROM drive. • For the Macintosh: A Power Macintosh running Mac OS 9.1 (or later) or Mac OS X version 10.1 (or later); 64 MB RAM free application memory (128 MB recommended), plus 85 MB of available disk space; a color monitor capable of displaying 16-bit (thousands of colors) at 1024 x 768 resolution; and a CD-ROM drive. System requirements for the Flash Player The following hardware and software are required to play Flash movies in a browser: • Microsoft Windows 95, Windows 98, Windows ME, Windows NT 4.0, Windows 2000, or Windows XP or later; or a Macintosh PowerPC with System 8.6 or later (including OS X 10.1 or later). • Netscape plug-in that works with Netscape 4 (or later) in Windows, or works with Netscape 4.5 (or later) or Internet Explorer 5.0 (or later) on the Mac OS. • To run ActiveX controls, Microsoft ® Internet Explorer 4 or later (Windows 95, Windows 98, Windows Me, Windows NT4, Windows 2000, Windows XP, or later). • AOL 7 on Windows, AOL 5 on the Mac OS • Opera 6 on Windows, Opera 5 on the Mac OS Introduction10 Installing Flash Follow these steps to install Flash on either a Windows or a Macintosh computer. To install Flash on a Windows or a Macintosh computer: 1 Insert the Flash CD into the computer’s CD-ROM drive. 2 Do one of the following: • In Windows, choose Start > Run. Click Browse and choose the Flash MX Installer.exe file on the Flash MX CD. Click OK in the Run dialog box to begin the installation. • On the Macintosh, double-click the Flash MX Installer icon. 3 Follow the onscreen instructions. 4 If prompted, restart your computer. What’s new in Flash MX New features in Flash MX enhance the approachability, creativity, and power of Flash. Designers who require a higher level of control and integration with industry-standard design tools now have an unparalleled creative application for creating media-rich content. Powerful new features build on this creativity, giving application developers access to new capabilities that make Flash MX a robust and exciting application development environment. Developers can work with advanced scripting and debugging tools, built-in code reference, and predefined components to rapidly deploy rich Web applications. For all Flash users The ability to save Flash MX documents in Flash 5 format lets you upgrade now and still collaborate with designers who are working on Flash 5 projects. See “Saving Flash documents” on page 43. Accessible content that can be seen and heard by persons with disabilities is now easy to develop, expanding the audience for Flash movies and applications. See “About accessible objects in Flash movies” under Help > Using Flash. Korean and Chinese language support reaches audiences in more of the world. Features like vertical text fields and Unicode support make it easy to create Asian-language content. See “Creating text” on page 136. For the designer Flash MX enhances creativity by providing designers with a higher level of control and expanded integration capabilities with a rich set of design tools. New features help designers quickly create a broad range of content. Instead of focusing on how Flash works, they can give more attention to their designs. Timeline enhancements such as folders for organizing layers, improved pointer feedback, and the ability to resize, cut, and paste multiple frames make it easier to use the Timeline, helping you work faster and with less effort. See “Using the Timeline” on page 28. Enhanced editing of symbols in place makes document creation easier by letting designers work on symbols in the context of their movies. New controls above the Stage make it easier than ever to edit symbols in place. See “Editing symbols” on page 157. [...]... third-party resources on Flash Macromedia Flash community sites: www.macromedia.com/support /flash/ ts/documents /flash_ websites.htm www.macromedia.com/support /flash/ ts/documents/tn4148-flashmaillists.html Macromedia Flash books: www.macromedia.com/software /flash/ productinfo/books/ Object-oriented programming concepts: http://java.sun.com/docs/books/tutorial/java/concepts Launching Flash on a network If... with the Flash scripting language Using Flash Help Flash Help contains two main sections: Using Flash and the ActionScript Dictionary For the best experience with Flash Help, Macromedia strongly recommends that you use a browser with Java player support, such as Internet Explorer 4.5 or later Flash Help also supports Netscape Navigator 6.1 or later on Windows and Macintosh Running Flash and Flash Help... easily collapsible panels that dock and undock as necessary to conserve screen space Designers can even save custom panel layouts to personalize their Flash workspace See Using panels” on page 48 New starter templates included with Flash MX simplify the creation of new documents by eliminating many of the common tasks required to start a new document See “Creating a new document” on page 21 You can... design, and test interactive content Flash documents are not the movies the Flash Player displays Instead, you publish your FLA documents as Flash movies, which have the swf filename extension and contain only the information needed to display the movie For an interactive introduction to Flash, choose Help > Lessons > Getting Started with Flash Artwork in Flash Flash provides a variety of methods for... vector graphics, bitmap graphics, and video from other applications and modify the imported graphics in Flash. See Using Imported Artwork and Video” under Help > Using Flash Note: You can also import sound files, as described in “Importing sounds” under Help > Using Flash Animation in Flash Using Flash, you can animate objects to make them appear to move across the Stage and/or change their shape, size,... a template as a new document You can choose from standard templates that ship with Flash, or open a template you have saved previously For information on saving a document file as a template, see “Saving Flash documents” on page 43 To create a new document and set its properties: 1 Choose File > New 2 Choose Modify > Document The Document Properties dialog box appears Working in Flash 21 3 For Frame... topics within a section • The Flash icon links you to the Flash Support Center Web site Using Flash lessons and tutorials Flash lessons provide quick interactive instruction that introduces you to the main features of Flash, letting you practice on isolated examples If you are new to Flash, or if you have used only a limited set of its features, start with the lessons Flash tutorials provide in-depth... have Flash warn you when you try to save documents with Flash MX specific content to a Flash 5 file This option is selected by default • Select Warn on Missing Fonts to have Flash warn you when you open a Flash document that uses fonts that are not installed on your computer This option is selected by default • Select Warn on Loss of Expert Mode Formatting to have Flash warn you of any expert mode formatting... that appears in the printed version of Using Flash is primarily intended for users who are in their first three to six months of learning Flash Online lessons and tutorials supplement this information The electronic version of Using Flash contains all of the information in the printed version, as well as additional chapters with instructions and information for using Flash tools and commands It also includes... movie.See “Placing artwork into Flash and “Importing sounds” under Help > Using Flash. See “Placing artwork into Flash and “Importing sounds” under Help > Using Flash Enhanced ActionScript Anchor points enhance navigation in Flash movies by letting users use the Forward and Back buttons in their browsers to jump from anchor to anchor See Using named anchors” on page 33 The improved ActionScript editor makes . resources on Flash. Macromedia Flash community sites: www.macromedia.com/support /flash/ ts/documents /flash_ websites.htm www.macromedia.com/support /flash/ ts/documents/tn4148-flashmaillists.html. artwork into Flash and “Importing sounds” under Help > Using Flash. See “Placing artwork into Flash and “Importing sounds” under Help > Using Flash. Anchor

Ngày đăng: 21/12/2013, 04:19

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan