Adobe 65018518 - Flash CS4 Professional Using Manual

Adobe 65018518 - Flash CS4 Professional Using Manual

User guide
Table of Contents

Advertisement

Quick Links

Using
CS 4 PROFESSIONAL
ADOBE
FLASH
®
®
Updated 5 March 2009

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 65018518 - Flash CS4 Professional and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Adobe 65018518 - Flash CS4 Professional

  • Page 1 Using CS 4 PROFESSIONAL ADOBE FLASH ® ® Updated 5 March 2009...
  • Page 2 The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide.
  • Page 3: Table Of Contents

    Contents Chapter 1: Resources Activation and registration ................... . 1 Help and support .
  • Page 4 ..................293 Working with Adobe Premiere Pro and After Effects .
  • Page 5 ..................... 383 Publishing for Adobe AIR .
  • Page 6: Chapter 1: Resources

    If you postpone registration, you can register at any time by choosing Help > Registration. Adobe Product Improvement Program After you use your Adobe software a certain number of times, a dialog box may appear asking whether you want to participate in the Adobe Product Improvement Program.
  • Page 7: Help And Support

    The sites searched by the default Community Help search engine are hand-selected and reviewed for quality by Adobe and Adobe Community Experts. Adobe experts also work to ensure that the top search results include a mixture of different kinds of content, including results from online product Help.
  • Page 8: Services, Downloads, And Extras

    From the Connections panel menu , select Offline Options. Select Keep Me Offline and click OK. Note: When you disable web services from the Connections panel, all other web services (such as Adobe Kuler and Adobe ConnectNow) are also disabled. Printed resources Printed versions of the complete online product Help are available for the cost of shipping and handling at www.adobe.com/go/store.
  • Page 9: Getting Started In Flash

    Extras The installation disc contains a variety of extras to help you make the most of your Adobe software. Some extras are installed on your computer during the setup process; others are located on the disc.
  • Page 10 Exporting artboards to Flash (Illustrator import) Working with Soundbooth and Flash Exporting from After Effects to Flash via XFL Using Kuler color themes Using ConnectNow to share your screen (Demo is in Dreamweaver) Introducing Adobe Device Central CS4 Updated 5 March 2009...
  • Page 11: What's New

    137. Authoring for Adobe AIR Deliver interactive experiences to the desktop with new Publish to AIR. Adobe® AIR™, a new cross-operating system runtime allows you to leverage local desktop resources and data to deliver even more personal, engaging experiences.
  • Page 12 Deliver the highest quality video with more control than ever before. Encode to any format recognized by Adobe Flash Player with the same tool found in other Adobe video products such as Adobe® Premiere® Pro and After Effects®. For more information, see Adobe Media Encoder help.
  • Page 13 Community Help is an integrated environment on adobe.com that gives you access to community-generated content moderated by Adobe and industry experts. Comments and ratings from users help guide you to an answer. Search Community Help to find the best content on the web about Adobe products and technologies. For more information, “Help and...
  • Page 14: Chapter 2: Workspace

    Chapter 2: Workspace The Adobe® Flash® CS4 Professional workspace includes tools and panels that help you create and navigate your documents. Understanding these tools will help you maximize the application’s capabilities. Flash workflow and workspace General Flash workflow To build a Flash application, you typically perform the following basic steps: Plan the application.
  • Page 15: Workspace Overview

    You create and manipulate your documents and files using various elements, such as panels, bars, and windows. Any arrangement of these elements is called a workspace. The workspaces of the different applications in Adobe® Creative Suite® 4 share the same appearance so that you can move between the applications easily. You can also adapt each application to the way you work by selecting from several preset workspaces or by creating one of your own.
  • Page 16 USING FLASH CS4 PROFESSIONAL Workspace • Panels help you monitor and modify your work. Examples include the Timeline in Flash, the Layers panel in Adobe Photoshop®, and the CSS Styles panel in Dreamweaver. Panels can be grouped, stacked, or docked. •...
  • Page 17 USING FLASH CS4 PROFESSIONAL Workspace Narrow blue drop zone indicates Color panel will be docked on its own above the Layers panel group. A. Title bar B. Tab C. Drop zone In Photoshop, you can change the font size of the text in the Control panel, in the panels, and in tool tips. Choose a size from the UI Font Size menu in Interface preferences.
  • Page 18 USING FLASH CS4 PROFESSIONAL Workspace Navigator panel being dragged out to new dock, indicated by blue vertical highlight Navigator panel now in its own dock You can prevent panels from filling all the space in a dock. Drag the bottom edge of the dock up so it no longer meets the edge of the workspace.
  • Page 19 USING FLASH CS4 PROFESSIONAL Workspace Manipulate panel groups • To move a panel into a group, drag the panel’s tab to the highlighted drop zone in the group. Adding a panel to a panel group • To rearrange panels in a group, drag a panel’s tab to a new location in the group. •...
  • Page 20 USING FLASH CS4 PROFESSIONAL Workspace Panels collapsed to icons Panels expanded from icons • To collapse or expand all panel icons in a dock, click the double arrow at the top of the dock. • To expand a single panel icon, click it. •...
  • Page 21: Working With Connectnow

    To display panels in their default locations on startup, deselect Remember Panel Locations. Working with ConnectNow Adobe® ConnectNow™ lets you share your screen and meet with other users online. You can open ConnectNow directly from the application interface by choosing File > Share My Screen.
  • Page 22: Using The Stage And Tools Panel

    Choose File > Share My Screen. In the Share My Screen dialog box, enter your Adobe ID and password, and click Sign In. If you don’t have an Adobe ID and password, click the Create a Free Adobe ID link at the top of the dialog box.
  • Page 23 USING FLASH CS4 PROFESSIONAL Workspace The Timeline and Stage with content. Zoom the Stage To view the entire Stage on the screen, or to view a particular area of your drawing at high magnification, change the magnification level. The maximum magnification depends on the resolution of your monitor and the document size. The minimum value for zooming out on the Stage is 8%.
  • Page 24 USING FLASH CS4 PROFESSIONAL Workspace Move the view of the Stage When the Stage is magnified, you may not be able to see all of it. To change the view without having to change the magnification, use the Hand tool to move the Stage. ❖...
  • Page 25 USING FLASH CS4 PROFESSIONAL Workspace • To display or hide guides, select or deselect Show Guides. • To turn snapping to guides on or off, select or deselect Snap To Guides. • Select or deselect Lock Guides. • To set Snap Accuracy, select an option from the pop-up menu. •...
  • Page 26 USING FLASH CS4 PROFESSIONAL Workspace To specify which tools to display in the authoring environment, use the Customize Tools Panel dialog box. See also “Creating and Editing Artwork” on page 91 “Selecting objects” on page 118 Use the Tools panel To show or hide the Tools panel, select Window >...
  • Page 27: The Timeline

    USING FLASH CS4 PROFESSIONAL Workspace Use context menus Context menus contain commands relevant to the current selection. For example, when you select a frame in the Timeline window, the context menu contains commands for creating, deleting, and modifying frames and keyframes. Context menus exist for many items and controls in many locations, including on the Stage, in the Timeline, in the Library panel, and in the Actions panel.
  • Page 28 USING FLASH CS4 PROFESSIONAL Workspace See also “Working with timelines” on page 172 “Motion tweens” on page 187 Change the appearance of the Timeline By default, the Timeline appears below the main document window. To change its position, detach the Timeline from the document window and float it in its own window or dock it to any other panel you choose.
  • Page 29 USING FLASH CS4 PROFESSIONAL Workspace Select from the following options: • To change the width of frame cells, select Tiny, Small, Normal, Medium, or Large. (The Large frame-width setting is useful for viewing the details of sound waveforms.) • To decrease the height of frame cell rows, select Short. Short and Normal frame view options.
  • Page 30: Using Flash Authoring Panels

    USING FLASH CS4 PROFESSIONAL Workspace Moving the playhead Using Flash authoring panels About the Property inspector The Property inspector provides easy access to the most commonly used attributes of the current selection, either on the Stage or in the Timeline. You can make changes to the object or document attributes in the Property inspector without accessing the menus or panels that also control these attributes.
  • Page 31 USING FLASH CS4 PROFESSIONAL Workspace About the Library panel The Library panel (Window > Library) is where you store and organize symbols created in Flash, as well as imported files, including bitmap graphics, sound files, and video clips. The Library panel lets you organize library items in folders, see how often an item is used in a document, and sort items by name, type, date, use count, or ActionScript®...
  • Page 32 USING FLASH CS4 PROFESSIONAL Workspace To display the Actions panel, select Window > Actions or press F9. See also “Actions panel overview” on page 332 “Script window overview” on page 334 Use the Movie Explorer The Movie Explorer lets you view and organize the contents of a document and select elements in the document for modification.
  • Page 33 USING FLASH CS4 PROFESSIONAL Workspace Select an item in the Movie Explorer ❖ Click the item in the navigation tree. Shift-click to select more than one item. The full path for the selected item appears at the bottom of the Movie Explorer. Selecting a scene in the Movie Explorer shows the first frame of that scene on the Stage.
  • Page 34: Undo, Redo, And History

    If you are not using the Stage but instead are writing ActionScript code for the connectivity layer of your application, you can use the Web Services panel to manage your web services. For detailed information about using the web services panel, see www.adobe.com/go/learn_fl_web_services. Undo, redo, and history...
  • Page 35 USING FLASH CS4 PROFESSIONAL Workspace • To reapply a step to the same object or to a different object, use the Repeat command. For example, if you move a shape named shape_A, select Edit > Repeat to move the shape again, or select another shape, shape_B, and select Edit >...
  • Page 36 USING FLASH CS4 PROFESSIONAL Workspace Undo steps with the History panel When you undo a step, the step is dimmed in the History panel. • To undo the last step performed, drag the History panel slider up one step in the list. •...
  • Page 37: Automating Tasks With The Commands Menu

    Note: The command is saved as a JavaScript file (with the extension .jsfl) in your Commands folder. This folder is in the following locations: Windows 2000 or Windows XP: boot drive\Documents and Settings\<user>\Local Settings\Application Data\Adobe\Flash CS4\<language>\Configuration\Commands; Mac OS® X: Macintosh HD/Users/<username>/Library/Application Support/Adobe/Flash CS4/<language>/Configuration/Commands.
  • Page 38: Accessibility In The Flash Workspace

    If you attempt to save an unrepeatable action as a command, the command is not saved. Accessibility in the Flash workspace The Adobe® Flash® CS4 Professional workspace is keyboard-accessible for users who may have difficulty using a mouse. About accessibility support...
  • Page 39 USING FLASH CS4 PROFESSIONAL Workspace When you use the keyboard shortcut to select panels, focus is applied to panels using the following criteria: • Docked panels are given focus first. • If the Timeline is showing and docked, the Timeline is given focus the first time you press Control+F6 (Windows) or Command+F6 (Macintosh).
  • Page 40 USING FLASH CS4 PROFESSIONAL Workspace • To move the focus between the Panel menus of the panels in the group in panels that are grouped, use Up Arrow and Down Arrow. • You can move the focus to a panel control only if the control is active. If a control is dimmed (inactive), you cannot apply focus to the control.
  • Page 41 USING FLASH CS4 PROFESSIONAL Workspace To select the Stage or objects on the Stage, use the following techniques: • To select the Stage, press Control+Alt+Home (Windows) or Command+Option+Home (Macintosh). • To select an object on the Stage, with the Stage selected, press Tab. •...
  • Page 42: Set Preferences In Flash

    USING FLASH CS4 PROFESSIONAL Workspace See also “Work with common libraries” on page 160 Set preferences in Flash You can set preferences for general application operations, editing operations, and clipboard operations. The General category in the Preferences dialog box. See also “Drawing preferences”...
  • Page 43 To receive a warning when you try to save documents with content that is specific to the Adobe® Flash® CS4 Professional authoring tool as a Flash 8 file, select Warn On Save For Adobe Flash 8 and CS3 Compatibility (default).
  • Page 44 USING FLASH CS4 PROFESSIONAL Workspace Set General preferences Specify which document opens when you start the application. On Launch Document-level undo maintains a single list of all your actions for the entire Flash Document- or Object-level undo document. Object-level undo maintains separate lists of your actions for each object in your document. Object-level lets you undo an action on one object without having to also undo actions on other objects that might have been modified more recently than the target object.
  • Page 45: Keyboard Shortcuts

    USING FLASH CS4 PROFESSIONAL Workspace To specify how PICT files are handled, use the following settings. PICT Settings (Macintosh only) • To preserve data copied to the Clipboard as vector artwork, select Objects. To convert the copied artwork to Type a bitmap, select one of the bitmap formats.
  • Page 46 USING FLASH CS4 PROFESSIONAL Workspace Deletes a set. You cannot delete the active set. Delete Set Click OK. Remove a shortcut from a command From the Commands pop-up menu, select a command category, select a command from the Commands list, and select a shortcut.
  • Page 47 USING FLASH CS4 PROFESSIONAL Workspace Select a keyboard shortcut set Select Edit > Keyboard Shortcuts (Windows) or Flash > Keyboard Shortcuts (Macintosh). In the Keyboard Shortcuts dialog box, select a shortcut set from the Current Set pop-up menu. Create a keyboard shortcut set Select a keyboard shortcut set and click the Duplicate Set button Enter a name for the new shortcut set and click OK.
  • Page 48: Chapter 3: Managing Documents

    When you create and save Adobe® Flash® CS4 Professional documents within the Flash authoring environment, the documents are in FLA file format. To display a document in Adobe® Flash® Player, you must publish or export the document as a SWF file.
  • Page 49 USING FLASH CS4 PROFESSIONAL Managing documents See also “Set preferences in Flash” on page 37 “Publishing and Exporting” on page 379 Create a new document Select File > New. On the General tab, select Flash Document. On Windows, you can create a new document of the same type as the last document created by clicking the New File button in the main toolbar.
  • Page 50 You can include Extensible Metadata Platform (XMP) data such as title, author, description, copyright, and more in your FLA files. XMP is a metadata format that certain other Adobe applications can understand. The metadata is viewable in Flash and in Adobe® Bridge. For more information about XMP metadata, see Metadata and Keywords in Bridge Help.
  • Page 51 USING FLASH CS4 PROFESSIONAL Managing documents Displays information about images saved in the Digital Imaging and Communications in Medicine (DICOM) DICOM format. To add metadata: Choose File > File Info. In the File Info dialog box that appears, enter the metadata that you want to include. You can add or remove metadata in the FLA file at any time.
  • Page 52 Flash is designed to work with other Adobe® applications to enable a broad range of creative workflows. You can import Illustrator® and Photoshop® files directly into Flash. You can also create video from Flash and edit it in Adobe® Premiere® Pro or After Effects®, or import video from either of those applications into Flash. When publishing your SWF files, you can use Dreamweaver®...
  • Page 53 Start Flash. On the main Flash screen, select Create New > Flash File (Mobile). Flash opens Adobe® Device Central and displays the New Document tab. In Device Central, select a Player version and ActionScript version. The Available Devices list on the left is updated. Devices that do not support the selected Player version and ActionScript version are dimmed.
  • Page 54 Version Cue A. Version Cue server B. Users connect to server using Adobe Drive C. Users check out and save different versions of a file Use Version Cue to track versions of a file as you work and to enable workgroup collaboration such as file sharing, version control, backups, online reviews, and the ability to check files in and out.
  • Page 55: Printing Flash Documents

    USING FLASH CS4 PROFESSIONAL Managing documents Version Cue is integrated with Adobe Bridge: Use Adobe Bridge as a file browser for Version Cue projects. With Adobe Bridge, you can access Version Cue Servers, projects, and files, and view, search for, and compare information about Version Cue-managed assets.
  • Page 56 USING FLASH CS4 PROFESSIONAL Managing documents See also “Publishing overview” on page 379 Disable printing in the Flash Player context menu Open or make active the Flash document (FLA file) to publish. Select the first keyframe in the main Timeline. Select Window >...
  • Page 57: Working With Projects

    USING FLASH CS4 PROFESSIONAL Managing documents Print from the Flash Player context menu Use the Print command in the Flash Player context menu to print frames from any Flash SWF file. The context menu’s Print command cannot print transparency or color effects and cannot print frames from other movie clips;...
  • Page 58 USING FLASH CS4 PROFESSIONAL Managing documents The Project panel A. Project menu B. Options menu C. Pin D. New folder E. New file F. Create class See also “Using publish profiles” on page 397 Create a project From the Project menu select New Project. Browse for a folder.
  • Page 59 USING FLASH CS4 PROFESSIONAL Managing documents Open an existing project Select Window > Other Panels > Project to open the Project panel. Select Open Project from the Project pop-up menu in the Project panel. Using the Browse For Folder dialog box, navigate into the folder containing the project and click OK. Note: You cannot open Dreamweaver projects in the Flash Project panel.
  • Page 60 USING FLASH CS4 PROFESSIONAL Managing documents To clear the Recent Files list, select Clear Recent Files from the Options menu, or right-click the Recent Files folder, and select Clear Recent Files from the context menu. Clearing the recent files list does not remove the files from your computer.
  • Page 61 USING FLASH CS4 PROFESSIONAL Managing documents Location names can be changed at any time in the Project or Panel preferences by selecting the desired location and clicking on the Rename Location button. When you are finished adding locations, click OK to close the dialog. Location folders appear above all other folders in the file list.
  • Page 62 USING FLASH CS4 PROFESSIONAL Managing documents standardClass_as3.as Each of these template files has custom template tags that are replaced with dynamic data when a new class is created. You can place these tags anywhere in your class template file. The following are the tags included in each file: •...
  • Page 63: Find And Replace

    Create a project. Select Project Properties from the Options pop-up menu. Select the Paths tab, and enter the directory path or browse to the Flex SDK. For example: C:\Program Files\Adobe FlexBuilder 3\sdks\3.0.0 From the Paths tab, select the Source tab and add the path to any folders containing ActionScript class files.
  • Page 64: Find And Replace Text

    USING FLASH CS4 PROFESSIONAL Managing documents The Find and Replace Log at the bottom of the Find and Replace dialog box shows the location, name, and type of the elements for which you are searching. See also “Working with screens” on page 316 Find and replace text Select Edit >...
  • Page 65: Find And Replace Colors

    USING FLASH CS4 PROFESSIONAL Managing documents • To search by font style, select Font Style and select a font style from the pop-up menu. When Font Style is deselected, all font styles in the scene or document are searched. • To search by font size, select Font Size and enter values for minimum and maximum font size to specify the range of font sizes to be searched.
  • Page 66 USING FLASH CS4 PROFESSIONAL Managing documents To specify which occurrence of the color to find and replace, select the Fills, Strokes, or Text option or any combination of those options. To select the next occurrence of the specified color on the Stage and edit it in place, select Live Edit. Note: Only the next occurrence is selected for live editing, even if you select Find All in the next step.
  • Page 67: Templates

    Flash templates provide you with easy-to-use starting points for common projects. There are several templates for advertising projects included with Flash. For more information on authoring Flash files for mobile devices, see the Adobe Mobile Devices site at www.adobe.com/go/devnet_devices. Advertising templates Advertising templates facilitate the creation of standard rich media types and sizes defined by the Interactive Advertising Bureau (IAB) and accepted by the industry.
  • Page 68: Chapter 4: Using Imported Artwork

    When you import a bitmap, you can apply compression and anti-aliasing, place the bitmap directly in an Adobe® Flash® CS4 Professional document, use the bitmap as a fill, edit the bitmap in an external editor, break the bitmap apart into pixels and edit it in Adobe® Flash® CS4 Professional, or convert the bitmap to vector artwork.
  • Page 69 USING FLASH CS4 PROFESSIONAL Using imported artwork • Any sequence of images (for example, a PICT or BMP sequence) that you import directly into a Flash document is imported as successive keyframes of the current layer. See also “Imported bitmaps” on page 86 “Video”...
  • Page 70 You can import the following vector or bitmap file formats into Flash 8 or later, regardless of whether QuickTime 4 is installed: File type Extension Windows Macintosh Adobe Illustrator (version 10 or earlier) • • Adobe Photoshop .psd • •...
  • Page 71 USING FLASH CS4 PROFESSIONAL Using imported artwork Keep the following guidelines in mind when importing FreeHand files: • When importing a file with overlapping objects to preserve as separate objects, place the objects on separate layers in FreeHand, and select Layers in the FreeHand Import dialog box in Flash. (If overlapping objects on a single layer are imported into Flash, the overlapping shapes are divided at intersection points, just as with overlapping objects that you create in Flash.) •...
  • Page 72: Working With Fireworks Files

    About imported Fireworks PNG files You can import Adobe® Fireworks PNG files into Flash as flattened images or as editable objects. When you import a PNG file as a flattened image, the entire file (including any vector artwork) is rasterized, or converted to a bitmap image.
  • Page 73 USING FLASH CS4 PROFESSIONAL Using imported artwork Fireworks blending mode Flash blending mode Normal Normal Darken Darken Multiply Multiply Lighten Lighten Screen Screen Overlay Overlay Hard light Hard light Additive Difference Difference Invert Invert Alpha Alpha Erase Erase Flash ignores all other blending modes imported from Fireworks. The blending modes that Flash does not support are Average, Negation, Exclusion, Soft Light, Subtractive, Fuzzy Light, Color Dodge, and Color Burn.
  • Page 74: Working With Illustrator Ai Files

    About Adobe Illustrator AI files Flash lets you import Adobe® Illustrator® AI files and preserves the majority of the editability and visual fidelity of your artwork. The AI Importer also provides you with a great degree of control in determining how your Illustrator artwork is imported into Flash, letting you specify how to import specific objects into an AI file.
  • Page 75 AI files being pasted onto the Flash stage. For video tutorials about working with Illustrator and Flash, see: • Using symbols between Illustrator and Flash: www.adobe.com/go/vid0198 • Using text between Illustrator and Flash: www.adobe.com/go/vid0199 Compatibility between Flash and Illustrator Certain visual attributes can either not be accurately imported, or, after they are imported, lose their ability to be further edited in the Flash authoring environment.
  • Page 76 USING FLASH CS4 PROFESSIONAL Using imported artwork In addition, Illustrator and Flash support pasted artwork in the following ways: • When you select entire top-level layers in Illustrator artwork and paste them into Flash, the layers are preserved along with their properties (visibility and locking). •...
  • Page 77 USING FLASH CS4 PROFESSIONAL Using imported artwork Static, dynamic, and input text objects When you bring static text from Illustrator into Flash, Flash converts the text to outlines. In addition, you can set up your text in Illustrator as dynamic text. Dynamic text enables you to edit text content programmatically in Flash, and easily manage projects that require localization in multiple languages.
  • Page 78 USING FLASH CS4 PROFESSIONAL Using imported artwork Note: To override the preferences specified for different layer types on an object by object basis, use the AI Import dialog box. Select the layer, object, or group to change its import options, and specify the necessary options. Preferences that affect how the AI Importer will respond when importing AI files: General •...
  • Page 79 Illustrator CS3 or later, save the AI file as a CS3 or later compatible file, and re-import it into Flash. To import an Illustrator EPS or Adobe® Acrobat® PDF file, open the file in Illustrator CS3 or later, save it as a CS3 or later compatible AI file, and import the resulting AI file into Flash.
  • Page 80 USING FLASH CS4 PROFESSIONAL Using imported artwork Choose from the following options when importing Adobe Illustrator files: • Convert layers to Flash layers or keyframes, or single Flash layers. • Import text as editable text, vector outlines, or bitmaps. •...
  • Page 81 USING FLASH CS4 PROFESSIONAL Using imported artwork Any symbols in the AI file’s library that have no instances on the artboard are imported into Import Unused Symbols the Flash library. If this option is not selected, the unused symbols are not imported into Flash. Imports the AI file as a single bitmap image and disables the layers list and import Import As A Single Bitmap Image options within the AI Import dialog box.
  • Page 82 USING FLASH CS4 PROFESSIONAL Using imported artwork An icon indicates what the Flash object type located on that layer will be when imported and, if Object Type column visible, that the item is selected. The object types are: • Text •...
  • Page 83: Working With Photoshop Psd Files

    Working with Photoshop PSD files Working with Photoshop and Flash You can use Adobe® Photoshop® and Adobe® Flash® together to create visually compelling web-based applications, animations, or interactive messaging elements. Photoshop lets you create still images and artwork, providing a high degree of creative control.
  • Page 84 You can exchange QuickTime video files between Photoshop and Flash. For example, you can render a QuickTime movie directly from Photoshop and then import it into Flash, converting it into an FLV (video for Adobe Flash Player) file, which can be played in Flash® Player.
  • Page 85 PSD file format. For a video tutorial about designing websites with Photoshop and Flash, see www.adobe.com/go/vid0201. Updated 5 March 2009...
  • Page 86 Select File > Import To Stage or Import To Library. Navigate to the Adobe Photoshop PSD file to import, select it, and click OK. (Optional) In the PSD Import dialog box, select layers, groups, and individual objects and choose how to import each item.
  • Page 87 USING FLASH CS4 PROFESSIONAL Using imported artwork Click OK. Importing PSD files to the Flash library Importing a PSD file into the library is similar to importing to the Stage. When you import a PSD file into the library, the root folder uses the name of the PSD file. After the PSD file is imported into the library, you can change the name of the root folder, or move the layers out of the folder.
  • Page 88 USING FLASH CS4 PROFESSIONAL Using imported artwork Importing text objects Text objects are text layers in Photoshop. Choose how to import text into Flash. Creates an editable text object from the text on the selected Photoshop layer. The appearance of the text Editable Text might be compromised to maintain the editability of the text.
  • Page 89 USING FLASH CS4 PROFESSIONAL Using imported artwork Importing multiple objects of the same type If you import multiple objects of the same type, the import options displayed are the same as if a single object of that type was selected. If the objects do not share the same attributes, the import options displayed are in an indeterminate state, and your results may not be as expected.
  • Page 90 USING FLASH CS4 PROFESSIONAL Using imported artwork Note: To override the preferences specified for different layer types on an object by object basis, use the PSD Import dialog box. Select the layer to change import options for, and specify the necessary options. See also “Set preferences in Flash”...
  • Page 91: Imported Bitmaps

    USING FLASH CS4 PROFESSIONAL Using imported artwork Layer group import preferences This option specifies how the options for layer groups will initially be set. Specifies that all groups be converted to a movie clip when imported into Flash. This can be Create Movie Clips changed on an object by object basis if you do not want some layer groups to be movie clips.
  • Page 92 BitmapData To do so, specify a linkage identifier for the bitmap. For more information, see Assigning linkage to assets in the library Learning ActionScript 2.0 in Adobe Flash or Exporting library symbols for ActionScript in Programming ActionScript 3.0. Select the bitmap in the Library panel.
  • Page 93 USING FLASH CS4 PROFESSIONAL Using imported artwork • Right-click (Windows) or Control-click (Macintosh) the bitmap name in the Library panel, and select Properties from the context menu. If the Linkage properties aren’t visible in the Properties dialog box, click Advanced. For Linkage, select Export For ActionScript.
  • Page 94 USING FLASH CS4 PROFESSIONAL Using imported artwork Save the file in the image-editing application. The file is automatically updated in Flash. Return to Flash to continue editing the document. Break apart a bitmap and create a bitmap fill Breaking apart a bitmap on the Stage separates the on-Stage image from its library item and converts it from a bitmap instance to a shape.
  • Page 95 USING FLASH CS4 PROFESSIONAL Using imported artwork When you convert a bitmap to a vector graphic, the vector graphic is no longer linked to the bitmap symbol in the Library panel. Note: If the imported bitmap contains complex shapes and many colors, the converted vector graphic might have a larger file size than the original bitmap.
  • Page 96: Chapter 5: Creating And Editing Artwork

    Drawing About drawing The drawing tools in Adobe® Flash® CS4 Professional let you create and modify shapes for the artwork in your documents. Before you draw and paint in Flash, it is important to understand how Flash creates artwork, and how drawing, painting, and modifying shapes can affect other shapes on the same layer.
  • Page 97 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Pixels in bitmap art. When you edit a bitmap graphic, you modify pixels rather than lines and curves. Bitmap graphics are resolution dependent, because the data describing the image is fixed to a grid of a particular size. Editing a bitmap graphic can change the quality of its appearance.
  • Page 98 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork A corner point can connect both straight segments and curved segments. Note: Don’t confuse corner and smooth points with straight and curved segments. A path outline is called a stroke. A color or gradient applied to an open or closed path interior area is called a fill. A stroke can have weight (thickness), color, and a dash pattern.
  • Page 99 “Graphic objects” in Flash are different from “ActionScript objects,” which are part of the ActionScript® programming language. Do not confuse the two uses of the term “objects.” For more information on objects in the programming language, see About Data Types in Learning ActionScript 2.0 in Adobe Flash, or Data types in Programming ActionScript 3.0.
  • Page 100 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Select a drawing tool from the Tools panel and draw on the Stage Note: By default, Flash uses the Merge Drawing mode. Object Drawing mode Creates shapes referred to as drawing objects. Drawing objects are separate graphic objects that do not automatically merge together when overlaid.
  • Page 101: Drawing Preferences

    USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Primitive objects Primitive objects are shapes that let you adjust their characteristics in the Property inspector. You can precisely control the size, corner radius, and other properties of the shape at any time after you have created it without having to draw it from scratch.
  • Page 102: Drawing Settings

    USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Drawing settings Select Edit > Preferences (Windows) or Flash > Preferences (Macintosh) and select Drawing. Under the Drawing category, select from the following options: Lets you set options for the Pen tool. Select Show Pen Preview to display a preview line from the last clicked Pen tool point to the current location of the pointer.
  • Page 103 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Draw simple lines and shapes Draw straight lines with the Line Segment tool To draw one straight line segment at a time, use the Line tool. Select the Line tool Select Window > Properties and select stroke attributes. Note: You cannot set fill attributes for the Line tool.
  • Page 104 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Properties for a rectangle primitive. Theses Property inspector controls are specific to the Rectangle Primitive tool: Rectangle Corner Radius Controls Let you specify the corner radiuses for the rectangle. You can enter a numeric value for the inner radius in each text box.
  • Page 105 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Properties for an oval primitive. These Property inspector controls are specific to the Oval Primitive tool: Start Angle/End Angle The angle of the start point and end point of the oval. Using these controls, you can easily modify the shape of ovals and circles into pie slices, half circles, and other creative shapes.
  • Page 106 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork • For rectangles, specify the width and height in pixels, the radius of the rounded corners, and whether to draw the rectangle from the center. Draw polygons and stars Select the PolyStar tool by clicking and holding the mouse button on the Rectangle tool and selecting from the pop-up menu that appears.
  • Page 107: Drawing With The Pen Tool

    USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Use an imported bitmap as a fill when painting with the Brush tool. See “Break apart groups and objects” on page 122. If you have a Wacom pressure-sensitive tablet connected to your computer, vary the width and angle of the brush stroke by using the Brush tool Pressure and Tilt modifiers, and varying pressure on the stylus.
  • Page 108 Convert Anchor Point pointer direction lines. To enable the Convert Anchor Point pointer, use the Shift + C modifier keys to toggle the Pen tool. For a video tutorial about the Pen tool, see www.adobe.com/go/vid0120. See also “Reshape lines and shapes”...
  • Page 109 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Note: The first segment you draw is not visible until you click a second anchor point (unless you’ve specified Show Pen Preview in the Drawing category of the Preferences dialog box). Click again where you want the segment to end (Shift-click to constrain the angle of the segment to a multiple of 45°).
  • Page 110 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Drawing the first point in a curve A. Positioning Pen tool B. Starting to drag (mouse button pressed) C. Dragging to extend direction lines. Position the Pen tool where the curve segment is to end, and do one of the following: •...
  • Page 111 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Add or delete anchor points Adding anchor points can give you more control over a path or it can extend an open path. However, it’s a good idea not to add more points than necessary. A path with fewer points is easier to edit, display, and print. To reduce the complexity of a path, delete unnecessary points.
  • Page 112 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork • To delete a smooth point, click the point once with the Pen tool. A minus (-) sign appears next to the Pen tool if an anchor point can be deleted from the selected line segment. If the line segment is not yet selected, click it with the Pen tool to select it, and then delete the corner point.
  • Page 113 Jonathan Duran has provided an in-depth article entitled Using the Deco tool and Spray Brush for creating complex, geometric patterns in Flash at www.adobe.com/devnet/flash/articles/deco_intro.html. Apply patterns with the Spray Brush tool The Spray Brush acts like a particle sprayer, letting you “brush” a pattern of shapes onto the Stage at one time. By default, the Spray Brush emits a spray of dot particles using the currently selected fill color.
  • Page 114 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Select a fill color for the default particle spray. The color selector is disabled when you use a symbol in Color selector the library as a spray particle. Scale the width of a symbol used as a spray particle. For example, a value of 10% makes the symbol 10% Scale width narrower.
  • Page 115 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Apply the Grid Fill effect The Grid Fill effect lets you fill the Stage, a symbol, or closed region with a symbol from the library. After the Grid Fill is drawn to the Stage, if the filled symbol is moved or resized, the Grid Fill will move or resize accordingly. Use the Grid Fill effect to create a checkerboard, a tiled background, or area or shape with a custom pattern.
  • Page 116: Reshaping Objects

    USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Reshaping objects Reshape lines and shapes Display and adjust points with the Subselection tool Select the Subselection tool Click the line or shape outline. See also “Adjust anchor points on paths” on page 106 Reshape a line or shape To reshape a line or shape outline, drag any point on a line using the Selection tool.
  • Page 117 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Shape recognition turns the top shapes into the bottom shapes. Smoothing softens curves and reduces bumps or other variations in a curve’s overall direction. It also reduces the number of segments in a curve. Smoothing is relative, however, and has no effect on straight segments. It is particularly useful when you are having trouble reshaping a number of very short curved line segments.
  • Page 118: Transforming Objects

    USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Modify shapes To convert lines to fills, select a line or multiple lines and select Modify > Shape > Convert Lines To Fills. Selected lines are converted to filled shapes, which allows you to fill lines with gradients or to erase a portion of a line. Converting lines to fills can make file sizes larger, but it can also speed up drawing for some animations.
  • Page 119 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork When you transform an object, group, text box, or instance, the Property inspector for that item displays any changes made to the item’s dimensions or position. A bounding box appears during transform operations that involve dragging. The bounding box is rectangular (unless it was modified with the Distort command or the Envelope modifier), with its edges initially aligned parallel to the edges of the Stage.
  • Page 120 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Use the Free Transform tool You can perform individual transformations or combine several transformations, such as moving, rotating, scaling, skewing, and distortion. Note: The Free Transform tool cannot transform symbols, bitmaps, video objects, sounds, gradients, or text. If a multiple selection contains any of these items, only the shape objects are distorted.
  • Page 121 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Modify shapes with the Envelope modifier The Envelope modifier lets you warp and distort objects. An envelope is a bounding box that contains one or more objects. Changes made to an envelope’s shape affect the shape of the objects in the envelope. You edit the shape of an envelope by adjusting its points and tangent handles.
  • Page 122 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork You can rotate an object by the following methods: • Dragging with the Free Transform tool (you can skew and scale the object in the same operation). • By specifying an angle in the Transform panel (you can scale the object in the same operation). Rotate and skew objects by dragging Select the object or objects on the Stage.
  • Page 123: Moving, Arranging, And Deleting Artwork

    USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Reset a transformation performed in the Transform panel ❖ With the transformed object still selected, click the Remove Transform button in the Transform panel. Combining objects To create new shapes by combining or altering existing objects, use the Combine Objects commands in the Modify menu (Modify >...
  • Page 124 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork • A mixed selection, if you select multiple items. The pixel dimensions and x and y coordinates of the selected set of items. You can use a shape’s Property inspector to change that object’s stroke and fill. To prevent a group or symbol from being selected and accidentally changed, lock the group or symbol.
  • Page 125 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork To close the selection area, double-click. Draw a selection area with both freehand and straight-line edges When you use the Lasso tool and its Polygon Mode modifier, you can switch between the freehand and straight-edged selection modes.
  • Page 126: Arranging Objects

    For a tutorial about the layout tools in Flash, see Use Layout Tools on the Flash Tutorials page at www.adobe.com/go/learn_fl_tutorials. Select the objects to align. Select Window > Align.
  • Page 127 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork • To ungroup objects, select Modify > Ungroup, or press Control+Shift+G (Windows) or Command+Shift+G (Macintosh). Edit a group or an object within a group Select the group, and then select Edit > Edit Selected, or double-click the group with the Selection tool. Everything on the page that is not part of the group is dimmed, indicating that elements outside the group are inaccessible.
  • Page 128 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork See also “About the main toolbar and edit bar” on page 20 “Drawing preferences” on page 96 Turn object snapping on or off To turn on object snapping, use the Snap To Objects modifier for the Selection tool, or the Snap To Objects command in the View menu.
  • Page 129 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Turn on Snap Alignment When Snap Alignment is turned on, dotted lines appear on the Stage when you drag an object to the specified snap tolerance. For example, if you set Horizontal snap tolerance to 18 pixels (the default setting), a dotted line appears along the edge of the object you are dragging when the object is exactly 18 pixels from another object.
  • Page 130 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Move and copy objects by pasting To move or copy objects between layers, scenes, or other Flash files, use the pasting technique. You can paste an object in a position relative to its original position. Select an object or multiple objects.
  • Page 131: Colors, Gradients, And Strokes

    A color space is a variant of a color model and has a specific gamut (range) of colors. For example, within the RGB color model are a number of color spaces: Adobe® RGB, sRGB, and Apple® RGB.
  • Page 132 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork • Select colors in hexadecimal mode. • Create multicolor gradients. • Use gradients to produce a wide range of effects, such as giving an illusion of depth to a two-dimensional object. The Color panel with the gradient controls displayed. The Color panel contains the following controls: Changes the color of the stroke, or the border, of a graphic object.
  • Page 133 Repeats the gradient from the beginning of the gradient to the end until the selected shape is filled. Repeat Note: Overflow modes are supported only in Adobe Flash Player 8 and later. Creates a SVG-compliant (Scalable Vector Graphics) linear or radial gradient.
  • Page 134 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Export a color palette In the Swatches panel, select Save Colors from the menu in the upper-right corner and enter a name for the color palette. For Save As Type (Windows) or Format (Macintosh), select Flash Color Set or Color Table. Click Save. Create or edit a solid color You can create any color using the Color panel.
  • Page 135 Adobe® Flash® CS4 Professional provides additional control over linear and radial gradients for use with Flash Player. These controls, called overflow modes, let you specify how colors are applied beyond the gradient.
  • Page 136 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork The Stroke Color and Fill Color section of the Tools panel contains controls for activating the Stroke Color and Fill Color boxes, which in turn determine whether the strokes or fills of selected objects are affected by color choices. Also, the Colors section has controls for quickly resetting colors to the default, setting the stroke and fill color settings to None, and swapping fill and stroke colors.
  • Page 137 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork To enable stroke hinting, select the Stroke Hinting check box. Stroke hinting adjusts line and curve anchors on full pixels, preventing blurry vertical or horizontal lines. To set the style for a path end, select a Cap option: Is flush with the path’s end.
  • Page 138 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Copy strokes and fills Use the Eyedropper tool to copy fill and stroke attributes from one object and immediately apply them to another object. The Eyedropper tool also lets you sample the image in a bitmap to use as a fill. To apply the attributes of a stroke or filled area to another stroke or filled area, select the Eyedropper tool and click the stroke or filled area whose attributes you want to apply.
  • Page 139 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Transform gradient and bitmap fills You can transform a gradient or bitmap fill by adjusting the size, direction, or center of the fill. Select the Gradient Transform tool from the Tools panel. If you do not see the Gradient Transform tool in the Tools panel, click and hold on the Free Transform tool and then select the Gradient Transform tool from the menu that appears.
  • Page 140 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork • To change the width of the gradient or bitmap fill, drag the square handle on the side of the bounding box. (This option resizes only the fill, not the object containing the fill.) •...
  • Page 141 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork • To change the focal point of a circular gradient, drag the middle circular handle on the bounding circle. • To skew or slant a fill within a shape, drag one of the circular handles on the top or right side of the bounding box. •...
  • Page 142: Kuler Panel

    The Kuler panel is available in Adobe Photoshop® CS4, Adobe Flash® Professional CS4, Adobe InDesign® CS4, Adobe Illustrator® CS4, and Adobe Fireworks® CS4. The panel is not available in the French versions of these products. For a video on the Kuler panel, see www.adobe.com/go/lrvid4088_xp.
  • Page 143 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork To delete a saved search, select the Custom option in the pop-up menu. Then clear the searches you want to delete, and click Save. Working with themes You can use the Kuler panel to create or edit themes, and include them in your projects. Note: In Illustrator, you create and edit themes with the Edit Color/Recolor Artwork dialog box, rather than the Create panel.
  • Page 144: 3D Graphics

    USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork • Double-click any of the swatches in the color group to set the active color (foreground/background or stroke/fill) in your application. If the application doesn't have an active or selected color feature, the Kuler panel sets the foreground color or the fill color as appropriate.
  • Page 145 For more information about mask layers, see “Using mask layers” on page 221. For a video tutorial about 3D graphics, see Working with 3D Art at www.adobe.com/go/lrvid4059_fl. Move objects in 3D space You move movie clip instances in 3D space with the 3D Translation tool .
  • Page 146 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork The default mode of the 3D Translation tool is global. Moving an object in global 3D space is the same as moving it relative to the Stage. Moving an object in local 3D space is the same as moving it relative to its parent movie clip if it has one.
  • Page 147 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Move a multiple-object selection in 3D space When you select multiple movie clips, you can move one of the selected objects with the 3D Translation tool the others move in the same way. •...
  • Page 148 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork The Local 3D Rotation tool overlay. Rotate a single object in 3D space Select the 3D Rotation tool in the Tools panel (or press the W key). Verify that the tool is in the mode that you want by checking the Global toggle button in the Options section of the Tools panel.
  • Page 149 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Drag one of the axis controls to rotate around that axis, or the free rotate control (outer orange circle) to rotate X and Y simultaneously. Drag the x-axis control left or right to rotate around the x axis. Drag the y-axis control up or down to rotate around the y axis.
  • Page 150 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork The Stage with a Perspective Angle of 55. The Stage with a Perspective Angle of 110. The Perspective Angle property affects all movie clips with 3D translation or rotation applied to them. The Perspective Angle does not affect other movie clips.
  • Page 151 USING FLASH CS4 PROFESSIONAL Creating and Editing Artwork Adjust the Vanishing Point The Vanishing Point property of a FLA file controls the orientation of the z axis of 3D movie clips on the Stage. The z axes of all 3D movie clips in a FLA file recede toward the Vanishing Point. By relocating the Vanishing Point, you change the direction that an object moves when translated along its z axis.
  • Page 152: Chapter 6: Symbols, Instances, And Library Assets

    Chapter 6: Symbols, instances, and library assets Adobe® Flash® CS4 Professional allows you to import and create many kinds of assets to populate your Flash documents. These assets are managed in Flash as symbols, instances, and library assets. Understanding how these types of assets work together lets you make good choices about how and when to use them, and anticipate the best design options for your work.
  • Page 153 You define the graphics associated with various button states, and then assign actions to a button instance. For more information, see Handling events in Learning ActionScript 2.0 in Adobe Flash or Handling events in Programming ActionScript 3.0.
  • Page 154 USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets See also “Editing instance properties” on page 153 “Sharing library assets” on page 162 “Embed and share fonts” on page 251 Convert selected elements to a symbol Select an element or several elements on the Stage. Do one of the following: •...
  • Page 155 USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets Convert animation on the Stage into a movie clip symbol To reuse an animated sequence on the Stage, or to manipulate it as an instance, select it and save it as a movie clip symbol.
  • Page 156 USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets • In a separate window, using the Edit In New Window command. Editing a symbol in a separate window lets you see the symbol and the main Timeline at the same time. The name of the symbol you are editing appears in the Edit bar at the top of the Stage.
  • Page 157: Working With Symbol Instances

    You can give names to instances from the Property inspector. Use the instance name to refer to an instance in ActionScript. To control instances with ActionScript®, give each instance within a single timeline a unique name. For more information, see Handling events in Learning ActionScript 2.0 in Adobe Flash or Handling events in Programming ActionScript 3.0.
  • Page 158 In addition, you can name a movie clip or button instance so that you can use ActionScript to change its properties. For more information, see Classes in Learning ActionScript 2.0 in Adobe Flash at http://www.adobe.com/go/learn_fl_cs4_learningAS2_en Objects and classes in Programming ActionScript 3.0.
  • Page 159 USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets In the Property inspector, select one of the following options from the Style menu in the Color Effect section: Adjusts the relative lightness or darkness of the image, measured on a scale from black (–100%) to white Brightness (100%).
  • Page 160 USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets Replace all instances of a symbol ❖ Drag a symbol with the same name as the symbol you are replacing from one Library panel into the Library panel of the FLA file you are editing and click Replace. If you have folders in the library, the new symbol must be dragged into the same folder as the symbol you are replacing.
  • Page 161 USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets Get information about instances on the Stage The Property inspector and Info panel display the following information about instances selected on the Stage: • In the Property inspector, view the instance’s behavior and settings—for all instance types, color effect settings, location, and size;...
  • Page 162: Working With The Library

    USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets Working with the library Managing assets with the library The library in a Flash document stores media assets that you create in the Flash authoring environment or import to use in the document. You can create vector artwork or text directly in Flash; import vector artwork, bitmaps, video, and sound;...
  • Page 163 USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets Change the width of columns ❖ Position the pointer between column headers and drag to resize. You cannot change the order of columns. Access the Panel menu for the Library panel ❖...
  • Page 164 USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets Move an item between folders ❖ Drag the item from one folder to another. If an item with the same name exists in the new location, Flash prompts you to replace it with the item you are moving. Sort items in the Library panel Columns in the Library panel list the name of an item, its type, the number of times it’s used in the file, its linkage status and identifier (if the item is associated with a shared library or is exported for ActionScript), and the date on which it...
  • Page 165 Create a Flash file with a library containing the symbols that you want to include in the common library. Place the Flash file in the user-level Libraries folder on your hard disk. • On Windows® XP, the path is C:\Documents and Settings\username\Local Settings\Application Data\Adobe\Flash CS4\language\Configuration\Libraries\. •...
  • Page 166 USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets See also “Work with folders in the Library panel” on page 158 “Working with button symbols” on page 164 “Sharing library assets” on page 162 Copy a library asset by copying and pasting Select the asset on the Stage in the source document.
  • Page 167: Sharing Library Assets

    USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets If the Resolve Library Conflict dialog box appears when you are importing or copying library assets into a document, resolve the naming conflict. Resolve naming conflicts between library assets ❖ Do one of the following in the Resolve Library Conflict dialog box: •...
  • Page 168 Note: Flash also uses the linkage identifier to identify a movie clip or button that is used as an object in ActionScript. See Working with movie clips in Learning ActionScript 2.0 in Adobe Flash or Working with movie clips in Programming ActionScript 3.0.
  • Page 169: Working With Button Symbols

    Button components also include prebuilt features, such as accessibility support, and can be customized. Button components include the Button, RadioButton, and CheckBox. For more information, see Button component in ActionScript 2.0 Components Language Reference at http://www.adobe.com/go/learn_fl_cs4_as2clr_en Use the Button component in Using ActionScript 3.0 Components.
  • Page 170 USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets Select Insert > New Symbol, or press Control+F8 (Windows) or Command+F8 (Macintosh). To create the button, you convert the button frames to keyframes. In the Create New Symbol dialog box, enter a name for the new button symbol. For the symbol Type, select Button. Flash switches to symbol-editing mode.
  • Page 171: Scaling And Caching Symbols

    USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets • Use the arrow keys to move the button. • If the Property inspector is not visible, select Window > Properties to edit the button in the Property inspector, or Alt+double-click (Windows) or Option+double-click (Macintosh) the button. Test a button ❖...
  • Page 172 Symbols, instances, and library assets A 9-slice-enabled symbol in the Library panel and scaled on the Stage For video tutorials about 9-slice scaling, see: • www.adobe.com/go/vid0204 • www.adobe.com/go/vid0205 Edit movie clip symbols with 9-slice scaling By default, slice guides are placed at 25% (or one-fourth) of the symbol’s width and height from the edge of the symbol.
  • Page 173: Symbols And Actionscript

    ActionScript. You can write the ActionScript yourself or use the pre-defined behaviors included with Flash. For more information, see Handling events in Learning ActionScript 2.0 in Adobe Flash or Handling events in Programming ActionScript 3.0.
  • Page 174 USING FLASH CS4 PROFESSIONAL Symbols, instances, and library assets See also “Edit symbols” on page 150 Controlling instances with behaviors In FLA files where the ActionScript Publish setting is set to ActionScript 2.0, you can use behaviors to control movie clip and graphic instances in a document without writing ActionScript.
  • Page 175 Extending Flash. To learn about ActionScript, see Programming ActionScript 3.0 or Learning ActionScript 2.0 in Adobe Flash. You can also download behaviors that other Flash users have created from the Adobe Flash Exchange website. You can visit the Adobe Exchange at: www.adobe.com/go/flash_exchange.
  • Page 176 To learn about the tags and parameters used to create your own custom dialog boxes, see Extending Flash. In the tag, insert the ActionScript code to create the behavior. <actionscript> If you are new to ActionScript, see Learning ActionScript 2.0 in Adobe Flash Programming ActionScript 3.0. For example (from the Movieclip_loadMovie.xml behavior file) (ActionScript 2.0): <actionscript>...
  • Page 177: Chapter 7: Timelines And Animation

    Frames and keyframes Like films, Adobe® Flash® CS4 Professional documents divide lengths of time into frames. In the Timeline, you work with these frames to organize and control the content of your document. You place frames in the Timeline in the order you want the objects in the frames to appear in your finished content.
  • Page 178 USING FLASH CS4 PROFESSIONAL Timelines and Animation • To select multiple non-contiguous frames, Control-click (Windows) or Command-click (Macintosh) additional frames. • To select all frames in the Timeline, select Edit > Timeline > Select All Frames. • To select an entire span of static frames, double-click a frame between two keyframes. If you have Span Based Selection enabled, click any frame in the sequence.
  • Page 179 USING FLASH CS4 PROFESSIONAL Timelines and Animation When you create a Flash document, it contains only one layer. To organize the artwork, animation, and other elements in your document, add more layers. You can also hide, lock, or rearrange layers. The number of layers you can create is limited only by your computer’s memory, and layers do not increase the file size of your published SWF file.
  • Page 180 USING FLASH CS4 PROFESSIONAL Timelines and Animation • Click the New Folder icon at the bottom of the Timeline. The new folder appears above the layer or folder you selected. Organize layers and layer folders To organize your document, rearrange layers and folders in the Timeline. Layer folders help organize your workflow by letting you place layers in a tree structure.
  • Page 181 USING FLASH CS4 PROFESSIONAL Timelines and Animation Copy the contents of a layer folder Collapse the folder (click the triangle to the left of the folder name in the Timeline) and click the folder name to select the entire folder. Select Edit >...
  • Page 182 USING FLASH CS4 PROFESSIONAL Timelines and Animation • To display objects on all layers as outlines, click the outline icon. To turn off outline display on all layers, click it again. • To display objects on all layers other than the current layer as outlines, Alt-click (Windows) or Option-click (Macintosh) in the Outline column to the right of a layer’s name.
  • Page 183: Working With Scenes

    USING FLASH CS4 PROFESSIONAL Timelines and Animation If you load documents into levels above level 0, the documents stack on top of one another like drawings on transparent paper; when there is no content on the Stage, you can see through to the content on lower levels. If you load a document into level 0, it replaces the main timeline.
  • Page 184 USING FLASH CS4 PROFESSIONAL Timelines and Animation Using scenes is similar to using several FLA files together to create a larger presentation. Each scene has a Timeline. Frames in the document are numbered consecutively through the scenes. For example, if a document contains two scenes with ten frames each, the frames in Scene 2 are numbered 11–20.
  • Page 185: Timelines And Actionscript

    USING FLASH CS4 PROFESSIONAL Timelines and Animation View a particular scene ❖ Select View > Go To, and then select the name of the scene from the submenu. Timelines and ActionScript With ActionScript®, you can control the Timeline at runtime. Using ActionScript allows you to create interaction and other capabilities in your FLA files that is not possible with the Timeline alone.
  • Page 186 USING FLASH CS4 PROFESSIONAL Timelines and Animation To target the instance from an action in the Timeline of , you could use the following relative path: atlanta charleston _parent._parent.georgia.atlanta Relative paths are useful for reusing scripts. For example, you could attach the following script to a movie clip that magnifies its parent by 150%: onClipEvent (load) {_parent._xscale = 150;_parent._yscale = 150;...
  • Page 187 USING FLASH CS4 PROFESSIONAL Timelines and Animation Specify target paths To control a movie clip, loaded SWF file, or button, you must specify a target path. You can specify it manually, or by using the Insert Target Path dialog box, or by creating an expression that evaluates to a target path. To specify a target path for a movie clip or button, you must assign an instance name to the movie clip or button.
  • Page 188: Animation Basics

    + i).play(); Animation basics Types of animation Adobe® Flash® CS4 Professional provides several ways to create animation and special effects. Each method provides you with different possibilities for creating engaging animated content. Flash supports the following types of animation:...
  • Page 189 USING FLASH CS4 PROFESSIONAL Timelines and Animation About frame rates The frame rate, the speed the animation is played at, is measured in number of frames per second (fps). A frame rate that’s too slow makes the animation appear to stop and start; a frame rate that’s too fast blurs the details of the animation.
  • Page 190 USING FLASH CS4 PROFESSIONAL Timelines and Animation • A black dot at the beginning keyframe with a black arrow and a light green background indicates a shape tween. • A black dot indicates a single keyframe. Light gray frames after a single keyframe contain the same content with no changes.
  • Page 191: Additional Resources

    Right-click (Windows) or Control-click (Macintosh) one of the selected objects, and select Distribute To Layers. Additional resources Jen DeHaan has written a detailed article titled Creating animation in ActionScript 3.0, available in the Adobe Flash Professional Developer Center. Updated 5 March 2009...
  • Page 192: Motion Tweens

    USING FLASH CS4 PROFESSIONAL Timelines and Animation Motion tweens About tweened animation A tween is an animation that is created by specifying a value for an object property in one frame and another value for that same property in another frame. Flash calculates the values for that property in between those two frames. The term tween comes from the words “in between”.
  • Page 193 For more information about these concepts, refer to the list of links at the bottom of this page. For video tutorials about animation, see the following: • Creating motion tweens: www.adobe.com/go/lrvid4054_fl • Creating shape tweens: www.adobe.com/go/vid0124 • Creating and animating masks: www.adobe.com/go/vid0127...
  • Page 194 USING FLASH CS4 PROFESSIONAL Timelines and Animation Differences between motion tweens and classic tweens Flash supports two different types of tweens for creating motion. Motion tweens, introduced in Flash CS4 Professional, are powerful and simple to create. Motion tweens allow the greatest control over tweened animation. Classic tweens, which include all tweens created in earlier versions of Flash, are more complex to create.
  • Page 195 Note: Motion presets can only contain motion tweens. Classic tweens cannot be saved as motion presets. For a video tutorial about motion presets, see Using Motion Presets at www.adobe.com/go/lrvid4056_fl. See also “Create a motion tween”...
  • Page 196 The new preset appears in the Motion Presets panel. Flash saves the preset as an XML file. The files are stored in the following directories: • Windows: <hard disk>\Documents and Settings\<user>\Local Settings\Application Data\Adobe\Flash CS4\<language>\Configuration\Motion Presets\ • Macintosh: <hard disk>/Users/<user>/Library/Application Support/Adobe/Flash CS4/<language>/Configuration/Motion Presets/...
  • Page 197 Create a SWF file from the FLA file with the Publish command. Place the SWF file in the same directory as the saved custom motion preset XML file. These files are stored in the following directories: • Windows: <hard disk>\Documents and Settings\<user>\Local Settings\Application Data\Adobe\Flash CS4\<language>\Configuration\Motion Presets\ • Macintosh: <hard disk>/Users/<user>/Library/Application Support/Adobe/Flash CS4/<language>/Configuration/Motion Presets/...
  • Page 198 You cannot add a motion guide to a tween/inverse kinematics layer. For a video tutorial about motion tweens, see Creating Motion Tweens, Part 1 at www.adobe.com/go/lrvid4054_fl Creating Motion Tweens, Part 2 at www.adobe.com/go/lrvid4055_fl. For information about tweening Inverse Kinematic bones, see “Animate an armature”...
  • Page 199 USING FLASH CS4 PROFESSIONAL Timelines and Animation A motion path appears on the Stage showing the path from the position in the first frame of the tween span to the new position. Because you explicitly defined the X and Y properties of the object, property keyframes are added for X and Y in the frame containing the playhead.
  • Page 200 USING FLASH CS4 PROFESSIONAL Timelines and Animation • Create a tween on a separate layer and then drag the span to the desired layer. • Drag a static frame from another layer to the tween layer and then add a tween to an object in the static frame. •...
  • Page 201 USING FLASH CS4 PROFESSIONAL Timelines and Animation • Set the X and Y values for the path in the Property inspector. The X and Y values are for the upper-left corner of the bounding box of the motion path. • Use the Arrow keys to move the motion path.
  • Page 202 USING FLASH CS4 PROFESSIONAL Timelines and Animation Delete a motion path from a tween Select the motion path on the Stage by clicking it with the Selection tool. Press the Delete key. Copy a motion path as a stroke Click the motion path on the Stage to select it. Choose Edit >...
  • Page 203 USING FLASH CS4 PROFESSIONAL Timelines and Animation Note: If you enable roving keyframes for a tween span and then disable them, the keyframes retain their locations in the span that resulted from enabling roving. A motion path with roving keyframes turned off. Note the uneven distribution of frames, resulting in uneven speed of motion. The same motion path with roving keyframes turned on, resulting in even distribution of frames along the path and even speed of motion.
  • Page 204 USING FLASH CS4 PROFESSIONAL Timelines and Animation Move, duplicate, or delete tween spans • To move a span to a new location in the same layer, drag the span. Note: Locking a layer prevents editing on the Stage but not the Timeline. Moving a span on top of another span consumes the overlapped frames of the second span.
  • Page 205 USING FLASH CS4 PROFESSIONAL Timelines and Animation • To paste frames into an existing tween span, Ctrl-drag (Windows) or Command-drag (Macintosh) to select the frames to replace and choose Paste Frames from the span context menu. Simply pasting an entire span onto another span replaces the entire second span. Replace or remove the target instance of a tween To replace the target instance of a tween span, do one of the following: •...
  • Page 206 USING FLASH CS4 PROFESSIONAL Timelines and Animation Copy and paste a motion tween You can copy the tweened properties from one tween span to another. The tweened properties are applied to the new target object, but the location of the target object is not changed. This allows you to apply a tween from one area of the Stage to an object in another area without repositioning the new target object.
  • Page 207 USING FLASH CS4 PROFESSIONAL Timelines and Animation Copy motion as ActionScript 3.0 Copy the properties that define a motion tween in the Timeline as ActionScript 3.0 and apply that motion to another symbol, either in the Actions panel or in the source files (such as class files) for a Flash document that uses ActionScript 3.0. Use the classes to customize the Flash-generated ActionScript for your specific project.
  • Page 208 USING FLASH CS4 PROFESSIONAL Timelines and Animation Editing property curves with the Motion Editor The Motion Editor panel lets you view all tween properties and their property keyframes. It also provides tools for adding precision and detail to tweens. The Motion Editor displays the properties of the currently selected tween. Once you have created a tween in the Timeline, the Motion Editor allows you to control the tween in several different ways.
  • Page 209 Some properties have minimum or maximum values that cannot be exceeded, such as Alpha transparency (0-100%). The graphs for these properties cannot apply values outside the acceptable range. For a video tutorial about the Motion Editor, see Using the Motion Editor at www.adobe.com/go/lrvid4057_fl. See also “Drawing with the Pen...
  • Page 210 USING FLASH CS4 PROFESSIONAL Timelines and Animation Edit the shape of property curves The Motion Editor allows you to precisely control the shape of each property curve of a tween, except for X, Y, and Z. For all other properties, you can edit the curve of each graph with standard Bezier controls. Using these controls is similar to how you edit strokes with the Selection tool or the Pen tool.
  • Page 211 USING FLASH CS4 PROFESSIONAL Timelines and Animation Work with property keyframes You can edit the shape of a property curve by adding, removing, and editing property keyframes along each graph. • To add a property keyframe to a property curve, place the playhead in the desired frame and click the Add or Remove Keyframe button for the property in the Motion Editor.
  • Page 212 USING FLASH CS4 PROFESSIONAL Timelines and Animation • To link associated pairs of X and Y properties, click the Link X and Y Property Values button for either one of the properties you want to link. When the properties are linked, their values are constrained so the ratio between them is preserved when you enter a value for either of the linked properties.
  • Page 213 USING FLASH CS4 PROFESSIONAL Timelines and Animation The same motion path with the Stop and Start (Medium) ease applied. Note the concentration of frames near the ends of the path, resulting in more realistic acceleration and deceleration of the car. You can apply easing in the Property inspector or the Motion Editor.
  • Page 214 USING FLASH CS4 PROFESSIONAL Timelines and Animation Enter a value for the strength of the ease in the Ease Value field. Ease individual properties in the Motion Editor You can apply a preset ease to an individual property or a category of properties in the Motion Editor. The shapes of the ease curves included with Flash.
  • Page 215: Working With Classic Tweens

    “Differences between motion tweens and classic tweens” on page 189. For samples of classic tween animation, see the Flash Samples page at www.adobe.com/go/learn_fl_samples. The following samples are available: • Animated Drop Shadow: Download and decompress the Samples ZIP file and navigate to the Graphics\AnimatedDropShadow folder to access the sample.
  • Page 216 USING FLASH CS4 PROFESSIONAL Timelines and Animation Create and edit keyframes for classic tweens Changes in the animation are defined in a keyframe. When you create frame-by-frame animation, every frame is a keyframe. In tweened animation, you define keyframes at significant points in the animation and Flash creates the contents of frames between.
  • Page 217 For a video tutorial about classic tweens, see www.adobe.com/go/vid0125. For a text tutorial about classic tweens, see Create a Timeline Animation on the Flash Tutorials page at www.adobe.com/go/learn_fl_tutorials. For samples of classic tween animation, see the Flash Samples page at www.adobe.com/go/learn_fl_samples. The following samples are available: •...
  • Page 218 A normal layer that is linked to a motion guide layer becomes a guided layer. In this example, two objects on separate layers are attached to the same motion path. For a video tutorial about classic tweens, see www.adobe.com/go/vid0125. Updated 5 March 2009...
  • Page 219 Timelines and Animation For a written tutorial about classic tweens, see Create a Timeline Animation on the Flash Tutorials web page at www.adobe.com/go/learn_fl_tutorials. For samples of classic tween animation, see the Flash Samples page at www.adobe.com/go/learn_fl_samples. The following samples are available: •...
  • Page 220 USING FLASH CS4 PROFESSIONAL Timelines and Animation Link layers to a motion guide layer ❖ Do one of the following: • Drag an existing layer below the motion guide layer. The layer is indented under the motion guide layer. All objects on this layer automatically snap to the motion path.
  • Page 221 USING FLASH CS4 PROFESSIONAL Timelines and Animation Apply custom ease in/ease out to classic tweens The Custom Ease In/Ease Out dialog box displays a graph representing the degree of motion over time. The horizontal axis represents frames, and the vertical axis represents percentage of change. The first keyframe is represented as 0%, and the last keyframe is represented as 100%.
  • Page 222 USING FLASH CS4 PROFESSIONAL Timelines and Animation In the lower-right corner of the dialog box, a numeric value displays the Position of the selected control point keyframe and position of the selected control point. If no control point is selected, no value appears. To add a control point to the line, click the diagonal line once.
  • Page 223: Shape Tweening

    USING FLASH CS4 PROFESSIONAL Timelines and Animation Shape tweening About shape tweens In shape tweening, you draw a vector shape at one specific frame in the Timeline, and change that shape or draw another shape at another specific frame. Flash then interpolates the intermediate shapes for the frames in between, creating the animation of one shape morphing into another.
  • Page 224 • Shape hints work best if you place them in counterclockwise order beginning at the top-left corner of the shape. For a video tutorial about shape tweens, see www.adobe.com/go/vid0124. Use shape hints Select the first keyframe in a shape-tweened sequence.
  • Page 225: Frame-By-Frame Animation

    USING FLASH CS4 PROFESSIONAL Timelines and Animation Remove a shape hint ❖ Drag it off the Stage. Remove all shape hints ❖ Select Modify > Shape > Remove All Hints. Frame-by-frame animation Create frame-by-frame animations Frame-by-frame animation changes the contents of the Stage in every frame and is best suited to complex animation in which an image changes in every frame instead of simply moving across the Stage.
  • Page 226: Using Mask Layers

    USING FLASH CS4 PROFESSIONAL Timelines and Animation Use onion skinning Usually, one frame of the animation sequence at a time appears on the Stage. To help position and edit a frame-by- frame animation, view two or more frames on the Stage at once. The frame under the playhead appears in full color, while surrounding frames are dimmed, making it appear as if each frame were drawn on a sheet of translucent onion- skin paper and the sheets were stacked on top of each other.
  • Page 227 For a video tutorial about animating masks, see www.adobe.com/go/vid0127. For a sample of scriptable masks, see the Flash Samples web page at www.adobe.com/go/learn_fl_samples. Download and decompress the Samples zip file and navigate to the Masking\ScriptableMasks folder to access the sample.
  • Page 228: Using Inverse Kinematics

    USING FLASH CS4 PROFESSIONAL Timelines and Animation Unlink layers from a mask layer ❖ Select the layer to unlink and do one of the following: • Drag the layer above the mask layer. • Select Modify > Timeline > Layer Properties, and select Normal. Animate a filled shape, type object, or graphic symbol instance on a mask layer Select the mask layer in the Timeline.
  • Page 229 USING FLASH CS4 PROFESSIONAL Timelines and Animation A shape with an IK armature added. A group of several symbols with IK bones attached. A chain of bones is called an armature. The bones in an armature are connected to each other in a parent-child hierarchy.
  • Page 230 Note: To use inverse kinematics, your FLA file must specify ActionScript 3.0 as the Script setting in the Flash tab of the Publish Settings dialog box. For a video tutorial about inverse kinematics, see Using Inverse Kinematics at www.adobe.com/go/lrvid4058_fl. See also “Drawing modes and graphic...
  • Page 231 USING FLASH CS4 PROFESSIONAL Timelines and Animation When dragging from one instance to another to create a bone, click the first instance at the specific point where you want to attach the bone to the instance. Release the mouse over the specific point on the second instance where you want the bone to attach.
  • Page 232 USING FLASH CS4 PROFESSIONAL Timelines and Animation The shape can contain multiple colors and strokes. Edit the shapes so they are as close to their final form as possible. Once you add bones to a shape, the options for editing the shape become more limited. Select the entire shape on the stage.
  • Page 233 USING FLASH CS4 PROFESSIONAL Timelines and Animation Select bones and associated objects • To select an individual bone, click the bone with the Selection tool. The bone properties appear in the Property inspector. You can also Shift-click to select multiple bones. •...
  • Page 234 USING FLASH CS4 PROFESSIONAL Timelines and Animation Edit an IK shape You can add, delete, and edit control points of the contours in an IK shape using the Subselection tool. • To move the position of a bone without changing the IK shape, drag the endpoint of a bone. •...
  • Page 235 USING FLASH CS4 PROFESSIONAL Timelines and Animation You can enable, disable, and constrain the rotation of a bone and its motion along the x or y axis. By default, bone rotation is enabled and x and y axis motion are disabled. When x or y axis motion is enabled, a bone can move along the x or y axis to an unlimited degree, and the length of the parent bone changes to accommodate the motion.
  • Page 236 USING FLASH CS4 PROFESSIONAL Timelines and Animation Animate an armature in the Timeline IK armatures exist on pose layers in the Timeline. To animate armatures in the Timeline, insert poses by right-clicking a frame in a pose layer and selecting Insert Pose. Use the Selection tool to change the configuration of the armature. Flash automatically interpolates the positions of the bones in the frames between poses.
  • Page 237 USING FLASH CS4 PROFESSIONAL Timelines and Animation Prepare an armature for runtime animation with ActionScript 3.0 IK armatures connected to shapes or movie clip instances can be controlled with ActionScript 3.0. Armatures connected to graphic or button symbol instances cannot be controlled with ActionScript. Only armatures with a single pose can be controlled with ActionScript.
  • Page 238 USING FLASH CS4 PROFESSIONAL Timelines and Animation When you are finished, scrub the playhead in the Timeline between the 2 pose frames where you applied the ease to preview the eased motion on the Stage. See also “Easing tweens” on page 207 Updated 5 March 2009...
  • Page 239: Chapter 8: Filters And Blends

    Chapter 8: Filters and Blends Adobe® Flash® CS4 Professional special effects include filters, which let you add visual effects to text, buttons, and movie clips; and blend modes, which let you create composite images. About filters Filter overview Adobe® Flash® CS4 Professional filters (graphic effects) let you add interesting visual effects to text, buttons, and movie clips.
  • Page 240: Applying Filters

    The type, number, and quality of the filters you apply to objects can affect the performance of SWF files as you play them. The more filters you apply to an object, the greater the number of calculations Adobe® Flash® Player must process to correctly display the visual effects you’ve created.
  • Page 241 USING FLASH CS4 PROFESSIONAL Filters and Blends The Add Filter menu in the Property inspector Apply or remove a filter Select a text, button, or movie clip object to apply a filter to or remove a filter from. In the Filters section of the Property inspector, do one of the following: •...
  • Page 242 The filter configuration file is an XML file that is saved in the Flash Configuration folder in the following location: • Windows XP: C:\Documents and Settings\username\Local Settings\Application Data\Adobe\Flash CS4\language\Configuration\Filters\filtername.xml •...
  • Page 243 Filters and Blends For a sample of a drop shadow with a classic tween, see the Flash Samples page at www.adobe.com/go/learn_fl_samples. Download and decompress the Samples zip file and navigate to the Graphics\AnimatedDropShadow directory. Select the object to apply a drop shadow to.
  • Page 244 USING FLASH CS4 PROFESSIONAL Filters and Blends Text with the Blur filter applied Select an object to apply a blur to, and select Filters. Click the Add Filter button , and select Blur. Edit the filter settings on the Filter tab: •...
  • Page 245 USING FLASH CS4 PROFESSIONAL Filters and Blends Text with a bevel applied Select an object to apply a bevel to, and select Filters. Click the Add Filter button , and select Bevel. Edit the filter settings in the Filter tab: •...
  • Page 246 USING FLASH CS4 PROFESSIONAL Filters and Blends To add a pointer to the gradient, click on or below the gradient definition bar. To create a gradient with up to 15 color transitions, add up to 15 color pointers. To reposition a pointer on the gradient, drag the pointer along the gradient definition bar.
  • Page 247: Applying Blend Modes

    The result of the blend’s effect on the base color. Result color Blend modes depend on both the color of the object you’re applying the blend to and the underlying color. Adobe® recommends that you experiment with the different blend modes to achieve the desired effect.
  • Page 248 USING FLASH CS4 PROFESSIONAL Filters and Blends Blend mode examples The following examples illustrate how different blend modes affect the appearance of an image. The resulting effect of a blend mode might be considerably different, depending on the color of the underlying image and the type of blend mode you apply.
  • Page 249: Chapter 9: Text

    About text You can include text in your Adobe® Flash® CS4 Professional applications in a variety of ways. You can create text fields containing static text, which you create when you author the document. You can also create dynamic text fields, which display updating text, such as stock quotes or news headlines, and input text fields, which allow users to enter text for forms or surveys.
  • Page 250 Flash Player’s memory usage. Using four or five fonts, for example, can increase memory usage by approximately 4 MB. When the publish setting of your file is Adobe® Flash® Player 8 or later, and Anti-Alias For Readability or Custom Anti- Alias is your chosen anti-aliasing option, high-quality anti-aliasing applies to the following: •...
  • Page 251: Creating Text

    You can use a movie clip to mask device font text in another movie clip. (You cannot mask device fonts by using a mask layer on the Stage.) For this movie clip mask to function, the user must have Flash Player 6 (6.0.40.0) from Adobe or later.
  • Page 252 USING FLASH CS4 PROFESSIONAL Text • Dynamic text fields display dynamically updating text, such as stock quotes or weather reports. • Input text fields allow users to enter text in forms or surveys. You can create horizontal text (with a left-to-right flow) or static vertical text (with either a right-to-left or left-to- right flow).
  • Page 253 USING FLASH CS4 PROFESSIONAL Text • For dynamic or input text that has a defined height and width, a square handle appears at the lower-right corner of the text field. • For dynamic scrollable text fields, the round or square handle becomes solid black instead of hollow. Shift-double-click the handle of dynamic and input text fields to create text fields that don’t expand when you enter text on the Stage.
  • Page 254 Although you can use the variable name method with dynamic text fields for backwards compatibility to Macromedia Flash 5 and earlier versions, Adobe doesn't recommend this, because you can't control other text field properties, or apply style sheet settings.
  • Page 255: Check Spelling

    USING FLASH CS4 PROFESSIONAL Text Click Character Embedding for embedded font outline options: Specifies that no fonts be embedded. Don’t embed Click Auto Fill to embed all of the characters from the selected text field. Auto fill Set preferences for vertical text Select Edit >...
  • Page 256 USING FLASH CS4 PROFESSIONAL Text Adds words and phrases to your personal dictionary. In the Personal Dictionary dialog box, Edit Personal Dictionary enter each new item on a separate line in the text field. Use these options to control how Flash handles specific types of words and characters when Checking Options checking spelling.
  • Page 257: Transforming Text

    See Example: Creating scrolling hscroll maxhscroll text in Learning ActionScript 2.0 in Adobe Flash. Make dynamic text scrollable ❖ Do one of the following: • Shift-double-click the lower-right handle on the dynamic text field. The handle will turn from an unfilled square (non-scrollable) to a filled square (scrollable).
  • Page 258 USING FLASH CS4 PROFESSIONAL Text See also “Distributing objects to layers for tweened animation” on page 186 “Timelines and Animation” on page 172 Link horizontal text to a URL Select text or a text field: • Use the Text tool to select text in a text field.
  • Page 259: Setting Text Attributes

    USING FLASH CS4 PROFESSIONAL Text View all the missing fonts in a document and reselect substitute fonts With the document active in Flash, select Edit > Font Mapping (Windows) or Flash > Font Mapping (Macintosh). Click a font in the Missing Fonts column to select it. Shift-click to select multiple missing fonts to map them all to the same substitute font.
  • Page 260 USING FLASH CS4 PROFESSIONAL Text Note: The _sans, _serif, _typewriter, and device fonts can be used only with static horizontal text. Enter a value for the font size. Font size is set in points, regardless of the current ruler units. To apply bold or italic style, select the style from the Style menu.
  • Page 261 USING FLASH CS4 PROFESSIONAL Text Margins determine the amount of space between the border of a text field and its text. Indents determine the distance between the margin of a paragraph and the beginning of the first line. Line spacing determines the distance between adjacent lines in a paragraph. For vertical text, line spacing adjusts the space between vertical columns.
  • Page 262 USING FLASH CS4 PROFESSIONAL Text Turns off anti-aliasing and provides no text smoothing. The text is displayed using sharp Bitmap Text (No Anti-Alias) edges, and the resulting SWF file size is increased because the font outlines are embedded in the file. Bitmap text is sharp at the exported size, but scales poorly.
  • Page 263: About Multilanguage Text

    For Unicode-encoded text to appear correctly, users must have access to fonts containing the glyphs (characters) used in that text. For a sample of multilingual content, see the Flash Samples page at www.adobe.com/go/learn_fl_samples. Download and decompress the Samples zip file and navigate to the Text\MultilingualContent folder to access the sample.
  • Page 264 The UnicodeTable.xml file contains ranges of characters required for various languages and resides in the user configuration folder of your computer. The is located in the following directories: • Windows: <boot drive>\Documents and Settings\<user>\Local Settings\Application Data\Adobe\Flash<version>\<language>\Configuration\FontEmbedding\ • Macintosh: <user>/Library/Application Support/Adobe/Flash <version>/<language>/Configuration/FontEmbedding/ Updated 5 March 2009...
  • Page 265 USING FLASH CS4 PROFESSIONAL Text The font set groupings are based on the Unicode Blocks as defined by the Unicode Consortium. To provide a simpler workflow, when you select a particular language, all related glyph ranges are embedded even if they are scattered into disjointed groupings.
  • Page 266 USING FLASH CS4 PROFESSIONAL Text Range Description Thai All Thai glyphs Devanagari All Devanagari glyphs Latin I Latin-1 Supplement range 0x00A1 to 0x00FF (including punctuation, superscripts and subscripts, currency symbols, and letter-like symbols) Latin Extended A Latin Extended-A range 0x0100 to 0x01FF (including punctuation, superscripts and subscripts, currency symbols, and letter-like symbols) Latin Extended B Latin Extended-B range 0x0180 to 0x024F (including punctuation, superscripts and...
  • Page 267 USING FLASH CS4 PROFESSIONAL Text Unicode can encode most languages and characters used throughout the world. The other forms of text encoding that computers use are subsets of the Unicode format, tailored to specific regions of the world. Some of these forms are compatible in some areas and incompatible in other areas, so using the correct encoding is critical.
  • Page 268: Creating Multilanguage Text

    USING FLASH CS4 PROFESSIONAL Text Creating multilanguage text You can configure a FLA file to display text in different languages depending on the language of the operating system that plays the Flash content. Workflow for authoring multilanguage text with the Strings panel The Strings panel lets you create and update multilingual content.
  • Page 269 USING FLASH CS4 PROFESSIONAL Text • If the language does not appear in the Languages box, in the blank field below the Languages box, type a language code in the format xx. (The language code is from ISO 639-1.) Click Add. Repeat step 3 until you have added all the necessary languages.
  • Page 270 USING FLASH CS4 PROFESSIONAL Text Add a string ID to the Strings panel without assigning it to a text field Select Window > Other Panels > Strings. Click the Settings button and select a language or languages from the list in the Settings dialog box. The languages you select should include the default language you wish to use and any other languages in which you plan to publish your work.
  • Page 271 USING FLASH CS4 PROFESSIONAL Text Under Input Method, select one of the options to input characters from a Western keyboard. The default is Chinese and Japanese and it should also be selected for Western languages. Publishing multilanguage FLA files When you save, publish, or test the FLA file, a folder with an XML file is created for each available language you selected in the Strings panel.
  • Page 272: Xml File Format For Multilanguage Text

    ActionScript code. For example, you might create a pop-up menu that lets users select a language for viewing content. For information on writing ActionScript code to create custom language detection, see About the Strings panel in Learning ActionScript 2.0 in Adobe Flash. Select Window > Other Panels > Strings, and click Settings.
  • Page 273 USING FLASH CS4 PROFESSIONAL Text Character Replaced by & &amp; &apos; " &quot; < &lt; > &gt; Exported XML file sample The following examples show what an XML file that the Strings panel generates looks like in the source language—in this example, English—and in another language—in this example, French: English source version sample: <?xml version="1.0"...
  • Page 274 USING FLASH CS4 PROFESSIONAL Text <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN" "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd" > <xliff version="1.0" xml:lang="fr"> <file datatype="plaintext" original="MultiLingualContent.fla" source-language="EN"> <header></header> <body> <trans-unit id="001" resname="IDS_GREETINGS"> <source>Bienvenue sur notre site web!</source> </trans-unit> <trans-unit id="002" resname="IDS_MAILING LIST"> <source>Voudriez-vous être sur notre liste de diffusion?</source> </trans-unit>...
  • Page 275: Multilanguage Text And Actionscript

    USING FLASH CS4 PROFESSIONAL Text Import an XML file into the Strings panel After you modify an XML file, if you place it in the folder specified in the Strings panel for that language, the XML file is loaded into the Flash document (FLA file) when it opens. Regardless of where the XML file you imported was located, when you save, test, or publish the FLA file, a folder for each language in the Strings panel and an XML file for each language are created in the location indicated for publishing SWF files.
  • Page 276 USING FLASH CS4 PROFESSIONAL Text Note: If the external file is an XML file, you cannot use an XML encoding tag to change the file encoding. Save the file in a supported Unicode format. In the Flash authoring application, create a dynamic or input text field to show the text in the document. In the Property inspector, with the text field selected, assign an instance name to the text field.
  • Page 277 USING FLASH CS4 PROFESSIONAL Text Creating multilanguage documents by using text variables To include Unicode-encoded contents in text variables, use the syntax , where is the four-digit \uXXXX XXXX hexadecimal code point, or escape character, for the Unicode character. The Flash authoring tool supports Unicode escape characters through .
  • Page 278: Chapter 10: Sound

    Chapter 10: Sound You can use sound in Adobe® Flash® CS4 Professional in several different ways to make your work more interesting and involving. You can import sounds and edit them after they are imported. You can attach sounds to different kinds of objects and trigger them in different ways, depending on your desired effect.
  • Page 279 WAV (Windows or Macintosh) Note: The ASND format is a non-destructive audio file format, native to Adobe Soundbooth. ASND files can contain audio data with effects that can be modified later, Soundbooth multitrack sessions, and snapshots that allow you to revert to a previous state of the ASND file.
  • Page 280 USING FLASH CS4 PROFESSIONAL Sound With the new sound layer selected, drag the sound from the Library panel onto the Stage. The sound is added to the current layer. You can place multiple sounds on one layer or on layers containing other objects. However, it is recommended that each sound be placed on a separate layer.
  • Page 281 USING FLASH CS4 PROFESSIONAL Sound Add a sound to a button You can associate sounds with the different states of a button symbol. Because the sounds are stored with the symbol, they work for all instances of the symbol. Select the button in the Library panel. Select Edit from the Panel menu in the upper-right corner of the panel.
  • Page 282 Edit a sound in Soundbooth If you have Adobe Soundbooth installed, you can use Soundbooth to edit sounds you have imported into your FLA file. After making changes in Soundbooth, when you save the file and overwrite the original, the changes are automatically reflected in the FLA file.
  • Page 283: Exporting Sounds

    USING FLASH CS4 PROFESSIONAL Sound For more information, see “Working with Sound, Video, and Images” in Developing Flash Lite 2.x Applications or “Working with Sound” in Developing Flash Lite 1.x Applications. Exporting Sounds About compressing sounds for export You can select compression options for individual event sounds and export the sounds with those settings. You can also select compression options for individual stream sounds.
  • Page 284 USING FLASH CS4 PROFESSIONAL Sound Set export settings. Click Test to play the sound once. Click Stop if you want to stop testing the sound before it finishes playing. Adjust export settings if necessary until the desired sound quality is achieved, and then click OK. ADPCM and Raw compression options ADPCM compression sets compression for 8- or 16-bit sound data.
  • Page 285: Sound And Actionscript

    USING FLASH CS4 PROFESSIONAL Sound Note: Flash Lite 1.0 and Flash Lite 1.1 do not support the Speech compression option. For content targeting those player versions, use mp3, ADPCM, or Raw compression. Controls sound fidelity and file size. A lower rate decreases file size but can also degrade sound quality. Sample rate Select from the following options: •...
  • Page 286 USING FLASH CS4 PROFESSIONAL Sound In the Behaviors panel (Window > Behaviors), click the Add (+) button and select Sound > Load Sound from Library or Sound > Load Streaming mp3 File. In the Load Sound dialog box, enter the linkage identifier for a sound from the Library, or the sound location for a streaming mp3 file.
  • Page 287 Timing an image change to a sound—for example, changing an image when a sound is halfway through at playback time Accessing ID3 properties in mp3 files with Flash Player Macromedia Flash Player 7 from Adobe and later supports ID3 v2.4 and v2.4 tags. With this version, when you load an mp3 sound using the ActionScript 2.0...
  • Page 288: Chapter 11: Video

    You can host your own Flash Media Server, or use a hosted Flash® Video® Streaming Service (FVSS). Adobe has partnered with several content delivery network (CDN) providers to offer hosted services for delivering on-demand FLV or F4V file video across high-performance, reliable networks.
  • Page 289 USING FLASH CS4 PROFESSIONAL Video For a text tutorial about using video in Flash, see Building a Video Player on the Flash Tutorials page at www.adobe.com/go/learn_fl_tutorials. See also “Import video for streaming or progressive download” on page 288 Control video playback...
  • Page 290 Import > Import Video) checks video files that you select for import, and alerts you if the video might not be in a format that Flash can play. In the event that the video is not in either the FLV or F4V format, you can use Adobe®...
  • Page 291 For web delivery, get this detail from your hosting service. For mobile devices, use the device-specific encoding presets, and the device emulator available through Adobe Media Encoder in Adobe Premiere Pro. If you need to reduce the frame rate, the best results come from dividing the frame rate by whole numbers.
  • Page 292 To eliminate download time, provide deep interactivity and navigation capabilities, or monitor quality of service, stream Adobe FLV or F4V video files with the Flash Media Server or use the hosted service from one of Adobe’s Flash Video Streaming Service partners available through the Adobe website. For more details on the difference between Progressive Download and Streaming with Flash Media Server, see “Delivering Flash Video: Understanding the...
  • Page 293: Import Video For Streaming Or Progressive Download

    Note: If your source audio file is monaural (mono), it is recommended that you encode in mono for use with Flash. If you are encoding with Adobe Media Encoder, and using an encoding preset, be sure to check if the preset encodes in stereo or mono, and select mono if necessary.
  • Page 294 USING FLASH CS4 PROFESSIONAL Video See also “The FLVPlayback component” on page 298 Progressively download video using a web server Progressive downloading lets you use either the FLVPlayback component or ActionScript that you write to load external FLV or F4V files into a SWF file, and play them back at runtime. Because the video content is kept external to the other Flash content and the video playback controls, it’s relatively easy to update video content without republishing the SWF file.
  • Page 295: Embed Video In A Swf File

    USING FLASH CS4 PROFESSIONAL Video Note: Flash uses a relative path to point to the FLV or F4V file (relative to the SWF file), letting you use the same directory structure locally that you use on the server. If the video was previously deployed to your FMS or the FVSS hosting your video, you can skip this step.
  • Page 296 USING FLASH CS4 PROFESSIONAL Video • The video frame rate and Flash Timeline frame rate must be the same. Set the frame rate of your Flash file to match the frame rate of the embedded video. You can preview frames of an embedded video by dragging the playhead along the Timeline (scrubbing). Note that the video sound track does not play back during scrubbing.
  • Page 297 USING FLASH CS4 PROFESSIONAL Video Update an embedded video clip after editing it in an external editor Select the video clip in the Library Panel. Select Properties and click Update. The embedded video clip is updated with the edited file. The compression settings you selected when you first imported the video are reapplied to the updated clip.
  • Page 298: Export Quicktime Video Files

    • Export a video clip as an FLV or F4V file For lessons on working with video, see the Adobe Flash Support Center at www.adobe.com/go/flash_video. Change video instance properties in the Property inspector Select an instance of an embedded or linked video clip on the Stage.
  • Page 299: Working With Adobe Premiere Pro And After Effects

    Moving content between Adobe Premiere Pro and Adobe Flash After you start and edit a video in Adobe Premiere Pro, you can add sequence markers to the timeline. If you select Flash Cue Point for these markers, they can serve as cue points in a rich media application. There are two types of cue point markers: event and navigational cue point markers.
  • Page 300 • “Converting metadata and markers to cue points for use in Flash” at www.adobe.com/go/lrvid4111_xp. Exporting QuickTime video from Flash If you create animations or applications with Flash, you can export them as QuickTime movies using the File > Export >...
  • Page 301: Controlling External Video Playback With Actionscript

    Flash has a unique set of vector art tools that make it useful for a variety of drawing tasks not possible in After Effects or Adobe® Illustrator®. You can import SWF files into After Effects to composite them with other video or render them as video with additional creative effects.
  • Page 302 For more information on playing back FLV or F4V files, see “Playing back external FLV files dynamically” in Learning ActionScript 2.0 in Adobe Flash or Basics of video in Programming ActionScript 3.0. The Creative Cow web site provides an excellent tutorial on creating a video player with ActionScript 2.0...
  • Page 303 USING FLASH CS4 PROFESSIONAL Video Control video playback using behaviors Select the movie clip to trigger the behavior. In the Behaviors panel (Window > Behaviors), click the Add (+) button, and select the desired behavior from the Embedded Video submenu. Select the video to control.
  • Page 304 USING FLASH CS4 PROFESSIONAL Video Boolean value that determines whether the video is automatically rewound. If , the FLVPlayback autoRewind true component automatically rewinds the video to the beginning when the playhead reaches the end or when the user clicks the stop button. If , the component does not automatically rewind the video.
  • Page 305 Flash Player. If you see a warning dialog box, try re-encoding the video to FLV or F4V format with Adobe Media Encoder. You can also specify the location of an XML file that describes how to play multiple video streams for multiple bandwidths.
  • Page 306: Chapter 12: Creating E-Learning Content

    A web server-side LMS, such as an AICC- or SCORM-compatible system • A Flash Player-compatible web browser or the Adobe® AIR™ runtime. For a list of Flash Player compatible browsers, see www.adobe.com/go/flash_player_sysreqs_en. Note: Tracking to an LMS with learning interactions does not work with Internet Explorer on the Macintosh.
  • Page 307: Chapter 13: Creating Accessible Content

    Chapter 13: Creating accessible content With the accessibility features in Adobe® Flash® CS4 Professional, you can create content that users with disabilities can use and enjoy. About accessible content Accessibility overview You can create content that is accessible to all users, including those with disabilities, using the accessibility features that Adobe®...
  • Page 308 Platform requirements You can only create Flash content designed for use with screen readers with Windows platforms. Viewers of Flash content must have Macromedia Flash® Player 6 from Adobe or later and Internet Explorer on Windows 98 or later. See also “Create a keyboard shortcut to an object for screen...
  • Page 309 (see www.adobe.com/go/accessible_captions). Captioning Macromedia Flash Movies with Hi-Caption SE, a white paper, explains how to use Hi-Caption SE and Flash together to create a captioned document (see www.adobe.com/go/accessibility_papers). Provide animation accessibility for the visually impaired You can change the property of an accessible object during SWF file playback. For example, to indicate changes that take place on a keyframe in an animation.
  • Page 310: Using Flash To Enter Accessibility Information For Screen Readers

    USING FLASH CS4 PROFESSIONAL Creating accessible content Flash Player can’t determine the actual text content of features such as Text Break Apart to animate text. Screen readers can only provide accurate accessibility to information-carrying graphics such as icons and gestural animation, if you provide names and descriptions for these objects in your document or for the entire Flash application.
  • Page 311 The tab index feature works for keyboard navigation through a page, but not for screen reader reading order. For more information, see the Flash Accessibility web page at www.adobe.com/go/flash_accessibility/. For a tutorial about accessible content, see Create Accessible Flash Content on the Flash Tutorials page at www.adobe.com/go/learn_fl_tutorials.
  • Page 312 USING FLASH CS4 PROFESSIONAL Creating accessible content For a sample of accessible rich media content, see the Flash Samples page at www.adobe.com/go/learn_fl_samples. Download and decompress the Samples zip file and navigate to the Accessibility\AccessibleApplications folder to access the sample. See also “Creating accessibility with...
  • Page 313 About text field instance and variable names in Learning ActionScript 2.0 in Adobe Flash at www.adobe.com/go/learn_fl_cs4_learningAS2_en. Specify a name and description for a button, text field, or entire SWF application Do one of the following: •...
  • Page 314 The order in which objects receive input focus when users press the Tab key. Use ActionScript to create the Tab order tab order, or if you have Adobe® Flash® CS4 Professional, use the Accessibility panel. The tab index that you assign in the Accessibility panel does not necessarily control the reading order.
  • Page 315: Specifying Advanced Accessibility Options For Screen Readers

    USING FLASH CS4 PROFESSIONAL Creating accessible content When you move tab-indexed objects that are user-defined in your document, or to another document, Flash retains the index attributes. Check for and resolve index conflicts (for example, two different objects on the Stage with the same tab-index number).
  • Page 316 See Key in the ActionScript 2.0 Language Reference. See Capturing keypresses in Learning ActionScript 2.0 in Adobe Flash at www.adobe.com/go/learn_fl_cs4_learningAS2_en. Select the object and add the name of the keyboard shortcut to the Accessibility panel so the screen reader can read it.
  • Page 317: Creating Accessibility With Actionscript

    . See the property in ActionScript _accProps _accProps 2.0 Language Reference at www.adobe.com/go/learn_fl_cs4_as2lr_en. For properties that apply to a specific object, you can use the syntax . The value of instancename._accProps is an object that can include any of the following properties:...
  • Page 318 Flash content to perform so that it’s compatible with screen reader use (for example, by hiding child elements from the screen reader). For more information, see the method in the Accessibility.isActive ActionScript 2.0 Language Reference at www.adobe.com/go/learn_fl_cs4_as2lr_en. For example, you could use the method to decide whether to include unsolicited Accessibility.isActive() animation.
  • Page 319 , and in the ActionScript 2.0 Language MovieClip.tabChildren MovieClip.tabEnabled TextField.tabEnabled Reference at www.adobe.com/go/learn_fl_cs4_as2lr_en. See also “Create a tab-order index for keyboard navigation in the Accessibility panel” on page 309 Using accessible components A core set of UI components accelerates building accessible applications. These components automate many of the most common accessibility practices related to labeling, keyboard access, and testing and help ensure a consistent user experience across rich applications.
  • Page 320 Accessible Flash components must contain ActionScript that defines their accessible behavior. For information on which accessible components work with screen readers, see the Flash Accessibility web page at www.adobe.com/go/flash_accessibility/. For general information about components, see “About Components” in Using ActionScript 2.0 Components at www.adobe.com/go/go/learn_fl_cs4_as2components_en.
  • Page 321: Chapter 14: Working With Screens

    Screens make it easy to create presentations, slide shows, and other slide-based content in Adobe® Flash® CS4 Professional. The Screens feature in Flash does not support ActionScript® 3.0. To use screens, you must start with an ActionScript 2.0-based FLA file.
  • Page 322 USING FLASH CS4 PROFESSIONAL Working with screens • A Flash Form Application uses the form screen as the default screen type. A form screen is designed for a nonlinear, form-based application. Although each document has a default screen type, you can include and mix slide screens and form screens in any screen-based document.
  • Page 323: Working With Screens

    USING FLASH CS4 PROFESSIONAL Working with screens Top-level slide has three children, Slide 1, Slide 2, and Slide 3. Slide 1 has one child and one grandchild To learn more about creating screen-based documents that use ActionScript, see “About organizing code for screens in”...
  • Page 324 USING FLASH CS4 PROFESSIONAL Working with screens • Flash inserts a nested screen directly after the currently selected screen, and nested one level down. If the document contains a nested screen or screens below the currently selected screen, the new screen is added after all nested screens already in place, one level below the selected screen.
  • Page 325 USING FLASH CS4 PROFESSIONAL Working with screens Using timelines with screens Each screen in a screen-based Flash document has its own Timeline that is collapsed by default. To work with frames or layers, open the Timeline (Window > Timeline). You cannot view or modify the root Timeline of a screen-based Flash document. You can add frames, keyframes, and layers, and manipulate content on a screen’s Timeline.
  • Page 326 USING FLASH CS4 PROFESSIONAL Working with screens • To navigate through the screens, select View > Go To and select the screen name from the submenu, or select First, Previous, Next, or Last. • Click the Edit Screen button at the right side of the edit bar and select the screen name. Select multiple screens in the Screen Outline pane •...
  • Page 327 USING FLASH CS4 PROFESSIONAL Working with screens Drag a screen in the Screen Outline pane ❖ Using the mouse, drag the screen to any other position in the Screen Outline pane. Release the mouse button when the screen is in the desired position. To nest a screen within another screen, drag it towards the right side of the Screen Outline pane below the intended parent.
  • Page 328: Adding Content To Screens

    USING FLASH CS4 PROFESSIONAL Working with screens See also “Undo, Redo, and Repeat commands” on page 29 Use Find And Replace in a document with screens You can search for a text string, font, color, symbol, sound file, video file, or imported bitmap file. You can search for elements in the entire document or in the current screen.
  • Page 329 USING FLASH CS4 PROFESSIONAL Working with screens • The x and y coordinates of a screen are specified in pixels. Move a child screen on the Stage by changing its x and y coordinates. Change the registration point of a screen using the registration grid. To control screen behavior during playback, set parameters for slide and form screens.
  • Page 330 Working with screens Enter a class name in the Class Name box. For more information on ActionScript classes, see Classes in Learning ActionScript 2.0 in Adobe Flash. Change the registration point of a screen Select a screen in the Screen Outline pane.
  • Page 331 USING FLASH CS4 PROFESSIONAL Working with screens • The contentPath parameter is an absolute or relative URL indicating the file to load when the Loader.load() method is called. A relative path must point to the SWF file loading the content. The URL must be in the same subdomain as the URL where the Flash content currently resides.
  • Page 332 USING FLASH CS4 PROFESSIONAL Working with screens In the Event column, click in the row for the new behavior and select an event from the list. This specifies the event that triggers the behavior—for example, a user clicking a button, a movie clip loading, or a screen receiving focus. The list of available events depends on the type of object you use to trigger the behavior.
  • Page 333 Form methods and properties that are available for the screen, assign the screen to a different class. For more information on ActionScript classes, see Classes Learning ActionScript 2.0 in Adobe Flash. • The Property inspector indicates the registration point in the x and y coordinate fields and in the registration grid.
  • Page 334 USING FLASH CS4 PROFESSIONAL Working with screens • Do not try to do slide navigation inside of handlers. on(reveal) on(hide) • Do not add an event to ActionScript code controlling a screen. on(keydown) on(keyup) For more information on controlling screens with ActionScript, see “Screen class”, “Form class”, and “Slide class”, in the ActionScript 2.0 Components Language Reference.
  • Page 335: Chapter 15: Actionscript

    Actions panel, Script window, Script Assist mode, Behaviors panel, Output panel, and Compiler Errors panel. These topics apply to all versions of ActionScript. Other ActionScript documentation from Adobe will help you learn about the individual versions of ActionScript; see Programming ActionScript 3.0, Learning ActionScript 2.0 in Adobe Flash, Developing Flash Lite 1.x Applications or Developing Flash Lite 2.x Applications.
  • Page 336 USING FLASH CS4 PROFESSIONAL ActionScript For text tutorials about ActionScript, see www.adobe.com/go/learn_fl_tutorials. The following tutorials are available: • Create an Application • Add Interactivity • Work with Objects and Classes ActionScript versions Flash includes more than one version of ActionScript to meet the needs of different kinds of developers and playback hardware.
  • Page 337 USING FLASH CS4 PROFESSIONAL ActionScript Writing ActionScript When you write ActionScript code in the authoring environment, you use the Actions panel or Script window. The Actions panel and Script window contain a full-featured code editor that includes code hinting and coloring, code formatting, syntax highlighting, syntax checking, debugging, line numbers, word wrapping, and support for Unicode.
  • Page 338 USING FLASH CS4 PROFESSIONAL ActionScript A. Script pane B. Panel menu C. Actions toolbox D. Script navigator See also “Pin scripts in the Actions panel” on page 345 Display the Actions panel ❖ Select Window > Actions or press F9. Use the Actions toolbox ❖...
  • Page 339 USING FLASH CS4 PROFESSIONAL ActionScript Select Options and click Print. Because the printed copy won’t include information about file it came from, you should include information such as the name of the FLA file in a action in the script. comment Access context-sensitive Help from the Actions panel To select an item for reference, do any of the following:...
  • Page 340 USING FLASH CS4 PROFESSIONAL ActionScript Select the type of external file you want to create (ActionScript file, ActionScript Communication file, or Flash JavaScript file). Edit an existing file in the Script window • To open an existing script, select File > Open, and then open an existing AS file. •...
  • Page 341 USING FLASH CS4 PROFESSIONAL ActionScript See also “Writing and managing scripts” on page 339 “Debugging ActionScript 3.0” on page 360 “Debugging ActionScript 1.0 and 2.0” on page 350 Set ActionScript preferences Whether you edit code in the Actions panel or the Script window, you can set and modify a single set of preferences. Select Edit >...
  • Page 342: Script Assist Mode And Behaviors

    ActionScript, and know what methods, functions, and variables to use when creating your scripts. To learn about ActionScript, see Learning ActionScript 2.0 in Adobe Flash or Programming ActionScript 3.0. For a video tutorial about Script Assist mode, see www.adobe.com/go/vid0131.
  • Page 343: About Behaviors

    USING FLASH CS4 PROFESSIONAL ActionScript View a description of an action • Click a category in the Actions toolbox to display the actions in that category, and click an action. • Select a line of code in the Script pane. The description appears at the top of the Actions panel.
  • Page 344: Writing And Managing Scripts

    The behavior is added to the object and is displayed in the Actions panel. The ActionScript of a behavior For a sample about behaviors, see the Flash Samples page at www.adobe.com/go/learn_fl_samples. Download and decompress the Samples zip file and navigate to the Behaviors\BehaviorsScrapbook folder to access the sample.
  • Page 345 USING FLASH CS4 PROFESSIONAL ActionScript After you set Auto Format options, your settings are applied automatically to the code you write, but not to existing code; you must apply your settings to existing code manually. Format code according to Auto Format settings •...
  • Page 346 USING FLASH CS4 PROFESSIONAL ActionScript Click Remove Comment Use syntax coloring In ActionScript, as in any language, syntax is the way elements are put together to create meaning. If you use incorrect ActionScript syntax, your scripts cannot work. To highlight syntax errors, set a color-code for parts of your scripts. For example, suppose you set the syntax coloring preference to make keywords appear in blue.
  • Page 347 USING FLASH CS4 PROFESSIONAL ActionScript Collapse sections of code To make your code more readable and easier to navigate during programming and debugging, collapse sections of code into a single line. By collapsing sections that you don’t need to look at, you can focus on the code you are writing or debugging.
  • Page 348 USING FLASH CS4 PROFESSIONAL ActionScript Display hidden characters Characters such as spaces, tabs, and line breaks are hidden in ActionScript code. You may need to display these characters; for example, you must find and remove double-byte spaces that are not part of a string value, because they cause compiler errors.
  • Page 349 Objects classesin Programming ActionScript 3.0. For more information on compiling ActionScript 2.0 classes, see Compiling and exporting classes in Learning ActionScript 2.0 in Adobe Flash at www.adobe.com/go/learn_fl_cs4_learningAS2_en. Check for punctuation balance Click between braces {}, brackets [], or parentheses () in your script.
  • Page 350 USING FLASH CS4 PROFESSIONAL ActionScript Export a script from the Actions panel Select the script to export. Then select Export Script from the Actions Panel menu, or press Control+Shift+X (Windows) or Command+Shift+X (Macintosh). Save the ActionScript (AS) file. Set text encoding options Select Edit >...
  • Page 351 USING FLASH CS4 PROFESSIONAL ActionScript If the content in the Script pane doesn’t change to reflect the location you select on the timeline, the Script pane is probably showing a pinned script. Click the tab at the lower left of the Script pane to show the script associated with your location along the timeline.
  • Page 352 USING FLASH CS4 PROFESSIONAL ActionScript Use code hints When you work in the Actions panel or Script window, the software can detect what action you are entering and display a code hint. There are two types of code hint: a tooltip that contains the complete syntax for that action, and a pop-up menu that lists possible ActionScript elements, such as method or property names (sometimes referred to as a form of code completion).
  • Page 353 USING FLASH CS4 PROFESSIONAL ActionScript To dismiss the code hint, do one of the following: • Type a closing parenthesis “)”. • Click outside the statement. • Press Escape. Use menu-style code hints: Display the code hint by typing a period after a variable or object name. Menu-style code hints To navigate through the code hints, use the Up and Down Arrow keys.
  • Page 354 USING FLASH CS4 PROFESSIONAL ActionScript Strict typing for objects When you use ActionScript 2.0 and use strict typing for a variable that is based on a built-in class (such as Button, Array, and so on), the Script pane displays code hints for the variable. For example, suppose you enter the following two lines of code: var foo:Array = new Array();...
  • Page 355: Debugging Actionscript 1.0 And 2.0

    Array methods and theArray properties appear, and so on. Instead of this technique, however, Adobe recommends that you use strict data typing or suffixes, because these techniques enable code hints automatically and make your code more understandable. See also...
  • Page 356 USING FLASH CS4 PROFESSIONAL ActionScript A. Display list B. Properties list C. Tool bar D. Code view You can resize the regions of the Debugger panel. When your pointer changes between each region, drag to resize the Display list, Watch list, and code view. You can also click the vertical bar to expand either side of the Debugger to full size. After it’s activated, the Debugger status bar displays the URL or local path of the file, tells whether the file is running in the test environment or from a remote location, and shows a live view of the movie clip display list.
  • Page 357 USING FLASH CS4 PROFESSIONAL ActionScript Debug a local SWF file Open the FLA document. Select Debug > Debug Movie. This command exports the SWF file with debugging information (the SWD file). It opens the Debugger and opens the SWF file in the test environment. The SWD file is used to debug ActionScript, and contains information that lets you use breakpoints and step through code.
  • Page 358 USING FLASH CS4 PROFESSIONAL ActionScript Activate the Debugger from a remote location Open the Flash authoring application if it is not already open. Select Debug > Begin Remote Debug Session > ActionScript 2.0. In a browser or in the debugger version of the stand-alone player, open the published SWF file from the remote location.
  • Page 359 USING FLASH CS4 PROFESSIONAL ActionScript Enter a string (any value surrounded by quotation marks), a number, or a Boolean value ( ). You cannot true false enter an expression (for example, eval("name:" x + 2 Note: To write the value of an expression to the Output panel in the test environment, use the statement.
  • Page 360 USING FLASH CS4 PROFESSIONAL ActionScript Modify a property value ❖ In the Debugger’s Properties tab, double-click the value, and enter a new value. Enter a string (any value surrounded by quotation marks), a number, or a Boolean value ( ). You cannot true false enter an expression (for example,...
  • Page 361 USING FLASH CS4 PROFESSIONAL ActionScript A list of all the variables currently in the SWF file appears in the Output panel. The following example shows the variables that would be output from the code listed above in step 2: Global Variables: Variable _global.myName = "Buster"...
  • Page 362 The breakpoints XML file When you work with breakpoints in the Script window, the AsBreakpoints.xml file lets you store breakpoint information. This file is written to the Local Settings directory, in the following locations: Hard Disk\Documents and Settings\User\Local Settings\Application Data\Adobe\Flash Windows CS3\language\Configuration\Debugger\...
  • Page 363 USING FLASH CS4 PROFESSIONAL ActionScript As you step through lines of code, the values of variables and properties change in the Variables, Locals, Properties, and Watch tabs. A yellow arrow on the left side of the Debugger’s code view indicates the line at which the Debugger stopped.
  • Page 364 Output panel as the SWF trace() file runs. This could include notes about the SWF file’s status or the value of an expression. For more information, see function in the ActionScript 2.0 Language Reference at www.adobe.com/go/learn_fl_cs4_as2lr_en. trace() Display or hide the Output panel ❖...
  • Page 365: Debugging Actionscript 3.0

    USING FLASH CS4 PROFESSIONAL ActionScript Output panel Navigate to errors in code When Flash encounters an error in ActionScript code, either during compiling or execution, it reports the error in the Compiler Errors panel. From the Compiler Errors panel, you can navigate to the line of code that caused the error. ❖...
  • Page 366 USING FLASH CS4 PROFESSIONAL ActionScript The ActionScript 3.0 debugger converts the Flash workspace to a debug workspace that displays panels that are used for debugging, including the Actions panel and/or Script window, the Debug console, and the Variables panel. The Debug console displays the call stack and contains tools for stepping through scripts.
  • Page 367 USING FLASH CS4 PROFESSIONAL ActionScript Step through lines of code After the ActionScript execution is interrupted at a breakpoint or runtime error, you can step through the code line by line, choosing to step into function calls or step over them. You can also choose to continue executing the code without stepping.
  • Page 368 USING FLASH CS4 PROFESSIONAL ActionScript Control compiler warnings Control the types of compiler warnings that the ActionScript compiler generates in the Compiler Errors panel. When the compiler reports an error, double click the error to navigate to the line of code that caused the error. Select File >...
  • Page 369: Working With Flash And Flex

    Adobe® Flash® CS4 Professional, so be sure to download the latest version of the component kit from www.adobe.com/go/flex_ck_en. For more information about using Flex and Flash together, refer to the Flex documentation on the Adobe web site at www.adobe.com/go/learn_flexresources_en. To create a Flex component in Flash: Be sure you have Adobe Extension Manager installed.
  • Page 370 SWF file and that the file [Embed] should be associated with the variable named buttonUpImage For more information about embedding assets with metadata in Flex, see Embedding Assets in the Flex 3 Developer Guide at www.adobe.com/go/learn_flexresources_en. Updated 5 March 2009...
  • Page 371: Printing At Runtime

    All elements must be fully loaded to print. Use the movie clip property to check whether the _framesloaded printable content is loaded. For more information, see _framesloaded (MovieClip._framesloaded property) in the ActionScript 2.0 Language Reference at www.adobe.com/go/learn_fl_cs4_as2lr_en. Updated 5 March 2009...
  • Page 372 Note: When you use the PrintJob class, users must have Flash Player 7 or later. Note: For information on printing from SWF files at runtime using ActionScript 2.0, see Learning ActionScript 2.0 in Adobe Flash. Build a print job Because you are spooling a print job to the user’s operating system between your calls to the PrintJob.start()
  • Page 373 USING FLASH CS4 PROFESSIONAL ActionScript • method returns a value of PrintJob.addPage() false • method is called. delete PrintJob Starting a print job Calling the ActionScript 2.0 method spools the print job to the user’s operating system and PrintJob.start() prompts the user’s operating system print dialog box to appear. If the user selects an option to begin printing, the ) method returns a value of .
  • Page 374 USING FLASH CS4 PROFESSIONAL ActionScript Note: Any ActionScript code that needs to be called to change a resulting printout must run before the method is called. The ActionScript can, however, run before or after a new PrintJob.addPage() PrintJob()method If a frame has a call to , the call itself does not guarantee that the ActionScript script on that frame PrintJob.addPage() will run when that frame is printed.
  • Page 375 USING FLASH CS4 PROFESSIONAL ActionScript • 72 points = 1 inch • 567 twips = 1 cm • 1440 twips = 1 inch To scale a movie clip before printing, set its properties before calling MovieClip.xscale MovieClip.yscale this method, and set them back to their original values afterward. If you scale a movie clip and also pass a value for property, the pixel values passed to reflect the original size of the movie clip.
  • Page 376: Actionscript Publish Settings

    USING FLASH CS4 PROFESSIONAL ActionScript As an alternative to using a document’s Stage size, set the following print areas: • For either the Flash Player context menu or the ActionScript 2.0 function, designate the bounding box for print() SWF content as the print area for all frames by selecting an object in one frame as the bounding box. This option is useful, for example, to print a full-page data sheet from a web banner.
  • Page 377 Contains all of the built-in ActionScript 2.0 classes (AS files). Typical paths to this folder ActionScript classes folder are as follows: • Windows XP: Hard Disk\Documents and Settings\user\Local Settings\Application Data\Adobe\Flash CS4\language\Configuration\Classes • Windows Vista: Hard Disk\Users\user\Local Settings\Application Data\Adobe\Flash CS4\language\Configuration\Classes •...
  • Page 378 The list of folders in which Flash searches for class definitions is called the classpath for ActionScript 2.0 and the source path for ActionScript 3.0. Classpaths and source paths exist at the application (global) or document level. For more information about classpaths, see Classes in Learning ActionScript 2.0 in Adobe Flash or “Packages” in Programming ActionScript 3.0.
  • Page 379 USING FLASH CS4 PROFESSIONAL ActionScript The Library path specifies the location of pre-compiled ActionScript code which resides in SWC files you have created. The FLA file that specifies this path loads every SWC file at the top level of this path and any other code resources that are specified within the SWC files themselves.
  • Page 380 USING FLASH CS4 PROFESSIONAL ActionScript Specify the Errors settings. You can select Strict Mode and Warnings Mode. Strict Mode reports compiler warnings as errors, which means that compilation will not succeed if those types of errors exist. Warnings Mode reports extra warnings that are useful for discovering incompatibilities when updating ActionScript 2.0 code to ActionScript 3.0.
  • Page 381 USING FLASH CS4 PROFESSIONAL ActionScript Compiling ActionScript conditionally You can use conditional compilation in ActionScript 3.0 in the same way that it has been used in C++ and other programming languages. For example, you can use conditional compilation to turn blocks of code throughout a project on of off, such as code that implements a certain feature or code used for debugging.
  • Page 382 Because it is in the application level, non-administrative users do not have write access to this directory. Typical paths to this folder are as follows: • In Microsoft Windows XP or Microsoft Windows Vista, browse to boot drive\Program Files\Adobe\Adobe Flash CS3\language\Configuration\. •...
  • Page 383 The operating system makes available to all users of the computer any files placed in this folder. Typical paths to this folder are as follows: • In Windows XP or Vista, browse to boot drive\Documents and Settings\All Users\Application Data\Adobe\Flash CS3\language\Configuration\. •...
  • Page 384: Chapter 16: Publishing And Exporting

    Chapter 16: Publishing and Exporting When you're ready to deliver Adobe® Flash® CS4 Professional content to an audience, you can publish it for playback or export it in a variety of formats. This chapter describes the various publishing and exporting options available with which to distribute your Flash content.
  • Page 385 ActionScript commands and sound formats are supported. For more details, see Mobile Articles on the Mobile and Devices Development Center. Adobe also provides Adobe Device Central, a new way to test content created with Adobe products on emulated mobile devices. When creating a new mobile document of any kind, start the creation process from Device Central.
  • Page 386 Follow the on-screen instructions to install the player. You can also run one of the following installers in your Players folder. However, the installer on the Adobe website is usually more up to date than those in the Players folder.
  • Page 387 For users to view your Flash content on the web, the web server must be properly configured to recognize SWF files. Your server may already be configured properly. To test server configuration, see TechNote 4151 on the Adobe Flash Support Center at www.adobe.com/go/tn_4151.
  • Page 388: Publish Settings

    Select File > Publish Settings, click the Flash tab, and select a Player version from the Player pop-up menu. Not all Adobe® Flash® CS4 Professional features work in published SWF files that target Flash Player versions earlier than Flash Player 10. To specify Flash Player detection, click the HTML tab and select Detect Flash Version and enter Flash Player version to detect.
  • Page 389 USING FLASH CS4 PROFESSIONAL Publishing and Exporting Causes Flash to ignore ActionScript statements in the current SWF file. When you select Omit Trace Actions trace this option, information from statements does not appear in the Output panel. For more information, see trace “Output panel overview”...
  • Page 390 USING FLASH CS4 PROFESSIONAL Publishing and Exporting To manually enter HTML parameters for Flash or customize a built-in template, use an HTML editor. HTML parameters determine where the content appears in the window, the background color, the size of the SWF file, and so on, and set attributes for the tags.
  • Page 391 USING FLASH CS4 PROFESSIONAL Publishing and Exporting Emphasizes speed at first but improves appearance whenever possible. Playback begins with anti-aliasing Auto Low turned off. If Flash Player detects that the processor can handle it, anti-aliasing is automatically turned on. Emphasizes playback speed and appearance equally at first but sacrifices appearance for playback speed if Auto High necessary.
  • Page 392 The value must be entered exactly as shown. Applies to the tag only. object Value: http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0 Identifies the location of the Flash Player plug-in so that the user can download it if it is not pluginspage attribute already installed. The value must be entered exactly as shown. Applies to the tag only.
  • Page 393 USING FLASH CS4 PROFESSIONAL Publishing and Exporting Value: http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash (Optional) Specifies whether the browser should start Java™ when loading Flash Player for the swliveconnect attribute first time. The default value is if this attribute is omitted. If you use JavaScript and Flash on the same page, Java...
  • Page 394 USING FLASH CS4 PROFESSIONAL Publishing and Exporting (Optional) Specifies the background color of the application. Use this attribute to bgcolor attribute/parameter override the background color setting that the SWF file specifies. This attribute does not affect the background color of the HTML page. Value: (hexadecimal RGB value) #RRGGBB...
  • Page 395 • shows a menu that contains only the About Adobe Flash Player 6 option and the Settings option. false The default value is if this attribute is omitted...
  • Page 396 <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100" height="100" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"> <param name="movie" value="moviename.swf"> <param name="play" value="true"> <param name="loop" value="true"> <param name="quality" value="high"> </object> For the tag, all settings (such as...
  • Page 397 USING FLASH CS4 PROFESSIONAL Publishing and Exporting Browsers that support windowless modes Operating system Internet Explorer Netscape Other Macintosh OS X 10.1.5 and 10.2 5.1 and 5.2 7.0 and later • Opera 6 or later • Mozilla 1.0 or later •...
  • Page 398 USING FLASH CS4 PROFESSIONAL Publishing and Exporting Specify publish settings for GIF files Use GIF files to export drawings and simple animations for use in web pages. Standard GIF files are compressed bitmaps. An animated GIF file (sometimes referred to as a GIF89a) offers a simple way to export short animation sequences. Flash optimizes an animated GIF file, storing only frame-to-frame changes.
  • Page 399 USING FLASH CS4 PROFESSIONAL Publishing and Exporting To specify how pixels of available colors are combined to simulate colors not available in the current palette, select a Dither option. Dithering can improve color quality, but it increases the file size. Turns off dithering and replaces colors not in the basic color table with the solid color from the table that most None closely approximates the specified color.
  • Page 400 PNG is the only cross-platform bitmap format that supports transparency (an alpha channel). It is also the native file format for Adobe® Fireworks®. Flash exports the first frame in the SWF file as a PNG file, unless you mark a different keyframe for export by entering #Static frame label.
  • Page 401 USING FLASH CS4 PROFESSIONAL Publishing and Exporting on a colored background, and it increases the PNG file size. Export an image without smoothing if a halo appears or if you’re placing a PNG transparency on a multicolored background. Applies dithering to solid colors and gradients. Dither Solids (Default is off) Converts all gradient fills in the application to solid colors using the first color in Remove Gradients...
  • Page 402: Using Publish Profiles

    USING FLASH CS4 PROFESSIONAL Publishing and Exporting Analyzes the colors in the image and creates a unique color table for the selected PNG file. Best for systems Adaptive showing thousands or millions of colors; it creates the most accurate color for the image but results in a file size larger than a PNG created with the web 216-color palette.
  • Page 403: Publishing For Adobe Air

    Adobe® AIR™, a new cross-operating system runtime allows you to leverage local desktop resources and data to deliver even more personal, engaging experiences. Using the same skills you use to deliver to the Adobe Flash Player, your content can now reach even more audiences across more devices – web, mobile, and now the desktop.
  • Page 404 Choose File > New and select Flash File (Adobe AIR) and click OK. • Open an existing Flash file and convert it to an AIR file by selecting Adobe AIR from the Player menu in the Flash tab of the Publish Settings dialog box (File > Publish Settings).
  • Page 405: Application Settings

    Icon it in the Adobe AIR runtime. You can specify four different sizes for the icon (128, 48, 32, and 16 pixels) to allow for the different views in which the icon appears. For example, the icon can appear in the file browser in thumbnail, detail, and tile views.
  • Page 406 If you do specify an image, it must be the exact size (either 128x128, 48x48, 32x32, or 16x16). If you do not supply an image for a particular icon size, Adobe AIR scales one of the supplied images to create the missing icon image.
  • Page 407 The filename extension (for example, html, txt, or xmpl), up to 39 basic alphanumeric characters, (A-Za- Extension z0-9), and without a leading period. Optional. A description of the file type (for example, Adobe Video File). Description Optional. Specifies the MIME type for the file.
  • Page 408 By default, the application descriptor file and the main SWF file are automatically added to the package list. The package list shows these files even if you have not yet published the Adobe AIR FLA file. The package list displays the files and folders in a flat structure.
  • Page 409 USING FLASH CS4 PROFESSIONAL Publishing and Exporting • You have not signed the application or have not specified that it is an Adobe AIRI application that will be signed later. Creating a custom application descriptor file The application descriptor file is an XML file that you can edit with a text editor. Flash creates the descriptor file based on the settings you choose in the AIR - Application &...
  • Page 410 Signature dialog box opens. This dialog box has two radio buttons that allow you to either sign your Adobe AIR application with a digital certificate or prepare an AIRI package. If you sign your AIR application, you can either use a digital certificate granted by a root certificate authority or create a self-signed certificate.
  • Page 411: Html Publishing Templates

    If you choose to sign the application later, you will need to use the command-line AIR Developer Tool included with Flash and with the AIR SDK. For more information, see Developing Adobe AIR 1.1 Applications with Adobe Flash CS4 Professional.
  • Page 412 Windows Explorer settings to see this folder. • Mac OS X 10.3 and later: Macintosh HD/Applications/Adobe Flash CS4/language/First Run/HTML. The boot drive is the drive from which Windows 2000 or Windows XP boots (usually C:). The user is the name of the person logged in to the Windows 2000 or Windows XP operating system.
  • Page 413 USING FLASH CS4 PROFESSIONAL Publishing and Exporting Attribute/parameter Template variable Template title Template description start Template description finish Flash (SWF file) title Flash (SWF file) title for search engine metadata Description for search engine metadata Metadata XML string for use with search engines Width Height Movie...
  • Page 414 BGCOLOR Sample HTML template The following Default.HTML template file in Flash includes many of the commonly used template variables: $TTFlash Only Display Adobe SWF file in HTML. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>...
  • Page 415: About Exporting From Flash

    For example, insert the following code in a template: <img src=$IS usemap=$IU width=$IW height=$IH BORDER=0> This might produce the following code in the HTML document that the Publish command creates: <map name="mymovie"> <area coords="130,116,214,182" href="http://www.adobe.com"> </map> <img src="mymovie.gif" usemap="#mymovie" width=550 height=400 border=0> Creating text and URL reports template variable causes Flash to insert all the text from the current SWF file as a comment in the HTML code.
  • Page 416 When you save a Flash image as a bitmap GIF, JPEG, PICT (Macintosh), or BMP (Windows) file, the image loses its vector information and is saved with pixel information only. You can edit images exported as bitmaps in image editors such as Adobe® Photoshop®, but you can no longer edit them in vector-based drawing programs. •...
  • Page 417: Exporting Images And Graphics

    Update SWF files for Dreamweaver To add the content to your page, export SWF files directly to an Adobe® Dreamweaver® site. Dreamweaver generates all the needed HTML code. You can start Flash from Dreamweaver to update the content. In Dreamweaver, you can update the Flash document (FLA file) and re-export the updated content automatically.
  • Page 418 Color Depth when printed, and scaling doesn’t affect their appearance. Bitmap PICT images normally look best onscreen and can be manipulated in applications such as Adobe Photoshop. You can also select a variety of color depths with bitmap PICT files.
  • Page 419 USING FLASH CS4 PROFESSIONAL Publishing and Exporting Versions of the Adobe Illustrator format before version 5 do not support gradient fills, and only version 6 supports bitmaps. See also “Import Adobe Illustrator files” on page 74 Animated GIF, GIF Sequence, and GIF Image The settings are the same as those on the GIF tab in the Publish Settings dialog box, with the following exceptions: Set in dots per inch (dpi).
  • Page 420: Exporting Video And Sound

    A PostScript printer can print an EPS file. You can include a bitmap preview with the exported EPS file for applications that can import and print the EPS files (such as Microsoft® Word® and Adobe® InDesign®) but that can’t display them onscreen.
  • Page 421: About Quicktime

    Exports a QuickTime file that can be distributed as streaming video, on a DVD, or used in a video QuickTime export editing application such as Adobe® Premiere Pro®. QuickTime export is intended for users who want to distribute Flash content, such as animation, in the QuickTime video format.
  • Page 422 USING FLASH CS4 PROFESSIONAL Publishing and Exporting The duration of the Flash document to export in hours:minutes:seconds:milliseconds. After time has elapsed Opens the advanced QuickTime settings dialog box. The Advanced settings let you specify QuickTime Settings custom QuickTime settings. In general, use the default QuickTime settings, as they provide optimal playback performance for most applications.
  • Page 423: Chapter 17: Best Practices

    Chapter 17: Best practices Adobe® Flash® CS4 Professional contains features and capabilities that make it a flexible tool and allow more than one way to do the same thing in Flash. Over time, the Flash community has developed preferred methods for accomplishing many common tasks.
  • Page 424 USING FLASH CS4 PROFESSIONAL Best practices Using scenes Using scenes is similar to using several SWF files to create a larger presentation. Each scene has a timeline. When the playhead reaches the final frame of a scene, the playhead progresses to the next scene. When you publish a SWF file, the timeline of each scene combines into a single timeline in the SWF file.
  • Page 425: Organizing Actionscript In An Application

    USING FLASH CS4 PROFESSIONAL Best practices Important: If you select Save when working with a document, you can undo before that save point. Because Save and Compact deletes the earlier version of the file and replaces it with the optimized version, you cannot undo earlier changes.
  • Page 426: Behaviors Conventions

    USING FLASH CS4 PROFESSIONAL Best practices • The contrast between two styles of coding can be confusing to people learning ActionScript; it forces students and readers to learn different coding styles, additional syntax, and a poor and limited coding style. Avoid attaching ActionScript 2.0 to a button called , which looks like the following: myButton_btn...
  • Page 427 USING FLASH CS4 PROFESSIONAL Best practices When to use behaviors The main difference between a FLA file with behaviors and a FLA file without behaviors is the workflow you must use for editing the project. If you use behaviors, you must select each instance on the Stage, or select the Stage, and open the Actions or Behaviors panel to make modifications.
  • Page 428: Video Conventions

    To keep your SWF file as small as possible, display video in a video object and create your own assets and code to control the video. Also consider using the FLVPlayback component in Adobe® Flash® CS4 Professional, which has a smaller file size than Media components (Flash MX Professional 2004 and later).
  • Page 429 Exporting, compressing, and hosting FLV files You can export FLV files from Adobe® Flash® CS4 Professional authoring environments. After you import video into your document, it appears as a video symbol in the library. To export the video as FLV, select the video and then select Library >...
  • Page 430: Swf Application Authoring Guidelines

    For example, if you encoded your files using On2 codec, you need Flash Player 8 or later installed for the browsers you use to view your Flash content. Note: For Flash Player and FLV compatibility, see About using FLV video in Learning ActionScript 2.0 in Adobe Flash.
  • Page 431 USING FLASH CS4 PROFESSIONAL Best practices An online application lets a user influence a website by interacting with it. For example, the application might collect information from the user (such as a username and password for a registration), information might be added to the site (such as in a forum), or the user might interact in real time with other site visitors (such as a chat room or interactive white board).
  • Page 432 ASP.NET, Java, and more. You can also use Flash Remoting to consume web services. Web services Adobe® Flash® CS4 Professional includes the WebServiceConnector component that lets you connect to remote web services, send and receive data, and bind results to components. This lets Flash developers quickly create Rich Internet Applications without having to write a single line of ActionScript.
  • Page 433 USING FLASH CS4 PROFESSIONAL Best practices Using error handling and debugging Your application needs to be robust enough to anticipate certain errors and handle them accordingly. One of the best ways to perform error handling in ActionScript 2.0 is to use the blocks that let try-catch-finally you throw and catch custom errors.
  • Page 434: Accessibility Guidelines

    USING FLASH CS4 PROFESSIONAL Best practices Handles the requirements of the model and view to process and display data, and typically contains a The controller lot of code. It calls any part of the model, depending on user requests from the interface (or view), and contains code that’s specific to the application.
  • Page 435 USING FLASH CS4 PROFESSIONAL Best practices Note: Flash applications must be viewed in Internet Explorer on Windows, because Microsoft Active Accessibility (MSAA) support is limited to this browser. Flash Player uses Microsoft Active Accessibility (MSAA) to expose Flash content to screen readers. MSAA is a Windows-based technology that provides a standardized platform for information exchange between assistive technologies, such as screen readers, and other applications.
  • Page 436 USING FLASH CS4 PROFESSIONAL Best practices Note: If you enter a description for the main SWF file, this description is read each time the SWF file refreshes. You can avoid this redundancy by creating a separate informational page. Inform the user about any navigational elements that change in the SWF file. Perhaps an extra button is added, or the text on the face of a button changes, and this change is read aloud by the screen reader.
  • Page 437 USING FLASH CS4 PROFESSIONAL Best practices Using color You must make decisions about using colors in an accessible file. You must not rely only on color to communicate particular information or directives to users. A color-blind user cannot operate a page if it asks to click on the blue area to launch a new page or the red area to hear music.
  • Page 438 For information on using Hi-Caption SE and the Hi-Caption Viewer component, see www.adobe.com/go/flash_extensions. This third-party extension lets you create captions that you save in an XML file and load into the SWF file at runtime, among other advanced controls. Alternatively, you can use cue points and a text field to display caption information.
  • Page 439: Advertising With Flash

    USING FLASH CS4 PROFESSIONAL Best practices Advertising with Flash Using recommended dimensions Use the Interactive Advertising Bureau (IAB) guidelines to set dimensions for your Flash advertisements. The following table lists the recommended Interactive Marketing Unit (IMU) ad formats measurements: Type of advertisement Dimensions (pixels) Wide skyscraper 160 x 600...
  • Page 440 HTML, you would add code similar to the following example (where object embed www.helpexamples.com is the ad network, and adobe.com is the company with an advertisement): <EMBED src="your_ad.swf?clickTAG= http://helpexamples.com/tracking?http://www.adobe.com"> Add the following code in your HTML: <PARAM NAME=movie VALUE="your_ad.swf?clickTAG =http: //helpexamples.com/tracking?http://www.adobe.com">...
  • Page 441: Optimizing Fla Files For Swf Output

    You can also compress a SWF file as you publish it. As you make changes, test your document by running it on a variety of computers, operating systems, and Internet connections. For a video tutorial about optimizing SWF files, see www.adobe.com/go/vid0140. Optimize documents •...
  • Page 442 USING FLASH CS4 PROFESSIONAL Best practices Optimize colors • Use the Color menu in the Symbol Property inspector to create many instances of a single symbol in different colors. • Use the Color panel (Window > Color) to match the color palette of the document to a browser-specific palette. •...
  • Page 443 Note: The best bitmap format to import into Flash is PNG, which is the native file format of Macromedia Fireworks from Adobe. PNG files have RGB and alpha information for each pixel. If you import a Fireworks PNG file into Flash, you retain some ability to edit the graphic objects in the FLA file.
  • Page 444 USING FLASH CS4 PROFESSIONAL Best practices Note: When you use an onEnterFrame event handler to create scripted animations, the animation runs at the document's frame rate, similar to if you created a motion tween on a timeline. An alternative to the onEnterFrame event handler is setInterval (see ActionScript 2.0 Language Reference).
  • Page 445 For detailed information on caching button or movie clip instances see the following topics: • About caching and scrolling movie clips with ActionScript in Learning ActionScript 2.0 in Adobe Flash • Caching a movie clip in Learning ActionScript 2.0 in Adobe Flash...
  • Page 446 USING FLASH CS4 PROFESSIONAL Best practices • A cached bitmap can use significantly more memory than a regular movie clip instance. For example, if the movie clip on the Stage is 250 pixels by 250 pixels, when cached it might use 250 KB instead of 1 KB when it's a regular (uncached) movie clip instance.
  • Page 447: Displaying Special Characters

    (recommended). For information on subclasses, see About writing a subclass in Learning ActionScript 2.0 in Adobe Flash. If you must restyle your components, you can improve efficiency in your application by using the Loader component. To implement several styles in different components, place each component in its own SWF file. If you change styles on the Loader component and reload the SWF file, the components in the SWF file are recreated.
  • Page 448 USING FLASH CS4 PROFESSIONAL Best practices Using in your code forces the SWF file to use the system’s code page instead of Unicode. System.useCodepage Only use this process when you are loading non-Unicode encoded text from an external location and when this text is encoded with the same code page as the user’s computer.
  • Page 449 USING FLASH CS4 PROFESSIONAL Best practices In simulating the downloading speed, Flash uses estimates of typical Internet performance, not the exact modem speed. For example, if you select to simulate a modem speed of 28.8 Kbps, Flash sets the actual rate to 2.3 Kbps to reflect typical Internet performance.
  • Page 450: Tips For Creating Content For Mobile Devices

    UI responsiveness, and other aspects of the real mobile experience. For more tips and techniques for creating content for mobile phones and devices, see www.adobe.com/go/learn_cs_mobilewiki_en. Updated 5 March 2009...
  • Page 451 For more tips and techniques for creating content for mobile phones and devices, see www.adobe.com/go/learn_cs_mobilewiki_en. Flash Lite bitmap and vector graphics in mobile devices Flash Lite can render both vector and bitmap graphics. Each type of graphic has its advantages and disadvantages. The decision to use vector rather than bitmap graphics is not always clear and often depends on several factors.
  • Page 452 When using bitmaps, you can set image-compression options (on a per-image basis or globally for all bitmap images) that reduce SWF file size. For more tips and tricks about using Adobe Device Central with other Adobe products, see www.adobe.com/go/learn_cs_mobilewiki_en. Set compression options for an individual bitmap file Start Flash and create a document.
  • Page 453 For more tips and techniques for creating content for mobile phones and devices, see www.adobe.com/go/learn_cs_mobilewiki_en. Optimizing ActionScript for Flash Lite content on mobile devices Because of the processing speed and memory limitations on most mobile devices, follow these guidelines when developing ActionScript for Flash Lite content used on mobile devices: •...
  • Page 454 USING FLASH CS4 PROFESSIONAL Best practices • Always try to access properties directly rather than using ActionScript getter and setter methods, which have more overhead than other method calls. • Manage events wisely. Keep event listener arrays compact by using conditions to check whether a listener exists (is ) before calling it.
  • Page 455 Retrieving the values from a data table is much faster than having Flash calculate them at run time. For more tips and techniques for creating content for mobile phones and devices, see www.adobe.com/go/learn_cs_mobilewiki_en. Managing Flash Lite file memory for mobile devices Flash Lite regularly clears from memory any objects and variables that a file no longer references.
  • Page 456 For more tips and techniques for creating content for mobile phones and devices, see www.adobe.com/go/learn_cs_mobilewiki_en. Loading data for mobile devices in Flash Lite When developing files for mobile devices, minimize the amount of data you attempt to load at one time. If you are loading external data into a Flash Lite file (for example, using ), the device’s operating system may generate...
  • Page 457 SWF file. Add as many as required for the file. For example, the following XML file excludes the classes from the SWF file: mx.core.UIObject mx.screens.Slide <excludeAssets>) <asset name="mx.core.UIObject" />) <asset name="mx.screens.Slide" /> </excludeAssets> For more tips and techniques for creating content for mobile phones and devices, see www.adobe.com/go/learn_cs_mobilewiki_en. Updated 5 March 2009...
  • Page 458: Index

    338 absolute target path 180 selecting 338 signing applications 405 accessibility Actions panel 26 Adobe Authorware, playing a Flash SWF file in 380 Adobe Flash Accessibility web page 302 about 332 Adobe ConncectNow 17 animation and 304 Actions toolbox 333...
  • Page 459 ADPCM compression, for sounds 279 modifying or deleting frames in the Advanced effect, for symbol instances 154 Timeline 211 After Effects. See Adobe After Effects motion paths for 213 background color 45 AI files. See Adobe Illustrator files motion presets 189...
  • Page 460 USING FLASH CS4 PROFESSIONAL Index controlling instances with 169 Blur filter 238 turning off accessible labels for 310 Duplicate Movieclip 169 BMP files Up state for 164 GotoAndPlay at frame or label 169 exporting 414 GotoAndStop at frame or label 169 importing 65 Load External Movie Clip 169 Bone tool 225, 226...
  • Page 461 44 MediaPlayback 298 direction lines and points, about 93 Darken blending mode 242 screens and 329 Director. See Adobe Director Debug Player 350 components, creating for Flex 364 display, speeding up document 437 compressing sounds 278 distorting objects 115, 116...
  • Page 462 44 dithering colors, GIF files 394, 396 Union command 118 template, saving as 46 document class 373 Dreamweaver. See Adobe Dreamweaver Don’t Replace Existing Items option 162 Document command 44 Drop Shadow filter 237 dot syntax, target paths 180...
  • Page 463 316 fading in or out 212 Flash MX format, saving as 46 visible parameter 325 Fast command 437 Flash Player. See Adobe Flash Player formatting code 339, 340 file formats Flash Project panel 52 Frame by Frame graph, in Bandwidth...
  • Page 464 FreeHand files 66 panels as 14 registering images in 221 grids 20 identifiers, assigning to sounds 87 removing 173, 211 grids, about 20 Illustrator. See Adobe Illustrator showing thumbnails 24 Group command 121 images testing performance with Bandwidth groups importing 63, 64...
  • Page 465 USING FLASH CS4 PROFESSIONAL Index Info panel Polygon mode 119 JavaScript, alert statement 359 instance information in 156 selecting objects with 120 JPEG deblocking 383 moving objects using 124 Layer command 174 Ink Bottle tool 132 JPEG files layer folders importing 65 input text fields changing order of 175...
  • Page 466 USING FLASH CS4 PROFESSIONAL Index sounds in 274 Lock command 119 Motion Editor 203 using shared 162 Lock Fill modifier 136 easing tweens 207 library items locking layers 176 edit ease curves 210 keyboard shortcuts for 36 loop attribute or parameter 388 edit property curves 205 Library panel Loop option...
  • Page 467 USING FLASH CS4 PROFESSIONAL Index Movie Explorer drawing order 121 Output panel 358 about 27 erasing 113 and trace statement 359 context menu 28 flipping 117 copying contents 359 displaying symbol definition 156 grouping 121 displaying 359 filtering displayed items in 27 hiding from screen readers 310 List Objects command 355 Find text box 27...
  • Page 468 Pin Script option in the Actions panel 346 Publish options, PSD files 84 Preferences command 38 pinning scripts, about 346 Publish Preview command 397 Premiere Pro. See Adobe Premiere Pro Pixel Bender 235 publish settings previewing with Publish Preview pixel snapping 123...
  • Page 469 USING FLASH CS4 PROFESSIONAL Index replacing scaling quality attribute or parameter 388 bitmap, sound, or video files 61 by dragging 116 Quality option, for mp3 sound colors 60 objects 116 compression 279 fonts 59 Scene panel 179 QUALITY parameter publish settings 385 text 59 scenes QuickTime...
  • Page 470 USING FLASH CS4 PROFESSIONAL Index editing contents 321 scrolling text 252 selecting 118 Find and Replace 323 Seconds button, in Edit Envelope 277 showing anchor points on 111 first, adding 318 security skewing 117 Flash Form Application 317 Flash Player 382 snapping 123 Flash Slide Presentation 317 Select Screen dialog box 326...
  • Page 471 USING FLASH CS4 PROFESSIONAL Index software Stage weight, selecting 131 activation 1 displaying entire 18 width of 131 downloads 4 erasing 113 Subselection tool registration 1 keyboard shortcuts for selecting 35 adjusting line segments 107 sound size of 44 showing anchor points 111 round-trip editing 277 zooming 18 substitute fonts...
  • Page 472 USING FLASH CS4 PROFESSIONAL Index instances, unlinking from 155 movies 351 text blocks movie clip 148 sounds 279 appearance 247 swapping 154 text resizing 248 symbol-editing mode 151 aliasing 244 selecting 119, 249 tweening colors 212 alignment 255 widening 248 types 148 anti-aliasing 437 text fields...
  • Page 473 183, 218 Paint Bucket 133 version control symbol colors 212 Pen 102 best practices 419 text Pencil 101 Version Cue. See Adobe Version Cue See also type Pointer 97, 120 vertical text PolyStar 101 flow 248 Rectangle 98 preferences 250...
  • Page 474 USING FLASH CS4 PROFESSIONAL Index tips for creating 286 updating embedded video 292 View Esc Shortcut Keys command 338 View menu, changing document display with 437 View Options pop-up menu 341 visible parameter, for form screen 325 Wacom pressure-sensitive tablet 102 warning preferences 38 warping objects 116 Watch tab, Debugger 354...

This manual is also suitable for:

Flash cs4 professional

Table of Contents