Detailed instructions for use are in the User's Guide.
Getting Started with Flash
Trademarks 1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central, ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite, FlashPaper, Flash Video Encoder, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder, Macromedia, MXML, RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit, Studio MX, UltraDev, and WebHelp are either registered trademarks or 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, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. Third-Party Information This guide contains links to third-party websites 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 website 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. Speech compression and decompression technology licensed from Nellymoser, Inc. (www.nellymoser.com). SorensonTM SparkTM video compression and decompression technology licensed from Sorenson Media, Inc. Opera ® browser Copyright © 1995-2002 Opera Software ASA and its suppliers. All rights reserved. Macromedia Flash 8 video is powered by On2 TrueMotion video technology. © 1992-2005 On2 Technologies, Inc. All Rights Reserved. http://www.on2.com. Visual SourceSafe is a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries. Copyright © 2005 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 written approval from Macromedia, Inc. Notwithstanding the foregoing, the owner or authorized user of a valid copy of the software with which this manual was provided may print out one copy of this manual from an electronic version of this manual for the sole purpose of such owner or authorized user learning to use such software, provided that no part of this manual may be printed out, reproduced, distributed, resold, or transmitted for any other purposes, including, without limitation, commercial purposes, such as selling copies of this documentation or providing paid-for support services. Part Number ZPF80M100A Acknowledgments Project Management: Sheila McGinn Writing: Jay Armstrong Managing Editor: Rosana Francescato Lead Editor: Lisa Stanziano Editing: Geta Carlson, Evelyn Eldridge, Mark Nigara Production Management: Patrice O'Neill, Kristin Conradi, Yuko Yagi Media Design and Production: Adam Barnett, Aaron Begley, Paul Benkman. John Francis, Geeta Karmarkar, Masayo Noda, Paul Rangel, Arena Reed, Mario Reynoso Special thanks to Jody Bleyle, Mary Burger, Lisa Friendly, Stephanie Gowin, Bonnie Loo, Mary Ann Walsh, Erick Vera, the beta testers, and the entire Flash and Flash Player engineering and QA teams. First Edition: September 2005 Macromedia, Inc. 601 Townsend St. San Francisco, CA 94103
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 What is Flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 What you can do with Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Making a simple Flash document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 About Flash Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 What's new in Flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Installing Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Chapter 1: Learning Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27 Where to start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Get the most from the Flash documentation . . . . . . . . . . . . . . . . . . . . . 33 Accessing the Flash documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Accessing additional online Flash resources . . . . . . . . . . . . . . . . . . . . . 39 Choosing the right help books . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Using the Flash help system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Opening the Help panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Searching the help system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Using context-sensitive help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Printing the Flash documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Purchasing printed documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Discussing the Flash documentation with LiveDocs . . . . . . . . . . . . . . 46 Controlling the appearance of the Help panel . . . . . . . . . . . . . . . . . . . . .47 Getting updates to Flash Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Chapter 2: Flash Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 About Flash files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Getting to know the workspace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3
Chapter 3: Tutorial: Building Your First Flash Application . . . . .95 Review your task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Examine the completed application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Create a working folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Create a new document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Create symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Edit a symbol Timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Add actions to frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Add labels to frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Add motion tweens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110 Edit the main Timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 Create the border. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113 Add a symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 Add a text box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Add the movie clip to the Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Add a button component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Add ActionScript code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 Publish your document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 Chapter 4: Tutorial: Building a Video Player (Flash Professional only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Review your task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Examine the completed application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Create a working folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Encode a video file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Create a new Flash document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Add a media component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 Publish your document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 The next steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
4
Contents
Introduction
Welcome to Macromedia Flash Basic 8 and Macromedia Flash Professional 8. Flash provides everything you need to create and deliver rich web content and powerful applications. Whether you're designing motion graphics or building data-driven applications, Flash has the tools to produce great results and deliver the best user experience across multiple platforms and devices. This guide is designed to introduce you to Flash. The tutorial in this guide leads you through the process of creating a simple Flash application. This chapter contains the following sections:
What is Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 What you can do with Flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Making a simple Flash document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 About Flash Player. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 What's new in Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 Installing Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
What is Flash
Flash is an authoring tool that designers and developers use to create presentations, applications, and other content that enables user interaction. Flash projects can include simple animations, video content, complex presentations, applications, and everything in between. In general, individual pieces of content made with Flash are called applications, even though they might only be a basic animation. You can make media-rich Flash applications by including pictures, sound, video, and special effects.
5
Flash is extremely well suited to creating content for delivery over the Internet because its files are very small. Flash achieves this through its extensive use of vector graphics. Vector graphics require significantly less memory and storage space than bitmap graphics because they are represented by mathematical formulas instead of large data sets. Bitmap graphics are larger because each individual pixel in the image requires a separate piece of data to represent it. To build an application in Flash, you create graphics with the Flash drawing tools and import additional media elements into your Flash document. Next, you define how and when you want to use each of those elements to create the application you have in mind. When you author content in Flash, you work in a Flash document file. Flash documents have the file extension .fla (FLA). A Flash document has four main parts:
The Stage
is where your graphics, videos, buttons, and so on appear during playback. The Stage is described further in "Flash Basics" on page 49.
The Timeline is where you tell Flash when you want the graphics and other
elements of your project to appear. You also use the Timeline to specify the layering order of graphics on the Stage. Graphics in higher layers appear on top of graphics in lower layers.
The Library panel is where Flash displays a list of the media elements in your Flash document. ActionScript code allows you to add interactivity to the media elements in your document. For example, you can add code that causes a button to display a new image when the user clicks it. You can also use ActionScript to add logic to your applications. Logic enables your application to behave in different ways depending on the user's actions or other conditions. Flash includes two versions of ActionScript, each suited to an author's specific needs. For more information about writing ActionScript, see Learning ActionScript 2.0 in Flash in the Help panel.
Flash includes many features that make it powerful but easy to use, such as prebuilt drag-and-drop user interface components, built-in behaviors th ...