Getting Started

Adobe Flash Professional CS5 provides a comprehensive authoring environment with tools for working with 2D and 3D animation, sound, vector and bitmap graphics, text, and video. Adobe ActionScript 3.0 is a sophisticated programming language that is totally integrated into Flash CS5 to develop rich interactive projects. The ActionScript techniques that you will learn in this book can be used with the great design and animation tools in the Flash interface to create rich interactive applications, games, e-learning content, and e-commerce tools for the web, the desktop, and mobile devices.

About Classroom in a Book

ActionScript 3.0 for Adobe Flash Professional CS5 Classroom in a Book is part of the official training series for the Adobe Flash platform, developed with the support of Adobe product experts. The lessons are designed so that you can learn at your own pace. If you’re new to ActionScript, you’ll learn the fundamental concepts and features you’ll need to accomplish a wide range of techniques covered in the book, but also gain enough understanding of the language to be able to learn additional techniques on your own. Each lesson in the book includes suggestions for continuing to develop your skills. Classroom in a Book teaches many advanced features, including tips and techniques for using the latest versions of ActionScript and Flash.

The lessons in this book include opportunities to use new features in Flash Professional CS5 such as Code Snippets, working with TLF Text, interacting with Adobe’s Pixel Bender Toolkit 2, and developing for the Adobe AIR 2 platform.

Prerequisites

Before you begin to use ActionScript 3.0 for Adobe Flash Professional CS5 Classroom in a Book, make sure that your system is set up correctly and that you’ve installed the required software. You should know how to use the mouse and standard menus and commands, and also how to open, save, and close files. If you need to review these techniques, see the printed or online documentation included with your Microsoft Windows or Apple Mac OS software.

This book is geared toward Flash users who are already comfortable with the interface and basic design and animation features of Flash. If you are new to Flash entirely, you may want to go through the lessons in Adobe Flash Professional CS5 Classroom in a Book.

This book assumes no programming experience. If you are a designer wishing to learn ActionScript 3.0, but perhaps are a little daunted by code, this book is for you. It also is helpful for Flash users who may have worked with earlier versions of ActionScript but have not yet made the transition to ActionScript 3.0.

Installing Flash

You must purchase the Adobe Flash Professional CS5 software either as a stand-alone application or as part of Adobe Creative Suite. Both products come with Flash Player 10, Adobe AIR 2, Adobe Media Encoder CS5, Adobe Extension Manager, Adobe Device Central, Adobe Bridge CS5, and the Pixel Bender Toolkit 2 in addition to the actual Adobe Flash CS5 application. Flash CS5 requires Apple QuickTime 7.6.2 or later. For system requirements and complete instructions on installing the Flash software, see the Adobe Flash ReadMe.pdf file on the application DVD.

Install Flash from the Adobe Flash Professional CS5 application DVD onto your hard disk. You cannot run the program from the DVD. Follow the onscreen instructions. Make sure that your serial number is accessible before installing the application. You can find the serial number on the registration card or on the back of the DVD case.

Optimizing performance

Flash Professional CS5 requires a minimum of 1 GB of RAM. The more RAM available to Flash, the faster the application will work for you. A broadband Internet connection is required for access to the online services offered by Adobe.

Copying the lesson files

The lessons in this book all revolve around a Flash project contained in an FLA file. Most of the lessons use additional resources such as audio, video, image, and text files. To complete the lessons in this book, you must copy these files from the ActionScript 3.0 for Adobe Flash Professional CS5 Classroom in a Book CD (located inside the back cover of this book) to your computer.

Copy the Lessons folder (which contains folders named Lesson01, Lesson02, and so on) from the ActionScript 3.0 for Adobe Flash Professional CS5 Classroom in a Book CD onto your computer by dragging it to your hard drive.

When you begin each lesson, you will be instructed where to navigate within the Lessons folder to find all the assets you need to complete the lesson.

If you have limited storage space on your computer, you can copy each Lesson folder individually as you need it and delete it afterward if desired. As mentioned before, some lessons build on preceding lessons but even then, the assets in each lesson folder are self-contained and don’t require materials from other lesson folders. You do not have to save any finished project if you don’t want to or if you have limited hard disk space.

How to use these lessons

Each lesson in this book provides step-by-step instructions for creating a project that illustrates essential ActionScript techniques. Some lessons build on projects created in preceding lessons; others stand alone. All the lessons build on each other in terms of concepts and skills, so the best way to learn from this book is to proceed through the lessons in sequential order. Some techniques and processes are explained and described in detail only the first few times you perform them. Many of the most essential ActionScript processes are repeated throughout the exercises so that you can build a familiarity as well as a level of comfort with the basic tools in the language.

Each of the lesson folders contains a Start folder with the files that you will use to create the lesson as well as a Complete folder with a sample version of the completed lesson for reference; you can compare your work in progress against these samples of finished, working ActionScript. Some of the lessons also include other files and folders with media and resources needed to complete the lesson’s project. Be sure to keep each folder’s contents together.

Standard elements in the book

Boldface text: Words that appear in boldface indicate text that you must type while working through the steps in the lessons.

Boldface code: Lines of code that appear in boldface within code blocks help you easily identify changes in the block that you are to make in a step.

function moveUp(e:Event):void {
 if (jt0.position.y>165) {
  var pt0:Point=new Point(jt0.position.x-5,jt0.position.y-5);
  mover0.moveTo(pt0);
 } else {
  stage.removeEventListener(Event.ENTER_FRAME, moveUp);
  snapshot_btn.visible = true;
 }
}

Code in text: Code or keywords appear slightly different from the rest of the text so you can identify them.

Tip

Alternative ways to perform tasks and suggestions to consider when applying the skills you are learning.

Code and wrapped code lines: To help you easily identify ActionScript, XML, and HTML code within the book, the code has been styled in a special font that’s unique from the rest of the text. Single lines of code that are longer than the margins of the page allow wrap to the next line. They are designated by an arrow at the beginning of the continuation of a broken line and are indented under the line from which they continue. For example:

var variables:URLVariables = new URLVariables();

var mailAddress:URLRequest=new URLRequest("http://www.actionscript.tv/email.php");

Note

Additional background information to expand your knowledge and advanced techniques you can explore to further develop your skills.

Italicized text: Words that appear in italics are either for emphasis or are new vocabulary.

Italics are also used for placeholders, in which the exact entry may change depending on your situation. For example:

mailto:[email protected]?subject=From Lesson 13 link&Body=This message was sent from Flash

Menu commands and keyboard shortcuts: Menu commands are shown with angle brackets between the menu names and commands: Menu > Command > Subcommand. Keyboard shortcuts are shown with a plus sign between the names of keys to indicate that you should press the keys simultaneously; for example, Shift+Tab means that you should press the Shift and Tab keys at the same time.

Checking for updates

Adobe periodically provides updates to software. You can easily obtain these updates through Adobe Updater, as long as you have an active Internet connection.

  1. In Flash Professional CS5, choose Help > Updates. The Adobe Updater automatically checks for updates available for your Adobe software.
  2. In the Adobe Application Manager dialog box, select and download the updates you want to install. A message tells you if your application is already up to date. If the application is up to date, click Quit to close the Application Manager dialog box and return to Flash.

Note

To set your preferences for future updates, click Preferences in the Adobe Updater dialog box. Select how often you want Adobe Application Manager to check for updates, for which applications, and whether to download them automatically. Click OK to accept the new settings.

Flash Player version

The lessons in this book (with the exception of Lesson 14 which uses Adobe AIR) are created to work with Flash Player 10 or higher. While most web users have a recent version of the Flash Player, it is always a good idea before beginning your own Flash based projects to identify the target audience and determine which version of the Flash Player to develop for before starting the process. For information on Flash Player version penetration visit:

www.adobe.com/products/player_census/flashplayer/

Additional resources

ActionScript 3.0 for Adobe Flash Professional CS5 Classroom in a Book is not meant to replace documentation that comes with the program or to be a comprehensive reference for every feature. Only the commands and options used in the lessons are explained in this book. For comprehensive information about program features and tutorials, refer to these resources:

Adobe Community Help: Community Help brings together active Adobe product users, Adobe product team members, authors, and experts to give you the most useful, relevant, and up-to-date information about Adobe products. Whether you’re looking for a code sample or an answer to a problem, have a question about the software, or want to share a useful tip or recipe, you’ll benefit from Community Help. Search results will show you not only content from Adobe, but also from the community.

With Adobe Community Help you can:

• Access up-to-date definitive reference content online and offline

• Find the most relevant content contributed by experts from the Adobe community, on and off Adobe.com

• Comment on, rate, and contribute to content in the Adobe community

• Download Help content directly to your desktop for offline use

• Find related content with dynamic search and navigation tools

To access Community Help: If you have any Adobe CS5 product, then you already have the Community Help application. To invoke Help, choose Help > Flash Help. This companion application lets you search and browse Adobe and community content, plus you can comment on and rate any article just like you would in the browser. However, you can also download Adobe Help and language reference content for use offline. You can also subscribe to new content updates (which can be automatically downloaded) so that you’ll always have the most up-to-date content for your Adobe product at all times. You can download the application from www.adobe.com/support/chc/index.html.

Adobe content is updated based on community feedback and contributions. You can contribute in several ways: add comments to content or forums, including links to web content; publish your own content using Community Publishing; or contribute Cookbook Recipes. Find out how to contribute: www.adobe.com/community/publishing/download.html.

See http://community.adobe.com/help/profile/faq.html for answers to frequently asked questions about Community Help.

Adobe Flash Professional CS5 Help and Support: www.adobe.com/support/flash where you can find and browse Help and Support content on adobe.com.

Adobe TV: http://tv.adobe.com is an online video resource for expert instruction and inspiration about Adobe products, including a How To channel to get you started with your product.

Adobe Design Center: www.adobe.com/designcenter offers thoughtful articles on design and design issues, a gallery showcasing the work of top-notch designers, tutorials, and more.

Adobe Developer Connection: www.adobe.com/devnet is your source for technical articles, code samples, and how-to videos that cover Adobe developer products and technologies.

ActionScript Technology Center: www.adobe.com/devnet/actionscript is a special section of the Adobe Developer Connection designed specifically for ActionScript users.

Resources for educators: www.adobe.com/education includes three free curriculums that use an integrated approach to teaching Adobe software and can be used to prepare for the Adobe Certified Associate exams.

Also check out these useful links:

Adobe Forums: http://forums.adobe.com lets you tap into peer-to-peer discussions, questions, and answers on Adobe products.

Adobe Marketplace & Exchange: www.adobe.com/cfusion/exchange is a central resource for finding tools, services, extensions, code samples, and more to supplement and extend your Adobe products.

Adobe Flash Professional CS5 product home page: www.adobe.com/products/flash.

Adobe Labs: http://labs.adobe.com gives you access to early builds of cutting-edge technology, as well as forums where you can interact with both the Adobe development teams building that technology and other like-minded members of the community.

Adobe certification

The Adobe training and certification programs are designed to help Adobe customers improve and promote their product-proficiency skills. There are four levels of certification:

• Adobe Certified Associate (ACA)

• Adobe Certified Expert (ACE)

• Adobe Certified Instructor (ACI)

• Adobe Authorized Training Center (AATC)

The Adobe Certified Associate (ACA) credential certifies that individuals have the entry-level skills to plan, design, build, and maintain effective communications using different forms of digital media.

The Adobe Certified Expert program is a way for expert users to upgrade their credentials. You can use Adobe certification as a catalyst for getting a raise, finding a job, or promoting your expertise.

If you are an ACE-level instructor, the Adobe Certified Instructor program takes your skills to the next level and gives you access to a wide range of Adobe resources.

Adobe Authorized Training Centers offer instructor-led courses and training on Adobe products, employing only Adobe Certified Instructors. A directory of AATCs is available at http://partners.adobe.com.

For information on the Adobe Certified programs, visit www.adobe.com/support/certification/main.html.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.199.243