p. 1
cd-rom included · exercise example files · actionscript 3.0 code samples and more full-color insert · sixteen-page full-color insert with cutting-edge examples robert reinhardt and snow dowd adobe ® flash cs4 ® professional become f luent in the flash workspace master actionscript and build a game ® integrate xml data with flash movies the book you need to succeed!
[close]
p. 3
adobe flash cs4 professional bible ® ®
[close]
p. 5
adobe flash cs4 professional bible ® ® robert reinhardt and snow dowd
[close]
p. 6
adobe® flash® cs4 professional bible published by wiley publishing inc 111 river st hoboken nj 07030-5774 www.wiley.com copyright © 2009 by wiley publishing inc indianapolis indiana isbn 978-0-470-37918-9 manufactured in the united states of america 10 9 8 7 6 5 4 3 2 1 published by wiley publishing inc indianapolis indiana published simultaneously in canada no part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means electronic mechanical photocopying recording scanning or otherwise except as permitted under sections 107 or 108 of the 1976 united states copyright act without either the prior written permission of the publisher or authorization through payment of the appropriate per-copy fee to the copyright clearance center 222 rosewood drive danvers ma 01923 978 750-8400 fax 978 646-8600 requests to the publisher for permission should be addressed to the permissions department john wiley sons inc 111 river street hoboken nj 07030 201 748-6011 fax 201 7486008 or online at http www.wiley.com/go/permissions limit of liability/disclaimer of warranty the publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties including without limitation warranties of fitness for a particular purpose no warranty may be created or extended by sales or promotional materials the advice and strategies contained herein may not be suitable for every situation this work is sold with the understanding that the publisher is not engaged in rendering legal accounting or other professional services if professional assistance is required the services of a competent professional person should be sought neither the publisher nor the author shall be liable for damages arising herefrom the fact that an organization or website is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or website may provide or recommendations it may make further readers should be aware that internet websites listed in this work may have changed or disappeared between when this work was written and when it is read for general information on our other products and services or to obtain technical support please contact our customer care department within the u.s at 877-762-2974 outside the u.s at 317-572-3993 or fax 317-572-4002 wiley also publishes its books in a variety of electronic formats some content that appears in print may not be available in electronic books library of congress cataloging-in-publication data 2008942706 trademarks wiley the wiley logo and related trade dress are trademarks or registered trademarks of john wiley sons inc and/or its affiliates in the united states and other countries and may not be used without written permission adobe and flash are registered trademarks of adobe systems incorporated in the united states and/or other countries all other trademarks are property of their respective owners wiley publishing inc is not associated with any product or vendor mentioned in this book.
[close]
p. 7
about the authors after discovering flash while working on an art project robert soon realized that there was a need for more comprehensive documentation of its capabilities in 1998 not many people had even heard of flash and publishers were wary of the limited market but idg books worldwide inc now wiley publishing inc committed to doing the flash 4 bible the rest as they say is history after studying and working together in toronto for five years robert reinhardt and snow dowd established a multimedia consulting and design company in los angeles in 1999 called [the makers five years in the hollywood hills saw them through the dotcom boom and bust and gave them the chance to work on a wide range of projects without ever having to wear wool socks now based in portland oregon [the makers continue to do work for entertainment companies educational institutions entrepreneurs independent artists and nonprofit organizations and enjoy wearing stylish rain boots snow and robert have expanded their services by working with designprovideo.com to produce flash training videos robert reinhardt with a degree in photographic arts robert takes a holistic approach to the creation of compelling multimedia for five years robert oversaw the growth of the multimedia platforms group at schematic a worldwide interactive agency there he led various assignments including multimedia data analysis applications for nielsen s media and entertainment division and created interactive applications for the weather channel s weatherclassroom.com dc comics and microsoft windows xp media center edition spotlights for major cable networks robert now consults and trains a wide range of clients from adobe systems to the walt disney internet group to ucla s center for international emergency medicine when he isn t building or consulting on flash projects robert loves to teach and write about flash and rich media technologies in addition to this book he is the coauthor of flash mx 2004 actionscript bible wiley 2004 he has developed and taught flash workshops for lynda.com art center college of design and portland state university as well as conducted on-site training and seminars for clients in the united states and canada such as lodgenet wieden+kennedy and scripps networks robert has been a regular featured speaker at the flashforward fitc flashbelt and siggraph conferences robert is also a writing partner for communitymx.com snow dowd snow initially collaborated with robert reinhardt on multimedia film and photography-based installation projects while earning a bfa in image arts and new media at ryerson university during this time she was also the production manager for design archive one of canada s preeminent architectural photography studios working with renowned photographers and an exacting international client base of architects and designers helped her gain a deeper appreciation for images architecture and industrial design fully immersed in digital production since 1998 snow is able to synthesize her background in visual arts and communication theory with an ever-evolving software toolkit focusing on content architecture and interface design snow strives to create print and web projects that are beautiful functional and memorable snow was honored to be featured in the june 2005 spotlight on flashgoddess.com a great place to go if you ve been wondering where all the women are in the flash world about the technical editor jeremy petty jeremy is a design engineer based in portland oregon his work has ranged from developing electro-mechanical systems used in a miniature tof-mass spectrometer to designing tools sets for the sports apparel industry for fun he enjoys bicycling around the portland area searching for the prefect surface to longboard on and spending time with his family.
[close]
p. 8
credits acquisitions editors laura sinise aaron black project editor katharine dvorak technical editor jeremy petty copy editor scott tullis editorial manager robyn siesky business manager amy knies senior marketing manager sandy smith vice president and executive group publisher richard swadley vice president and executive publisher barry pruett project coordinator patrick redmond graphics and production specialists stacie brooks andrea hornberger jennifer mayberry sarah philippart quality control technician amanda graham proofreader bonnie mikkelson indexer christine spina karpeles media development project manager laura moss media development assistant project manager jenny swisher media development associate producer kit malone
[close]
p. 9
n 1997 macromedia acquired a small web graphics program futuresplash from a company named futurewave futuresplash was a quirky little program with the astounding capability to generate compact vector-based graphics and animations for delivery over the web with macromedia s embrace flash blossomed in 2005 adobe systems inc acquired macromedia and in three short years has successfully integrated flash into their family of powerhouse graphics video and design software not only has the flash platform obtained ubiquity but flash content is now more easily created across a wide range of professional software applications the flash player plugin ships with most major browsers and operating systems flash graphics appear not only all over the web but also on television and movie screens on phones on kiosks and even in art galleries as the web-surfing public and the development community have continued to demand more of flash adobe has delivered after creative suite 3 was released adobe went out into the world and sat with people using its programs to see what they used what they needed and how the next generation of creative suite tools could support daily workflow and specialize tasks more effectively the result is a release that promotes expressiveness and enhances efficiency while encouraging best practices in development a functional and an inspiring combination that has earned rave reviews from visual designers and code-oriented developers at all levels the flash cs4 professional interface is consistent with other creative suite 4 cs4 products it has tool options and other editing features contained in streamlined panels and lots of important changes to the authoring environment the mac interface is nearly 100 percent identical to the windows interface with support for docked panels tabbed panels and enhancements to the coding environments in flash cs4 and dreamweaver cs4 flash movies can communicate directly with server-side scripts and programs using standard url-encoded variables xml-formatted structures web services or powerhouse data transfers from flash remotingenabled servers sounds can be imported and exported as mp3 audio for high-quality music on the web at the smallest file sizes flash player 10 supports nearly every web file format you ll ever come across loading of jpeg png gif mp3 flv aac and h.264 video content streamlines production and maintenance of dynamic high-volume media sites the updated flvplayback component and the addition of custom tools custom effects and behaviors offer flash users of all skill levels some exciting possibilities evidence of the dominance of the flash format can be found in the wide range of third-party developers creating applications that i vii
[close]
p. 10
preface output to the flash movie format swf files flash has fulfilled its promise of becoming the central application for generating interactive content for delivery on the web the potential only seems to expand as more developers tap into the data-handling power of flash and its increasingly sophisticated graphics capabilities as it continues to grow beyond the computer screen is there any other flash book for you adobe flash cs4 professional bible is the most comprehensive and exhaustive reference on flash it helps you get started on your first day with the program and will still be a valuable resource when you ve attained mastery of the program when you re looking for clues on how to integrate flash with other programs so that you can deliver unique and compelling content in the flash format you ll know where to turn we ve put significant effort into this edition updating all actionscript content to use actionscript 3.0 the most recent version of the actionscript language available in flash player 9 or higher flash is not just a single tool you can think of flash as a multitasking application it s an illustration program an image/sound/video editor an animation machine and a scripting engine all rolled into one in this book we look at each of these uses of flash and explain how all the features work together to address advanced scripting topics and more server-side development issues robert coauthored the flash actionscript bible series with joey lott wiley which has been updated and expanded with the past three releases of flash roger braunstein mims wright josh noble and joey have written the new actionscript 3 bible wiley 2007 to fully address advanced use of the actionscript 3.0 scripting language if you re already adept at creating animation and basic interactive interfaces in flash and you want to expand your knowledge of more complex coding techniques you may want to compare the table of contents in this book with that of actionscript bible to determine which book covers the topics you re most interested in how to get the most out of this book here are some things to know so you can get the most out of this book first to indicate that you need to select a command from a menu the menu and command are separated by an arrow symbol for example if we tell you to select the default workspace layout from the flash application menu the instructions will say to choose window workspace essentials parts i and ii of the book are entirely dedicated to project planning and getting familiar with the flash interface parts iii and iv explain how to generate animation and integrate other media files into your flash movies parts v through viii gradually introduce you to the power of actionscript viii
[close]
p. 11
preface and show you how to take advantage of flash components to quickly create dynamic applications that support live data although this book was written to take a beginner by the hand starting from page one you can also use it as a reference use the index and the table of contents to find what you re looking for and just go there or jump in anywhere if you already know flash and want to get some details on sound for example just go to any of the chapters in part iv integrating media files with flash this is a real-world production book we ve worked hard to ensure that our lessons examples and explanations are based on professional conventions we ve also continued the use of expert tutorials to bring you tips and techniques from talented people in the flash industry so that you can benefit from their specialized expertise tutorials that do not relate to flash cs4 but still offer some valuable information on specific topics have been archived online you can find them at www.flashsupport.com/archive the cd-rom that accompanies this book contains many of the source flash project files fla with original artwork and actionscript for the examples and lessons in the book you can also find sample video files to encode with flash video in order to create a forum for the delivery of updates notes and additional sample files we have established an integrated web site specifically for the flash bible series www.flashsupport com at the web site you ll find new material and corrections that may be added after the book goes to print and moderated forums where readers can share information or ask questions we invite you to contribute your comments and suggestions for this edition so that we can continue to improve the material we have created a chapter-based evaluation system that makes it easy for you to let us know what parts of this book were most or least useful to you visit www.flashsupport.com/feedback and let us know what you think of the content as you progress through the book icons what do they mean although the icons are pretty standard and self-explanatory they have their names written on them here s a brief explanation of what they are and what they mean tip note tips offer you extra information that further explains a given topic or technique often suggesting alternatives or workarounds to a listed procedure notes provide supplementary information to the text shedding light on background processes or miscellaneous options that aren t crucial to the basic understanding of the material ix
[close]
p. 12
preface caution when you see the caution icon make sure you re following along closely to the tips and techniques being discussed some external applications may not work exactly the same with flash on different operating systems and some workflows have inherent risks or drawbacks if you want to find related information to a given topic in another chapter look for the cross-reference icons the new feature icons point out differences between flash 8 and previous versions of flash for related information resources or software available online look for the web resource icons this icon indicates that the cd-rom contains a related file and points you to the folder location cross-ref new feature web resource on the cd-rom how this book is organized this book has been written in a format that gives you access to need-to-know information very easily in every section or part of the book if you are completely new to flash then you ll want to read parts i through vi after you have developed a familiarity with the flash interface and the new drawing and effects tools you can proceed to parts vii and viii we ve included step-by-step descriptions of real flash projects to help you leap from the intro topics to the advanced topics these sections of the book guide you through the production process helping you apply actionscript and production techniques that may be new to you if you ve already used flash then you may want to review the changes to the flash cs4 interface in part i and then jump right into other specific parts to learn more about character animation actionscript creating artwork and content in other applications and integrating flash with html there are many new features and workflow enhancements for new and experienced users alike in every section of the book so even if you ve done a lot of work in flash it s worth scanning each part for an introduction to new tools and techniques part i an introduction to flash web production the first part of this book explores the flash file format and how flash cs4 fits into the evolution of the program chapter 1 explains the context in which flash movies interact on the web chapter 2 and gives an overview of multimedia planning and some specific techniques and suggestions that will make your flash project development less painful and more productive chapter 3 x
[close]
p. 13
preface part ii mastering the flash environment this part gives you all the information you need to feel comfortable in the flash cs4 authoring environment get an introduction to and some tips for customizing the flash ui chapter 4 learn where to find your drawing tools and how to use them efficiently chapter 5 and then discover all the ways that flash helps you to organize and optimize project assets chapter 6 learn key color concepts relevant to multimedia production and find out why flash has the best color tools yet chapter 7 jump into using text-editing tools and see how to get the best-looking type and the smallest file sizes in your flash projects chapter 8 finally learn how to modify text and graphics to get the most out of your flash artwork chapter 9 part iii creating animation and effects after you ve learned how to find your way around the flash interface and how to create static graphics you can get some perspective on animation strategies chapter 10 learn to make things move and how to work with different symbol types to optimize your animation workflow chapter 11 add polish and pizzazz with flash filter effects and blend modes chapter 12 finally get special production tips for professional character animation and broadcast-quality graphics chapter 13 part iv integrating media files with flash now that you re fluent in the flash workspace take your projects to the next level by adding sound special graphics and video assets in chapter 14 you learn the basics of digital sound and how to import optimize and export high-quality sound for different types of projects chapter 15 gives you an overview of how to bring vector or raster artwork from other programs into flash and how to protect image quality while optimizing your flash movies chapter 16 introduces the exciting new video features of flash cs4 and the new adobe media encoder cs4 application including the use of the high-quality avc/h.264 video codec part v adding basic interactivity to flash movies learn how to start using flash actions to create interactive and responsive presentations get oriented in the flash cs4 actions panel and fundamental actionscript in your movies chapter 17 use actionscript in flash movies to control internal elements on multiple timelines such as nested movie clips chapter 18 use flash cs4 components to create fast clean interfaces for multipart presentations that also include some of the accessibility options chapter 19 xi
[close]
p. 14
preface part vi distributing flash movies you need to learn how to export or publish your flash presentations to the .swf file format for use in an html document or within presentations in other formats chapter 20 details options in the flash cs4 publish settings and provides tips for optimizing your flash movies in order to achieve smaller file sizes for faster download performance if you prefer to hand-code your html read chapter 21 which describes how to use the
p. 15
preface getting in touch with us you can find additional information resources and feedback from the authors and other readers at www.flashsupport.com we want to know what you think of individual chapters in this book visit www.flashsupport.com/feedback to send us your comments if you have a great tip or idea that you want to share with us we d like to hear from you you can also send comments about the book to info@themakers.com also check appendix b to learn more about this book s various contributors and guest experts including urls of their work and contact information for people who don t mind being contacted directly by our readers for quality concerns or issues with the cd-rom you can call the wiley customer care phone number 800 762-2974 outside the united states call 1 317 572-3994 or contact wiley customer service by e-mail at techsupdum@wiley.com wiley publishing inc will provide technical support only for cd-rom installation and other general quality-control items for technical support on the applications themselves consult the program s vendor adobe wants to help you adobe has created a feature request and bug report form to make it easier to process suggestions and requests from flash users if you have an idea or feature request for the next version or you find a bug that prevents you from doing your work let the folks at adobe know you can find the online form at www.adobe.com/support/email/wishform the simple fact is this if more users request a specific feature or improvement it s more likely that adobe will implement it regardless of your geographic location you always have access to the global flash community for support and the latest information through the adobe online forums at www.adobe.com cfusion/webforums/forum/index.cfm?forumid=15 for inspiration and motivation check out the site of the day weekly features and case studies at www.adobe.com/showcase xiii
[close]