MACROMEDIA FLASH 8-USING FLASH Use Manual

Using flash
Table of Contents

Advertisement

Quick Links

Using Flash

Advertisement

Table of Contents
loading

Summary of Contents for MACROMEDIA FLASH 8-USING FLASH

  • Page 1 Using Flash...
  • Page 2 If you access a third-party website mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites.
  • Page 3 Contents Introduction ..........13 About Flash .
  • Page 4: Table Of Contents

    Chapter 2: Working with Projects (Flash Professional Only) . . .69 Creating and managing projects (Flash Professional only) ..70 Using version control with projects (Flash Professional only) ..73 Troubleshooting remote folder setup (Flash Professional only) .
  • Page 5 Chapter 5: Drawing........129 About vector and bitmap graphics .
  • Page 6 Chapter 8: Working with Graphic Objects ....207 Selecting objects ..........208 Grouping objects .
  • Page 7 Chapter 11: Working with Video......271 About video features in Flash ....... . . 272 About using video in Flash .
  • Page 8 Creating a new screen-based document (Flash Professional only) ........343 Adding screens to a document (Flash Professional only) .
  • Page 9 Worldwide accessibility standards ......512 Macromedia Flash Accessibility web page..... . .513 Understanding screen reader technology.
  • Page 10 Using frame labels to disable printing ......547 Printing from the Flash Player context menu ....548 Publishing a document with printable frames .
  • Page 11 <label>............630 <listbox>...
  • Page 12 Contents...
  • Page 13: Introduction

    .swf. Flash Player, described in the next section, runs the SWF file. About Flash Player Macromedia Flash Player 8, which runs the applications that you create, is installed by default when you install Flash. Flash Player ensures that all Flash SWF files are viewable and available...
  • Page 14: What's New In Flash

    The Macromedia Flash Player is distributed with products from every major software partner, including Microsoft, Apple, Netscape, AOL, and Opera, to bring rich content and applications immediately to over 516 million people worldwide. Flash Player is distributed freely to anyone who wants to use it. You can get the latest version of Flash Player at the Macromedia Flash Player Download Center at www.macromedia.com/go/getflashplayer.
  • Page 15 162. Improved Fireworks importer The importer for Macromedia Fireworks PNG files now supports a greater number of the properties that you can apply to graphics in Fireworks. When you import Fireworks files into Flash, these graphics properties remain intact and editable in Flash.
  • Page 16 Stage when you play the SWF file. Macromedia expanded this area, called the work area, to allow you to store more items there. Flash users often use the work area to store graphics they plan to animate on the Stage later, or to store objects that do not have a graphical representation during playback, such as data components.
  • Page 17 A key aspect of any software application is that the work flow it allows aids in your productivity. Macromedia Flash 8 has an improved panel management solution that lets you optimize the workspace to better suit the way that you work.
  • Page 18 Other improvements Multiline support in the Strings panel The Strings panel has been improved to include multiline support in the String field and the language XML file. For more information, see “Authoring multilanguage text with the Strings panel” on page 370.
  • Page 19 Filters Filters let you create more compelling designs by applying visual effects to movie clips and text. Filters are natively supported and rendered in real time by Flash Player 8. With these filters, you can make objects glow, add drop shadows, and apply many other effects and combinations of effects.
  • Page 20 Alpha channel support Alpha channels let you encode video such that the background is removed and saved as a transparency. This lets you overlay (or composite) the video on top of other Flash content, while the subject of the video remains in the foreground. For example, a common use of alpha channels is to record a video clip of a presenter using a blue screen as a backdrop.
  • Page 21: Chapter 1: Working With Flash Documents

    Working with Flash Documents When you create and save Macromedia Flash Basic 8 and Macromedia Flash Professional 8 documents within the Flash authoring environment, the documents are in FLA file format. To display a document in Macromedia Flash Player, you must publish or export the document as a SWF file.
  • Page 22: This Chapter Contains The Following Sections: Creating Or Opening A Document And Setting Properties

    Using the History panel ........... . 55 Saving documents when you undo steps .
  • Page 23 To create a new document: Select File > New. On the General tab, select Flash Document. To create a new document with the New File button (Windows only): Click the New File button in the main toolbar to create a new document of the same type as the last document created.
  • Page 24 For Dimensions, do one of the following: To specify the Stage size in pixels, enter values in the Width and Height text boxes. The default document size is 550 x 400 pixels. The minimum size is 1 x 1 pixels; the maximum is 2880 x 2880 pixels.
  • Page 25: Using Document Tabs For Multiple Documents

    Click the Size control to display the Document Properties dialog box and access its settings. To select a background color, click the triangle in the Background color box and select a color from the palette. For Frame Rate, enter the number of animation frames to appear every second. For Publish, click the Settings button to display the Publish Settings dialog box with the Flash tab selected.
  • Page 26 You can save a document as a template, which lets you use the document as the starting point for a new Flash document (this is similar to how you would use templates in word-processing or web page–editing applications). For information on using templates to create new documents, see “Creating or opening a document and setting properties”...
  • Page 27 Select Flash MX 2004 Document from the Format pop-up menu. If an alert message indicates that content will be deleted if you save in Flash MX 2004 format, click Save As Flash MX 2004 to continue. This might happen if your document contains features, such as graphic effects or behaviors, that are available only in Flash 8.
  • Page 28 Some problems might occur if you work with only one FLA file and do not save versions during the process of creating the file. It is possible that files might bloat in size because of the history that’s saved in the FLA file or that a file might become corrupt (as with any software you use) while you are working on it.
  • Page 29: About Adding Media Content

    About adding media content You can add media content to a Flash document in the Flash authoring environment. You can create vector artwork or text directly in Flash; import vector artwork, bitmaps, video, and sound; and create symbols, reusable media content such as buttons. You can also use ActionScript to add media content to a document dynamically.
  • Page 30: About Components

    Tweened and frame-by-frame animation is motion that you create by placing graphics on frames in the Timeline. In tweened animation, you create the beginning and ending frames of the animation, and Flash creates the intermediary frames. In frame-by-frame animation, you create graphics for each frame in the animation.
  • Page 31: Managing Media Assets With The Library

    Managing media assets with the library The library in a Flash document stores media assets that you create or import for use in a Flash document. The library stores imported files such as video clips, sound clips, bitmaps, and imported vector artwork as well as symbols. A symbol is a graphic, button, or movie clip that you create once and can reuse multiple times.
  • Page 32 To resize the Library panel, do any of the following: Drag the lower right corner of the panel. Click the Wide State button to enlarge the Library panel so it shows all the columns. Click the Narrow State button to reduce the width of the Library panel. To change the width of columns: Position the pointer between column headers and drag to resize.
  • Page 33 Working with folders in the Library panel You can organize items in the Library panel using folders, much like in the Windows Explorer or the Macintosh Finder. When you create a new symbol, it is stored in the selected folder. If no folder is selected, the symbol is stored at the root of the library.
  • Page 34 Editing items in the library To edit library items, including imported files, you select options from the Library options menu. You can also update imported files after editing them in an external editor, using the Update option in the Library options menu. For more information, see “Updating imported files in the Library panel”...
  • Page 35 To delete a library item: Select the item and click the trash can icon at the bottom of the Library panel. In the warning box that appears, select Delete Symbol Instances (the default) to delete the library item and all its instances. Deselect the option to delete only the symbol, which leaves the instances on the Stage.
  • Page 36: About Actionscript

    Working with common libraries You can use the sample common libraries included with Flash to add buttons or sounds to your documents. You can also create custom common libraries, which you can then use with any documents that you create. To use an item from a common library in a document: Select Window >...
  • Page 37: About Multiple Timelines And Levels

    The popular JavaScript language is rooted in the same standard. For this reason, developers who are familiar with JavaScript should find ActionScript immediately familiar and have no trouble learning it quickly. About Multiple Timelines and levels Flash Player has a stacking order of levels. Every Flash document has a main Timeline located at level 0 in Flash Player.
  • Page 38 About parent and child movie clips When you place a movie clip instance on another movie clip’s Timeline, the placed movie clip is the child and the other movie clip is the parent. The parent instance contains the child instance. The root Timeline for each level is the parent of all the movie clips on its level, and because it is the topmost Timeline, it has no parent.
  • Page 39: Using Absolute And Relative Target Paths

    Using absolute and relative target paths You can use ActionScript to send messages from one Timeline to another. The Timeline that contains the action is called the controlling Timeline, and the Timeline that receives the action is called the target Timeline. For example, there could be an action on the last frame of one Timeline that tells another Timeline to play.
  • Page 40 To communicate between documents on different levels, you must use the level name in the target path. The following example shows how the instance would address the portland instance located on a movie clip called is at the same level as atlanta georgia georgia...
  • Page 41 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; You can reuse this script by attaching it to any movie clip instance. Flash Lite 1.0 and 1.1 support attaching scripts only to buttons.
  • Page 42 In the Actions toolbox (at the left of the panel), select an action or method that requires a target path. Click the parameter box or location in the script where you want to insert the target path. Click the Insert Target Path button above the Script pane. In the Insert Target Path dialog box, select a syntax: Dots (the default) or Slashes.
  • Page 43 Organizing Timelines and the library Frames and layers on a Timeline are two important parts of the Flash authoring environment. These areas show you where assets are placed and determine how your document works. How a Timeline and the library are set up and used affect the entire FLA file and its overall usability.
  • Page 44: About Scenes

    About scenes Using scenes is similar to using several SWF files together 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 45: Working With Scenes

    Working with scenes To organize a document thematically, you can use scenes. For example, you might use separate scenes for an introduction, a loading message, and credits. You cannot use scenes in a screen-based document. For information on screens, see Chapter 14, “Working with Screens (Flash Professional Only),”...
  • Page 46: Using The Movie Explorer

    Using the Movie Explorer The Movie Explorer provides an easy way for you to view and organize the contents of a document and select elements in the document for modification. It contains a display list of currently used elements, arranged in a navigable hierarchical tree. You can filter which categories of items in the document appear in the Movie Explorer, selecting from text, graphics, buttons, movie clips, actions, and imported files.
  • Page 47 From the options menu in Movie Explorer, select Show Symbol Definitions to show information about symbols. Both the Movie Elements option and the Symbol Definitions option can be active at the same time. To search for an item using the Find text box: In the Find text box, enter the item name, font name, ActionScript string, or frame number.
  • Page 48: Using Find And Replace

    Show Symbol Definitions shows all the elements associated with a symbol. Copy All Text to Clipboard copies selected text to the Clipboard. You can paste the text into an external text editor for spell checking or other editing. Copy Paste , and Clear perform these common functions on a selected element.
  • Page 49 Finding and replacing text When you find and replace text, you can enter the text string to find and the text string with which to replace it. You can select options for searching by whole word, for matching case, and for selecting which type of text element (text field contents, ActionScript strings, and so on) to include in the search.
  • Page 50 To replace text, do one of the following: Click Replace to replace the currently selected occurrence of the specified text. Click Replace All to replace all occurrences of the specified text. Finding and replacing fonts When you find and replace fonts, you can search or replace by font name, font style, font size, or any combination of those characteristics.
  • Page 51 You cannot find and replace colors in grouped objects. To find and replace colors in a GIF or JPEG file in a Flash document, edit the file in Macromedia Fireworks or a similar image-editing application. To find and replace a color: Select Edit >...
  • Page 52 Select the Fills, Strokes, or Text option or any combination of those options to specify which occurrence of the color to find and replace. Select Live Edit to select the next occurrence of the specified color on the Stage and edit it in place.
  • Page 53: Finding/Replacing Sound/Video/Bitmap Files

    Finding and replacing sound, video, or bitmap files When you find and replace a sound, video, or bitmap file, you can search for the file by name. You can replace the file with another file of the same type. That is, you can replace a sound with a sound, a video with a video, or a bitmap with a bitmap.
  • Page 54 You cannot undo the following actions when using object-level Undo: Enter Edit mode Exit edit mode Select unused library items Select library items Add library items Delete library items Duplicate library item Modify library item Modify library symbol behavior Rename library items Move library items Edit library items Import to library...
  • Page 55: Using The History Panel

    To remove deleted items from a document after using the Undo command, you use the Save and Compact command. See “Saving documents when you undo steps” on page You can use the Repeat command to reapply a step to the same object or to a different object. For example, if you move a shape named shape_A, you can select Edit >...
  • Page 56 You can clear the History panel to erase the history list for the current document. After clearing the history list, you cannot undo the steps that are cleared. Clearing the history list does not undo steps; it merely removes the record of those steps from the current document’s memory.
  • Page 57 To replay one step: In the History panel, select a step and click the Replay button. The step replays and a copy of it appears in the History panel. To replay a series of adjacent steps: Select steps in the History panel by doing one of the following: Drag from one step to another.
  • Page 58: Saving Documents When You Undo Steps

    Saving documents when you undo steps By default, when you undo a step using Edit > Undo or the History panel, the file size of the Flash document does not change, even if you delete an item in the document. For example, if you import a video file into a document, and then undo the import, the file size of the document still includes the size of the video file.
  • Page 59 Creating and managing commands You can create a command from selected steps in the History panel. In the Manage Saved Commands dialog box, you can rename or delete commands. To create a command: Select a step or set of steps in the History panel. Select Save As Command from the History panel options menu.
  • Page 60: Creating Custom Keyboard Shortcuts

    The predetermined sets are listed at the top of the menu. For example, if you are familiar with the shortcuts found in Adobe Illustrator or Macromedia Freehand, you can use those shortcuts by choosing the corresponding predetermined set.
  • Page 61 Remove Item (-) removes the selected shortcut from the list of shortcuts. Press Key displays the key combination you enter when you’re adding or changing a shortcut. Change adds the key combination shown in the Press Key text box to the list of shortcuts, or changes the selected shortcut to the specified key combination.
  • Page 62: About Customizing Context Menus In Flash Documents

    Press a key combination. The key combination appears in the Press Key text box. If there is a problem with the key combination (for example, if the key combination is already assigned to another command), an explanatory message appears just below the Shortcuts text box and you may be unable to add or edit the shortcut.
  • Page 63: About The Links Menu In Flash Player

    The editing context menu appears when a user right-clicks (Windows) or Control-clicks (Macintosh) in an editable text field in a document in Flash Player. You can add custom items to this menu. You cannot hide any built-in items. Flash Player also displays an error context menu when a user right-clicks (Windows) or Control-clicks (Macintosh) in Flash Player and no document is loaded.
  • Page 64: Speeding Up Document Display

    Speeding up document display To speed up the document display, you can use commands in the View menu to turn off rendering-quality features that require extra computing and slow down document display. None of these commands have any effect on how Flash exports a document. To specify the display quality of Flash documents in a web browser, you use the object embed...
  • Page 65 To optimize documents: Use symbols, animated or otherwise, for every element that appears more than once. When creating animation sequences, use tweened animations, whenever possible. These animations use less file space than a series of keyframes. For animation sequences, use movie clips instead of graphic symbols. Limit the area of change in each keyframe;...
  • Page 66: Testing Document Download Performance

    Testing document download performance Flash Player attempts to meet the frame rate you set; the actual frame rate during playback can vary on different computers. If a document that is downloading reaches a particular frame before the frame’s required data has downloaded, the document pauses until the data arrives. To view downloading performance graphically, you can use the Bandwidth Profiler, which shows how much data is sent for each frame according to the modem speed you specify.
  • Page 67 Select View > Download Settings, and select a download speed to determine the streaming rate that Flash simulates: 14.4 Kbps, 28.8 Kbps, 56 Kbps, DSL, T1 or a user setting. To enter a custom user setting, select Customize. When viewing the SWF file, select View > Bandwidth Profiler to show a graph of the downloading performance.
  • Page 68: Printing From The Flash Authoring Tool

    Click Publish. Flash generates a text file with the extension .txt. (If the document file is myMovie.fla, the text file is myMovie Report.txt.) The report lists the size of each frame, shape, text, sound, video and ActionScript script by frame. Printing from the Flash authoring tool You can print frames from Flash documents as you work, to preview and edit your documents.
  • Page 69: Chapter 2: Working With Projects (Flash Professional Only)

    CHAPTER 2 Working with Projects (Flash Professional Only) In Macromedia Flash Professional 8, you can use Flash Projects to manage multiple document files in a single project. Flash Projects allow you to group multiple, related files together to create complex applications.
  • Page 70: Creating And Managing Projects (Flash Professional Only)

    Creating and managing projects (Flash Professional only) You use the Flash Project panel to create and manage projects.The panel displays the contents of a Flash Project in a collapsible tree structure. The panel title bar displays the project name. If a project file is missing (not in its specified location), a Missing File icon appears next to the filename.
  • Page 71 If no other project is open, open the Flash Project panel and select Open an Existing Project in the panel window. Navigate to the project and click Open. Select File > Open. Navigate to the project and click Open. To add a file, do one of the following: Click the Add Files (+) button at the lower right corner of the Flash Project panel.
  • Page 72 To test a project: Click Test Project in the Flash Project panel. If the project contains no FLA, HTML, or HTM file, Flash displays an error message. Click OK and add a file of the appropriate type. If no FLA, HTML, or HTM file is designated as the default document, Flash displays an error message.
  • Page 73: Using Version Control With Projects (Flash Professional Only)

    To close all files when you close a project: Select Edit > Preferences (Windows) or Flash > Preferences (Macintosh) and click the Editing tab. Under Project Preferences, click Close Open Files on Project Close (selected by default). When this option is selected, Flash closes all open files in the current project when the project is closed.
  • Page 74 On Windows, you can use Flash projects with SourceSafe. You must have Microsoft Visual SourceSafe Client version 6 installed. To define a site for version control: Create a new project and add files. See “Creating and managing projects (Flash Professional only)”...
  • Page 75: Troubleshooting Remote Folder Setup (Flash Professional Only)

    To edit a file with version control applied: Open the project that contains the file, as described in “Creating and managing projects (Flash Professional only)” on page Select the file in the tree structure in the project panel and select Check Out from the project context menu.
  • Page 76 Filenames and folder names that contain spaces and special characters often cause problems when transferred to a remote site. Use underscores in place of spaces, and avoid special characters in filenames and folder names wherever possible. In particular, colons, slashes, periods, and apostrophes in filenames or folder names can cause problems. If problems persist, try uploading with an external FTP program to find out if the problem is specific to using FTP in Flash.
  • Page 77 Using Symbols, Instances, and Library Assets A symbol is a graphic, button, or movie clip that you create in Macromedia Flash Basic 8 or Macromedia Flash Professional 8. You create the symbol only once; you can then reuse it throughout your document or in other documents.
  • Page 78 You can share symbols among documents as shared library assets during authoring or at runtime. For runtime shared assets, you can link assets in a source document to any number of destination document, without importing the assets into the destination document. For assets shared during authoring, you can update or replace a symbol with any other symbol available on your local network.
  • Page 79: Types Of Symbols

    Types of symbols Each symbol has a unique Timeline and Stage, complete with layers. When you create a symbol you choose the symbol type, depending on how you want to use the symbol in your document. Use graphic symbols for static images and to create reusable pieces of animation that are tied to the main Timeline.
  • Page 80: Editing Movie Clip Symbols With 9-Slice Scaling

    When a movie clip symbol has 9-slice scaling applied, it appears in the Library panel preview with the guides displayed. 9-slice scaling is visible only in the Test Movie window; you cannot view 9-slice scaling on the Stage. Editing movie clip symbols with 9-slice scaling By default, slice guides are placed at 25% (or 1/4) of the symbol’s width and height from the edge of the symbol.
  • Page 81: Runtime Bitmap Caching Movie Clip And Button Symbols

    To edit a movie clip symbol using 9-slice scaling: Enter symbol-editing mode by doing one of the following: Select an instance of the symbol on the Stage and right-click (Windows) or Control- click (Macintosh), and select Edit from the context menu. Select the symbol in the Library and right-click (Windows) or Control-click (Macintosh), and select Edit from the context menu.
  • Page 82: About Controlling Instances And Symbols With Actionscript

    For more information, see “When to enable caching” in Chapter 11, “Working with Movie Clips,” of Learning ActionScript 2.0 in Flash. You can only apply the Use Runtime Bitmap Caching check box to movie clip and button symbols. Under the following circumstances, a movie clip will not use a bitmap (even if the Use Runtime Bitmap Caching check box is selected) and will instead render the movie clip or button symbol using vector data: The bitmap is too large (greater than 2880 pixels in either direction).
  • Page 83 To convert selected elements to a symbol: Select an element or several elements on the Stage. Then do one of the following: Select Modify > Convert to Symbol. Drag the selection to the Library panel. Right-click (Windows) or Control-click (Macintosh) and select Convert to Symbol from the context menu.
  • Page 84 When you have finished creating the symbol content, do one of the following to return to document-editing mode: Click the Back button at the left of the Edit bar above the Stage. Select Edit > Edit Document. Click the scene name in the Edit bar above the Stage. When you create a new symbol, the registration point is placed at the center of the window in symbol-editing mode.
  • Page 85: Creating Instances

    When you have finished creating the symbol content, do one of the following to return to document-editing mode: Click the Back button at the left of the Edit bar above the Stage. Select Edit > Edit Document. Click the scene name in the Edit bar above the Stage. Duplicating symbols Duplicating a symbol lets you use an existing symbol as a starting point for creating a new symbol.
  • Page 86: Creating Buttons

    To create a new instance of a symbol: Select a layer in the Timeline. Flash can place instances only in keyframes, always on the current layer. If you don’t select a keyframe, Flash adds the instance to the first keyframe to the left of the current frame. A keyframe is a frame in which you define a change in the animation.
  • Page 87 Each frame in the Timeline of a button symbol has a specific function: The first frame is the Up state, representing the button whenever the pointer is not over the button. The second frame is the Over state, representing the button’s appearance when the pointer is over the button.
  • Page 88: Enabling, Editing, And Testing Buttons

    Repeat steps 5 and 6 for the Down frame and the Hit frame. The Hit frame is not visible on the Stage, but it defines the area of the button that responds when clicked. Make sure that the graphic for the Hit frame is a solid area large enough to encompass all the graphic elements of the Up, Down, and Over frames.
  • Page 89: Editing Symbols

    To move or edit an enabled button: Select the button, as described above. Do one of the following: 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 the button (Macintosh).
  • Page 90 To edit a symbol in place: Do one of the following: Double-click an instance of the symbol on the Stage. Select an instance of the symbol on the Stage and right-click (Windows) or Control- click (Macintosh), and select Edit in Place from the context menu. Select an instance of the symbol on the Stage and select Edit >...
  • Page 91: Changing Instance Properties

    To change the registration point, drag the symbol on the Stage. A cross hair indicates the location of the registration point. To exit symbol-editing mode and return to editing the document, do one of the following: Click the Back button at the left of the Edit bar at the top of the Stage. Select Edit >...
  • Page 92 To change the color and transparency of an instance: Select the instance on the Stage and select Window > Properties. In the Property inspector, select one of the following options from the Color pop-up menu: Brightness adjusts the relative lightness or darkness of the image, measured on a scale from black (–100%) to white (100%).
  • Page 93 To assign a different symbol to an instance: Select the instance on the Stage and select Window > Properties. Click the Swap button in the Property inspector. In the Swap Symbol dialog box, select a symbol to replace the one currently assigned to the instance.
  • Page 94: Controlling Instances With Behaviors

    To set the looping of a graphic instance: Select a graphic instance on the Stage and select Window > Properties. In the Property inspector, select an animation option from the pop-up menu below the instance name: Loop loops all the animation sequences contained in the current instance for as many frames as the instance occupies.
  • Page 95 The behaviors in the following table are packaged with Flash Basic 8 and Flash Professional 8. For more information on embedded video behaviors, see “Controlling video playback using behaviors” on page 302. For more information on controlling sounds with behaviors, see “Controlling sound playback using behaviors”...
  • Page 96: Creating Custom Behaviors

    Appendix B, “XML to UI.” To learn about ActionScript, see Learning ActionScript 2.0 in Flash. You can also download behaviors that other Flash users have created from the Macromedia Exchange website. You can visit the Macromedia Exchange at: www.macromedia.com/devnet/ mx/flash/...
  • Page 97 If you are new to ActionScript, see Learning ActionScript 2.0 in Flash. For example: <actionscript> <![CDATA[ // Trigger Data Source Behavior // Macromedia 2003 $TARGET$.trigger(); ]]> </actionscript> Save the file. Test the behavior. For information on behaviors available in Flash, see “Controlling instances with...
  • Page 98: Best Practices For Using Behaviors

    Best practices for using behaviors Behaviors are prewritten code snippets that can be instantly added to parts of a FLA file. The introduction of behaviors has added to the complexity of determining best practices in Flash, because the way some behaviors are added does not follow typical and ideal workflows. Many developers usually enter ActionScript either into one or several frames on the main Timeline or in external ActionScript files, which is a good practice to follow.
  • Page 99 Many developers do not place ActionScript on symbol instances, and instead place their code on the Timeline (timeline code) or in classes. Because Behaviors add code to many locations in a FLA file, it means that your ActionScript is not centralized and can be difficult to locate. When code is not centralized, it is difficult to figure out interactions between the snippets of code, and it is impossible to write code in an elegant way.
  • Page 100 You need to decide when you need to use behaviors instead of writing ActionScript. First, answer the questions in the introductory section “Best practices for using behaviors” on page 98. Examine how and where you want to use behaviors and ActionScript in your FLA file.
  • Page 101: Breaking Apart Instances

    Being courteous If you plan to share your FLA file with other users and you use ActionScript placed on or inside objects (such as movie clips), it can be difficult for those users to find your code’s location, even when they use the Movie Explorer to search through the document. If you are creating a FLA file that has code placed in many locations throughout the document, and plan to share the file, it is courteous to notify other users that you are using ActionScript that is placed in or on objects.
  • Page 102: Getting Information About Instances On The Stage

    Getting information about instances on the Stage As you create a Flash application, it can be difficult to identify a particular instance of a symbol on the Stage, particularly if you are working with multiple instances of the same symbol. You can identify instances using the Property inspector, the Info panel, or the Movie Explorer.
  • Page 103: Copying Library Assets Between Documents

    To view the symbol definition for the selected symbol in the Movie Explorer: Click the Show Buttons, Movie Clips, and Graphics button at the top of the Movie Explorer. Right-click (Windows) or Control-click (Macintosh) and select Show Symbol Instances and Go to Symbol Definition from the context menu; or select these options from the pop- up menu in the upper right corner of the Movie Explorer.
  • Page 104: Using Shared Library Assets

    To copy a library asset by dragging: With the destination document open in Flash, select the asset in the Library panel in the source document. Drag the asset into the Library panel in the destination document. To copy a library asset by opening the source library in the destination document document:...
  • Page 105 Working with runtime shared assets Using runtime shared library assets involves two procedures: First, the author of the source document defines a shared asset in the source document and enters an identifier string for the asset and a URL where the source document will be posted. Second, the author of the destination document defines a shared asset in the destination document and enters an identifier string and URL identical to those used for the shared asset in the source document.
  • Page 106 Linking to runtime shared assets from a destination document You use the Symbol Properties dialog box or the Linkage Properties dialog box to define sharing properties for an asset in a destination document so that you can link the asset to a shared asset in a source document.
  • Page 107 To turn off linkage for a symbol in a destination document: In the destination document, select the linked symbol in the Library panel and do one of the following: If the asset is a movie clip, button, or graphic symbol, select Properties from the Library options menu.
  • Page 108: Resolving Conflicts Between Library Assets

    Resolving conflicts between library assets If you import or copy a library asset into a document that already contains a different asset of the same name, you can choose whether to replace the existing item with the new item. This option is available with all the methods for importing or copying library assets, including the following: Copying and pasting an asset from a source document...
  • Page 109 To resolve naming conflicts between library assets, do one of the following: Click Don’t Replace Existing Items to preserve the existing assets in the destination document. Click Replace Existing Items to replace the existing assets and their instances with the new items of the same name.
  • Page 110 Using Symbols, Instances, and Library Assets...
  • Page 111: Chapter 4: Working With Color, Strokes, And Fills

    Working with Color, Strokes, and Fills Macromedia Flash Basic 8 and Flash Professional 8 provide a variety of ways to apply, create, and modify colors. Using the default palette or a palette you create, you can choose colors to apply to the stroke or fill of an object you are about to create, or one already on the Stage.
  • Page 112: About The Color Mixer

    This chapter contains the following sections: About the Color Mixer ........... . .112 About creating gradients.
  • Page 113 The Color Mixer has the following options: Stroke color changes the color of the stroke, or the border, of a graphic object. Fill Color changes the color of the fill. The fill is the area of color that fills up the shape. Type pop-up menu changes the fill style: None...
  • Page 114: About Creating Gradients

    Repeat repeats the gradient from the beginning of the gradient to the end until the selected shape is filled. Overflow modes are supported only in Flash Player 8. Linear RGB creates an SVG-compliant (Scalable Vector Graphics) linear or radial gradient. About creating gradients A gradient is a multicolor fill in which one color gradually changes into another color.
  • Page 115: Using The Stroke Color And Fill Color Controls In The Property Inspector

    To apply stroke and fill colors using the Tools panel controls, do one of the following: Click the triangle next to the Stroke or Fill color box and select a color swatch from the pop-up window. Gradients can be selected for the fill color only. Click the Color Picker button in the color pop-up window and select a color from the Color Picker.
  • Page 116 To select a stroke weight, click the triangle next to the Weight pop-up menu and set the slider at the weight you want. Specify a stroke height by doing one of the following: Select one of the preset values from the height pop-up menu. Preset values appear in points.
  • Page 117: Working With Solid Colors And Gradient Fills In The Color Mixer

    To avoid beveling a Miter join, enter a Miter limit. Line lengths exceeding this value are squared off instead of pointed. For example, a Miter limit of 2 for a 3-point stroke means that when the length of the point is twice the stroke weight, Flash removes the limit point.
  • Page 118 To create or edit a solid color with the Color Mixer: To apply the color to existing artwork, select an object or objects on the Stage. Select Window > Color Mixer. To select a color mode display, select RGB (the default setting) or HSB from the pop-up menu in the upper right corner of the Color Mixer.
  • Page 119 To create or edit a gradient fill with the Color Mixer: To apply a gradient fill to existing artwork, select an object or objects on the Stage. If the Color Mixer is not visible, select Window > Color Mixer. To select a color mode display, select RGB (the default setting) or HSB. Select a gradient type from the Type pop-up menu: Linear creates a gradient that shades from the starting point to the end point in a straight...
  • Page 120: Modifying Strokes With The Ink Bottle Tool

    Modifying strokes with the Ink Bottle tool To change the stroke color, width, and style of lines or shape outlines, you can use the Ink Bottle tool. You can apply only solid colors, not gradients or bitmaps, to lines or shape outlines.
  • Page 121: Transforming Gradient And Bitmap Fills

    Click the Gap Size modifier and select a gap size option: Select Don’t Close Gaps if you want to close gaps manually before filling the shape. Closing gaps manually can be faster for complex drawings. Select a Close option to have Flash fill a shape that has gaps. If gaps are too large, you might have to close them manually.
  • Page 122 Width Click and move the square handle to adjust the width of the gradient. The rollover icon for the width handle is a double-ended arrow. Center point Focal point Width Size Rotation Press Shift to constrain the direction of a linear gradient fill to multiples of 45°. Reshape the gradient or fill in any of the following ways: To reposition the center point of the gradient or bitmap fill, drag the center point.
  • Page 123 To rotate the gradient or bitmap fill, drag the circular rotation handle at the corner. You can also drag the lowest handle on the bounding circle of a circular gradient or fill. To scale a linear gradient or a fill, drag the square handle at the center of the bounding box.
  • Page 124: Copying Strokes And Fills With The Eyedropper Tool

    Copying strokes and fills with the Eyedropper tool You can 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. See “Breaking apart groups and objects”...
  • Page 125: Modifying Color Palettes

    You can import and export both solid and gradient color palettes between Flash files, as well as between Flash and other applications, such as Macromedia Fireworks and Adobe Photoshop.
  • Page 126 Set files (CLR files). You can import and export RGB color palettes using Color Table files (ACT files) that can be used with Macromedia Fireworks and Adobe Photoshop. You can also import color palettes, but not gradients, from GIF files. You cannot import or export gradients from ACT files.
  • Page 127 To import a color palette: In the Color Swatches panel, select one of the following commands from the pop-up menu in the upper right corner: To append the imported colors to the current palette, select Add Colors. To replace the current palette with the imported colors, select Replace Colors. Navigate to the desired file and select it.
  • Page 128 Working with Color, Strokes, and Fills...
  • Page 129: Chapter 5: Drawing

    CHAPTER 5 Drawing The drawing tools in Macromedia Flash Basic 8 and Flash Professional 8 let you create and modify shapes for the artwork in your documents. For an interactive introduction to drawing in Flash, see “Creating Graphics: Draw in Flash” in Flash Tutorials.
  • Page 130: About Vector And Bitmap Graphics

    About vector and bitmap graphics Computers display graphics in either vector or bitmap format. Understanding the difference between the two formats can help you work more efficiently. Using Flash, you can create and animate compact vector graphics. Flash also lets you import and manipulate vector and bitmap graphics that have been created in other applications.
  • Page 131: About Flash Drawing Models

    Bitmap graphics Bitmap graphics describe images using colored dots, called pixels, arranged in a grid. For example, the image of a leaf is described by the specific location and color value of each pixel in the grid, creating an image in much the same manner as a mosaic. When you edit a bitmap graphic, you modify pixels rather than lines and curves.
  • Page 132 Object Drawing model lets you draw shapes as separate objects that do not automatically merge together when overlaid. This lets you overlap shapes without altering their appearance should you choose to move them apart, or rearrange their appearance. Flash creates each shape as a separate object that you can individually manipulate.
  • Page 133: About Flash Drawing And Painting Tools

    When you paint on top of shapes and lines, the portion underneath is replaced by whatever is on top. Paint of the same color merges together. Paint of different colors remains distinct. You can use these features to create masks, cutouts, and other negative images. For example, the cutout below was made by moving the ungrouped kite image onto the green shape, deselecting the kite, and then moving the filled portions of the kite away from the green shape.
  • Page 134: Using The Object Drawing Model

    When you use a drawing or painting tool to create an object, the tool applies the current stroke and fill attributes to the object. To change the stroke and fill attributes of existing objects, you can use the Paint Bucket and Ink Bottle tools in the Tools panel or the Property inspector.
  • Page 135 Selecting objects You can select objects with the Pointer, Subselection, and Lasso tools. The Pointer, Subselection, and Lasso tools let you select objects by clicking on them. The Pointer and Subselection tools let you select objects by dragging a rectangular selection marquee around the object.
  • Page 136: Drawing With The Pencil Tool

    Drawing with the Pencil tool To draw lines and shapes, you use the Pencil tool, in much the same way that you would use a real pencil to draw. To apply smoothing or straightening to the lines and shapes as you draw, you can select a drawing mode for the Pencil tool.
  • Page 137: Drawing Straight Lines, Ovals, And Rectangles

    Drawing straight lines, ovals, and rectangles You can use the Line, Oval, and Rectangle tools to easily create these basic geometric shapes. The Oval and Rectangle tools create stroked and filled shapes. The Rectangle tool lets you create rectangles with square or rounded corners. To draw a straight line, oval, or rectangle: Select the Line, Oval, or Rectangle tool.
  • Page 138: Drawing Polygons And Stars

    Drawing polygons and stars Using the PolyStar tool you can draw polygons or stars. You can choose the number of sides of the polygon or the number of points on the star, from 3 to 32. You can also choose the depth of the star points.
  • Page 139 Setting Pen tool preferences You can specify preferences for the appearance of the Pen tool pointer, for previewing line segments as you draw, or for the appearance of selected anchor points. Selected line segments and anchor points are displayed using the outline color of the layer on which the lines and points appear.
  • Page 140 Click again where you want the first segment of the straight line to end. Shift-click to constrain lines to multiples of 45°. Continue clicking to create additional straight segments. To complete the path as an open or closed shape, do one of the following: To complete an open path, double-click the last point, click the Pen tool in the Tools panel, or Control-click (Windows) or Command-click (Macintosh) anywhere away from the path.
  • Page 141 When you use the Pen tool to create a curved segment, the anchor points of the line segment display tangent handles. The slope and length of each tangent handle determine the slope and the height, or depth, of the curve. Moving the tangent handles reshapes the curves of the path. “Adjusting segments”...
  • Page 142 By default, selected curve points appear as hollow circles, and selected corner points appear as hollow squares. To convert segments in a line from straight segments to curve segments or the reverse, you convert corner points to curve points or the reverse. You can also move, add, or delete anchor points on a path.
  • Page 143 To add an anchor point: Click a line segment with the Pen tool. To delete an anchor point, do one of the following: To delete a corner point, click the point once with the Pen tool. To delete a curve point, click the point twice with the Pen tool. (Click once to convert the point to a corner point, and once more to delete the point.) Select the point with the Subselection tool and press Delete.
  • Page 144: Painting With The Brush Tool

    To adjust points or tangent handles on a curve: Select the Subselection tool, and select an anchor point on a curved segment. A tangent handle appears for the point you selected. To adjust the shape of the curve on either side of the anchor point, drag the anchor point, or drag the tangent handle.
  • Page 145 The Pressure modifier varies the width of brush strokes when you vary the pressure on the stylus. The Tilt modifier varies the angle of brush strokes when you vary the angle of the stylus on the tablet. The Tilt modifier measures the angle between the top (eraser) end of the stylus and the top (north) edge of the tablet.
  • Page 146: Reshaping Lines And Shape Outlines

    If a Wacom pressure-sensitive tablet is attached to your computer, you can select the Pressure modifier, the Tilt modifier, or both, to modify brush strokes. Select the Pressure modifier to vary the width of your brush strokes by varying the pressure on your stylus.
  • Page 147 Flash adjusts the curve of the line segment to accommodate the new position of the moved point. If the repositioned point is an end point, you can lengthen or shorten the line. If the repositioned point is a corner, the line segments forming the corner remain straight as they become longer or shorter.
  • Page 148 You can also use the straightening technique to make Flash recognize shapes. If you draw any oval, rectangular, or triangular shapes with the Recognize Shapes option turned off, you can use the Straightening option to make the shapes geometrically perfect. (For information on the Recognize Shapes option, see “Specifying drawing settings”...
  • Page 149: Erasing

    Optimizing curves Another way to smooth curves is to optimize them. This refines curved lines and fill outlines by reducing the number of curves used to define these elements. Optimizing curves also reduces the size of the Flash document (FLA file) and the exported Flash application (SWF file).
  • Page 150: Modifying Shapes

    To erase by dragging: Select the Eraser tool. Click the Eraser Mode modifier and select an erasing mode: Erase Normal erases strokes and fills on the same layer. Erase Fills erases only fills; strokes are not affected. Erase Lines erases only strokes; fills are not affected. Erase Selected Fills erases only the currently selected fills and does not affect strokes, selected or not.
  • Page 151: Snapping

    To expand the shape of a filled object: Select a filled shape. This command works best on a single filled color shape with no stroke. Select Modify > Shape > Expand Fill. In the Expand Path dialog box, enter a value in pixels for Distance and select Expand or Inset for Direction.
  • Page 152 Object snapping Object snapping can be turned on using the Snap modifier for the Selection tool, or the Snap to Objects command in the View menu. If the Snap modifier for the Selection tool is on, a small black ring appears under the pointer when you drag an element.
  • Page 153 To turn pixel snapping on or off temporarily: Press the C key. When you release the C key, pixel snapping returns to the state you selected with View > Snapping > Snap to Pixels. To temporarily hide the pixel grid: Press the X key.
  • Page 154: Specifying Drawing Settings

    Specifying drawing settings You can set drawing settings to specify snapping, smoothing, and straightening behaviors when you use Flash drawing tools. You can change the tolerance setting for each option, and turn each option off or on. Tolerance settings are relative, depending on the resolution of your computer screen and the current magnification of the scene.
  • Page 155 You can specify the Selection, Subselection, and Lasso tool contact-sensitivity options when you create shapes using the Object Drawing model. By default, objects are only selected when the tool’s marquee rectangle completely surrounds the object. By deselcting this option in the Preferences dialog box, you can select entire objects when they are only partially enclosed by the selection marquee of the Selection, Subselection, or Lasso tools.
  • Page 156 Drawing...
  • Page 157: Chapter 6: Working With Text

    CHAPTER 6 Working with Text You can include text in your Macromedia Flash Basic 8 and Flash Professional 8 applications in a variety of ways. You can create text blocks containing static text, text whose contents and appearance you determine when you author the document. You can also create dynamic or input text fields.
  • Page 158 Flash also lets you create a symbol from a font so that you can export the font as part of a shared library and use it in other Flash documents. See “Creating font symbols” on page 173. You can break text apart and reshape its characters. For additional text-handling capabilities, you can manipulate text in FreeHand and import the FreeHand file into Flash, or export the file from FreeHand as a SWF file.
  • Page 159: About Flashtype

    Substituting missing fonts ..........180 Controlling text with ActionScript .
  • Page 160: About Unicode Text Encoding In Flash Applications

    About Unicode text encoding in Flash applications Macromedia Flash Player 7 and later supports Unicode text encoding for SWF files in Flash Player format. This support greatly enhances your ability to use multilingual text in SWF files that you create with Flash including multiple languages within a single text field. Any user with Flash Player 7 or later can view multilanguage text in a Flash Player 7 or later application, regardless of the language used by the operating system running the player.
  • Page 161 You can use a movie clip to mask text that is set in a device font and converted into a movie clip. For a movie clip mask on a device font to function, the user must have Macromedia Flash Player 6 (6.0.40.0) or later.
  • Page 162: Creating Text

    Anti-aliasing is supported for static, dynamic, and input text if the user has Flash Player 7 or later. It is supported only for static text if the user has an earlier version of Flash Player. See “Choosing a font, point size, style, and color” on page 167.
  • Page 163 Flash displays a handle on the corner of a text block to identify the type of text block: For static horizontal text that extends, a round handle appears at the upper right corner of the text block. For static horizontal text with a defined width, a square handle appears at the upper right corner of the text block.
  • Page 164 For dynamic or input text with a defined height and width, a square handle appears at the lower right corner of the text block. For dynamic scrollable text blocks, the round or square handle becomes solid black instead of hollow. See “Creating scrolling text”...
  • Page 165 For static text only: In the Property inspector, click the Text Direction button (in the top row, to the right of the Italic button) and select an option to specify the orientation of the text: Horizontal makes text flow horizontally, left to right (the default setting). Vertical Left-to-Right makes text flow vertically, left to right.
  • Page 166: Creating Scrolling Text

    Creating scrolling text There are several ways to create scrolling text in Flash. You can easily make dynamic text fields scrollable using menu commands or the text block handle. You can also add a ScrollBar component to a text field to make it scroll. For more information, see “UIScrollBar Component”...
  • Page 167 When creating new text, Flash uses the current text attributes. To change the font or paragraph attributes of existing text, you must first select the text. Choosing a font, point size, style, and color You can set the font, point size, style, and color for selected text using the Property inspector. When setting the text color, you can use only solid colors, not gradients.
  • Page 168 Setting letter spacing, kerning, and character position Letter spacing inserts a uniform amount of space between characters. You use letter spacing to adjust the spacing of selected characters or entire blocks of text. Kerning controls the spacing between pairs of characters. Many fonts have built-in kerning information.
  • Page 169 Setting alignment, margins, indents, and line spacing Alignment determines the position of each line of text in a paragraph relative to edges of the text block. Horizontal text is aligned relative to the left and right edges of the text block, and vertical text is aligned relative to the top and bottom edges of the text block.
  • Page 170 In the Property inspector, click Format Options and set the following options: To set alignment, click the Top, Center, Bottom, or Full Justification button. To set top or bottom margins, use the Left or Right margin control. Click the triangle next to the Left Margin value to set the top margin or the Right Margin value to set the bottom margin and drag the slider to select a value, or enter a value in the numeric field.
  • Page 171 Anti-Alias for Animation creates a smoother animation. This is possible in part because Flash ignores alignment and kerning information. Specifying Anti-Alias for Animation creates a larger SWF file, because font outlines are embedded. Fonts rendered using Anti-Alias for Animation are less legible at smaller font sizes. for this reason, it is recommended that you use 10 point or larger type when specifying Anti-Alias for Animation.
  • Page 172 To upgrade Flash 7 content to use the Advanced or Custom Anti-Alias options: Open a FLA file created for use with Flash 7 or earlier. Open the Publish Settings dialog box (File > Publish Settings), and select Flash Player 8 from the Version pop-up menu.
  • Page 173: Creating Font Symbols

    Creating font symbols To use a font as a shared library item, you can create a font symbol in the Library panel. You then assign the symbol an identifier string and a URL where the document containing the font symbol will be posted. In this way, you can link to the font and use it in a Flash application.
  • Page 174: Editing Text

    In the URL text box, enter the URL where the SWF file that contains the font symbol will be posted. Click OK. To use the font in a Flash application, copy the font symbol into the destination FLA file. For more information, see “Copying library assets between documents”...
  • Page 175 In the Dictionaries scroll list, select one or more dictionaries from the Macromedia dictionaries installed with your product. You must select at least one dictionary to enable spelling checking.
  • Page 176 Select any of the items under Checking Options to specify word-level spelling checking options. You can select options to ignore specific word or character types, to find duplicate words, to split contracted or hyphenated words, or to suggest phonetic or typographical matches.
  • Page 177: About Transforming Text

    About transforming text You can transform text blocks in the same ways that you transform other objects. You can scale, rotate, skew, and flip text blocks to create interesting effects. When you scale a text block as an object, increases or decreases in point size are not reflected in the Property inspector.
  • Page 178: Linking Text To A Url (Horizontal Text Only)

    For Link, enter the URL to which you want to link the text block. To create a link to an e-mail address, use the mailto: URL. For example, for the Macromedia Flash Wish URL, enter mailto:wish-flash@macromedia.com. Preserving rich text formatting Flash lets you preserve rich text formatting in input and dynamic text fields.
  • Page 179 If you will publish your Flash document as Flash Player 5 or earlier, you can use the text field variable to apply HTML tags to text fields. The following HTML tags are supported by the property text fields: htmlText font , and color font face...
  • Page 180: Substituting Missing Fonts

    Set the text field variable to a value that includes HTML tags. For example, the following code assigns a value to a text field with the variable name The text is rendered in bold if you select the Render Text as HTML option in the Property inspector, or if the property is set to html...
  • Page 181 You can apply the missing font to new or existing text in the current document. The text is displayed on your system using the substitute font, but the missing font information is saved with the document. If the document is reopened on a system that includes the missing font, the text is displayed in that font.
  • Page 182: Controlling Text With Actionscript

    To view all the font mappings saved on your system and delete font mappings: Close all documents in Flash. Select Edit > Font Mapping. To delete a font mapping, select the mapping and press Delete. Click OK. To turn off the Missing Fonts alert, do one of the following: To turn the alert off for the current document, in the Missing Fonts alert box select Don’t Show Again for This Document, Always Use Substitute Fonts.
  • Page 183 Setting dynamic and input text options The Property inspector lets you specify options that control how dynamic and input text appears in the Flash application. To set options for dynamic and input text: Click in an existing dynamic text field. To create a new dynamic text field, see “Creating text”...
  • Page 184 Creating and removing text fields dynamically You can use the method of the MovieClip object to create a new, empty createTextField text field as a child of the movie clip that calls the method. You can use the removeTextField method to remove a text field created with ;...
  • Page 185 To create a dynamic text field: Select a frame, button, or movie clip that is to receive the action. Select Window > Actions to open the Actions panel if it isn’t already open. In the Actions toolbox, select the Built-in Classes category, then select the Movie category, then select the MovieClip category, and then select the Methods category.
  • Page 186 To set text field properties dynamically: Select Window > Actions to open the Actions panel if it isn’t already open. Do one of the following to create a text field: Select the Text tool and create a text field on the Stage. Assign the text field an instance name in the Property inspector.
  • Page 187 First you must create a new TextFormat object. Then you can use the methods of the TextField object and pass them the TextFormat object as a parameter to format the text in a field. Each character in a text field may individually be assigned a TextFormat object. The TextFormat object of the first character of a paragraph is examined to perform paragraph formatting for the entire paragraph.
  • Page 188 In the Object field, enter the name of the TextFormat object you created in step 3, myformat. The following code appears in the Script pane: mytext.setTextFormat(myformat); For more information, see “Using the TextFormat class” in Learning ActionScript 2.0 in Flash. Using text field events to trigger scripts You can use ActionScript to capture events that happen to text fields—for example, you can determine whether a user has changed or scrolled the text.
  • Page 189: Creating Scrolling Text

    Creating scrolling text You can use the properties of the TextField object to control vertical scroll maxscroll scrolling and the properties to control horizontal scrolling in a text hscroll maxhscroll block. The properties contain a number that specifies the topmost scroll hscroll visible line in a text block;...
  • Page 190 Working with Text...
  • Page 191: Chapter 7: Using Imported Artwork

    CHAPTER 7 Using Imported Artwork Macromedia Flash Basic 8 and Flash Professional 8 can use artwork created in other applications. You can import vector graphics and bitmaps in a variety of file formats. If you have QuickTime 4 or later installed on your system, you can import additional vector or bitmap file formats.
  • Page 192 You can load JPEG files into a Flash movie during runtime using the action or loadMovie method. For detailed information, see loadMovie (MovieClip.loadMovie method) in ActionScript 2.0 Language Reference. Flash imports vector graphics, bitmaps, and sequences of images as follows: When you import vector images into Flash from FreeHand, you can select options for preserving FreeHand layers, pages, and text blocks.
  • Page 193 To import a file into Flash: Do one of the following: To import a file directly into the current Flash document, select File > Import to Stage. To import a file into the library for the current Flash document, select File > Import to Library.
  • Page 194 Importing file formats for vector or bitmap files Flash can import different vector or bitmap file formats depending on whether QuickTime 4 or later is installed on your system. Using Flash with QuickTime 4 installed is especially useful for collaborative projects in which authors work on both Windows and Macintosh platforms. QuickTime 4 extends support for certain file formats (including Adobe Photoshop, PICT, QuickTime Movie, and others) to both platforms.
  • Page 195 File type Extension Windows Macintosh QuickTime Image .qtif Silicon Graphics Image .sgi .tga TIFF .tif Importing Fireworks PNG files You can import 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 196 When you import multiple PNG files in a batch, you select import settings one time. Flash uses the same settings for all files in the batch. You can edit bitmap images in Flash by converting the bitmap images to vector artwork or by breaking apart the bitmap images.
  • Page 197 Importing FreeHand MX files You can import FreeHand files in version 7 or later directly into Flash. FreeHand MX is the best choice for creating vector graphics for import into Flash, because you can preserve FreeHand layers, text blocks, library symbols, and pages, and choose a page range to import. If the imported FreeHand file is in CMYK color mode, Flash converts the file to RGB.
  • Page 198 In the FreeHand Import Settings dialog box, for Mapping Pages, select a setting: Scenes converts each page in the FreeHand document to a scene in the Flash document. Keyframes converts each page in the FreeHand document to a keyframe in the Flash document.
  • Page 199 You can choose from the following options when importing Adobe Illustrator, EPS, or PDF files: Convert pages to scenes or keyframes. Convert layers to Flash layers or keyframes or flatten all layers. Select which pages to import. Include invisible layers. Maintain text blocks.
  • Page 200: Working With Imported Bitmaps

    For Options, select any of the following: Include Invisible Layers imports all layers (visible and hidden) from the imported document. Maintain Text Blocks imports text as editable text in Flash. Rasterize Everything converts all content in the imported document to bitmaps. Enter a value to set the resolution for the imported document.
  • Page 201 You can edit an imported bitmap in Fireworks or another external image editor by starting the editing application from within Flash. See “Editing bitmaps in an external editor” on page 204. To convert a bitmap’s image to a vector graphic, you can trace the bitmap. Performing this conversion enables you to modify the graphic as you do other vector artwork in Flash.
  • Page 202 Setting bitmap properties You can apply anti-aliasing to an imported bitmap to smooth the edges in the image. You can also select a compression option to reduce the bitmap file size and format the file for display on the web. To select bitmap properties, you use the Bitmap Properties dialog box.
  • Page 203 Importing bitmaps at runtime You can use the ActionScript 2.0 command to add bitmaps to a document at BitmapData runtime. To do so, you must specify a linkage identifier for the bitmap. For more information, see “Assigning linkage to assets in the library” on page 604 in Learning ActionScript 2.0 in Flash.
  • Page 204 Editing bitmaps in an external editor If you are editing a Fireworks PNG file imported as a flattened image, you can choose to edit the PNG source file for the bitmap, when available. You cannot edit bitmaps from Fireworks PNG files imported as editable objects in an external image editor.
  • Page 205 Breaking apart a bitmap Breaking apart a bitmap separates the pixels in the image into discrete areas that can be selected and modified separately. When you break apart a bitmap, you can modify the bitmap with the Flash drawing and painting tools. Using the Lasso tool with the Magic Wand modifier, you can select areas of a bitmap that has been broken apart.
  • Page 206 Converting bitmaps to vector graphics The Trace Bitmap command converts a bitmap into a vector graphic with editable, discrete areas of color. This command lets you manipulate the image as a vector graphic; it is also useful if you want to reduce file size. When you convert a bitmap to a vector graphic, the vector graphic is no longer linked to the bitmap symbol in the Library panel.
  • Page 207: Chapter 8: Working With Graphic Objects

    Working with Graphic Objects In Macromedia Flash Basic 8 and Macromedia Flash Professional 8, graphic objects are items on the Stage. Flash lets you move, copy, delete, transform, stack, align, and group graphic objects. You can also link a graphic object to a URL.
  • Page 208: Selecting Objects

    Selecting objects To modify an object, you must first select it. Flash provides a variety of methods for making selections, including the Selection tool, the Lasso tool, and keyboard commands. You can group individual objects to manipulate them as a single object (see “Grouping objects”...
  • Page 209 To select a filled shape and its stroked outline: Select the Selection tool and double-click the fill. To select objects within a rectangular area: Select the Selection tool and drag a marquee around the object or objects that you want to select.
  • Page 210 Selecting objects with the Lasso tool To select objects by drawing either a freehand or a straight-edged selection area, you can use the Lasso tool and its Polygon Mode modifier. When you use the Lasso tool, you can switch between the freehand and straight-edged selection modes. To select objects by drawing a freehand selection area: Select the Lasso tool and drag it around the area.
  • Page 211: Grouping Objects

    To hide selection highlighting: Select View > Hide Edges. Select the command again to show selection highlighting. Grouping objects To manipulate elements as a single object, you need to group them. For example, after creating a drawing such as a tree or flower, you might group the elements of the drawing so that you can easily select and move the drawing as a whole.
  • Page 212: Moving, Copying, And Deleting Objects

    Moving, copying, and deleting objects You can move an object by dragging it on the Stage, cutting and pasting it, using the arrow keys, or using the Property inspector to specify an exact location for it. You can also move an object between Flash and other applications using the Clipboard.
  • Page 213 Enter x and y values for the location of the upper-left corner of the selection. The units are relative to the upper-left corner of the Stage. The Property inspector uses the units specified for the Ruler Units option in the Document Properties dialog box.
  • Page 214 Bitmaps become a single grouped object just like imported bitmaps. You can break apart pasted bitmaps or convert pasted bitmaps to vector graphics. For information on converting bitmaps to vector graphics, see “Converting bitmaps to vector graphics” on page 206. Before pasting graphics from FreeHand into Flash, set your FreeHand export preferences to convert colors to CMYK and RGB for Clipboard formats.
  • Page 215: Stacking Objects

    Stacking objects Within a layer, Flash stacks objects based on the order in which they were created, placing the most recently created object at the top of the stack. The stacking order of objects determines how they appear when they are overlapping. You can change the stacking order of objects at any time.
  • Page 216 Working with the center point during transformations During a transformation, a transformation point appears at the center of a selected element. The transformation point is initially aligned with the object’s center point. You can move the transformation point, and you can return it to its default location. For scaling, skewing, or rotating graphic objects, groups, and text blocks, the point opposite the point you drag is the point of origin by default.
  • Page 217 By default, the upper-left square in the coordinate grid in the Info panel is selected, and the X and Y values display the location of the upper-left corner of the current selection, relative to the upper-left corner of the Stage. For symbol instances, the coordinate grid and the X and Y values display the location of the symbol registration point, or the location of the upper-left corner of the symbol instance.
  • Page 218 Shift-Control-click to drag (Windows) or Shift-Command-click to drag (Macintosh) a corner handle to taper the object—to move the selected corner and the adjoining corner equal distances from their origins. For more information on distorting objects, see “Distorting objects” on page 218.
  • Page 219 To modify a shape with the Envelope modifier: Select a shape on the Stage. The Envelope modifier cannot modify symbols, bitmaps, video objects, sounds, gradients, object groups, or text. If a multiple selection contains any of these, only the shape objects are distorted. To modify text, first convert the characters to shape objects.
  • Page 220 You can rotate an object by using the Rotate commands, by dragging with the Free Transform tool, or by specifying an angle in the Transform panel. When you rotate an object by dragging, you can also skew and scale the object in the same operation. When you rotate an object using the Transform panel, you can scale the object in the same operation.
  • Page 221: Flipping Objects

    Flipping objects You can flip objects across their vertical or horizontal axis without moving their relative position on the Stage. To flip an object: Select the object. Select Modify > Transform > Flip Vertical or Flip Horizontal. Restoring transformed objects When you use the Transform panel to scale, rotate, and skew instances, groups, and fonts, Flash saves the original size and rotation values with the object.
  • Page 222: Breaking Apart Groups And Objects

    To align objects: Select the objects to align. Select Window > Align. In the Align panel, select To Stage to apply alignment modifications relative to Stage dimensions. Select alignment buttons to modify the selected objects: For Align, select Align Left, Align Horizontal Center, Align Right, Align Top, Align Vertical Center, or Align Bottom.
  • Page 223 To break apart groups or objects: Select the group, bitmap, or symbol that you want to break apart. Select Modify > Break Apart. Breaking apart animated symbols, or groups within an interpolated animation, is not recommended and might have unpredictable results. Breaking apart complex symbols and large blocks of text can take a long time.
  • Page 224 Working with Graphic Objects...
  • Page 225: This Chapter Contains The Following Sections: About Filters (Flash Professional Only)

    Using Filters and Blends (Flash Professional only) Macromedia Flash Professional 8 filters are graphic effects that you can apply to text, buttons, and movie clips. The available filters are Bevel, Drop Shadow, Glow, Blur, Gradient Glow, Gradient Blur, and Adjust Color. You can apply filters to selected objects directly from the Property inspector.
  • Page 226: About Importing Filters And Blends From Fireworks Png Files

    In Flash, blend modes let you create composite images. Compositing is the process of varying the transparency or color interaction of two or more overlapping objects. Blending modes also add a dimension of control to the opacity of objects and images. You can use Flash blending modes to create highlights or shadows that let details from an underlying image show through, or to colorize a desaturated image.
  • Page 227: About Animating Filters (Flash Professional Only)

    Fireworks blend modes supported in Flash Flash imports the following Fireworks blend modes as modifiable blends: 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...
  • Page 228: About Filters And Flash Player Performance (Flash Professional Only)

    SWF files as you play them. The more filters you apply to an object, the greater the number of calculations Macromedia Flash Player must process to correctly display the visual effects you’ve created. For this reason, Macromedia recommends that you apply only a limited number of filters to a given object.
  • Page 229: Applying Filters (Flash Professional Only)

    Applying filters (Flash Professional only) You can apply one or more filters to selected objects using the Property inspector. Each time you add a new filter to an object, it is added to the list of applied filters for that object in the Property inspector.
  • Page 230 To remove a filter: Select the movie clip, button, or text object that you want to remove a filter from. Select the Filter tab in the Property inspector. Select the filter you want to remove in the list of applied filters. Click the Remove Filter (-) button to remove the filter.
  • Page 231 Configuration folder. You can find this file is the following location: Windows: C:\Documents and Settings\username\Local Settings\Application Data\Macromedia\Flash 8\language\Configuration\Filters\filtername.xml Macintosh: Macintosh HD/Users/username/Library/Application Support/Macromedia/ Flash 8/language/Configuration/Filters/filtername.xml To create a library of filters with preset settings: Apply the filter or filters you want to use to the object.
  • Page 232 Applying a drop shadow The Drop Shadow filter simulates the look of an object casting a shadow onto a surface, or cutting out a hole in the background in the shape of the object. Text with the Drop Shadow filter applied. To apply a drop shadow to an object: Select the movie clip or text object that you want to apply a drop shadow to.
  • Page 233 Creating a skewed drop shadow Use the Drop Shadow filter’s Hide object option to create a more realistic look by skewing the shadow of an object. To achieve this effect, you need to create a duplicate movie clip, button, or text object, apply a drop shadow to the duplicate, and use the Free Transform tool to skew the duplicate object’s shadow.
  • Page 234 Edit the filter settings on the Filter tab of the Property inspector: Drag the Blur X and Y slider to set the width and height of the blur. Select the quality level for the blur. Setting the quality level to High is approximate to that of a Gaussian blur.
  • Page 235 Select the quality level for the glow. Setting the quality level to High is approximate to that of a Gaussian blur. Setting the quality level to Low is recommended to maximize playback performance. Applying a bevel Applying a bevel applies a highlight to the object that makes it appear to be curved up above the background surface.
  • Page 236 Applying a gradient glow Applying a gradient glow produces a glow look with a gradient color across the surface of the glow. The gradient glow requires you to choose one color at the beginning of the gradient with an Alpha value of 0. You cannot move the position of this color, but you can change the color.
  • Page 237 Select the quality level for the gradient glow. Setting the quality level to High is approximate to that of a Gaussian blur. Setting the quality level to Low is recommended to maximize playback performance. Applying a gradient bevel Applying a gradient bevel produces a raised look that makes an object appear to be raised above the background, with a gradient color across the surface of the bevel.
  • Page 238 To add a pointer to the gradient, click on or below the gradient definition bar. You can add up to 15 color pointers, letting you create a gradient with up to 15 color transitions. To reposition a pointer on the gradient, drag the pointer along the gradient definition bar.
  • Page 239: About Blend Modes (Flash Professional Only)

    Since blend modes depend on both the color of the object you’re applying the blend to and the underlying color, you must experiment with different colors to see what the result will be. Macromedia recommends that you experiment with the different blend modes to achieve the effect you want.
  • Page 240 Invert inverts the base color. Alpha applies an alpha mask. Alpha blend mode requires that a Layer blend mode be applied to the parent movie clip. You cannot change the background clip to Alpha and apply it because the object would appear invisible.
  • Page 241: Applying A Blend Mode (Flash Professional Only)

    Overlay Hard Light Subtract Difference Invert Applying a blend mode (Flash Professional only) You use the Property inspector for movie clips to apply blends to selected movie clips. Multiple graphic symbols are merged as a single shape when you publish the SWF. For this reason, you cannot apply different blend modes to different graphic symbols.
  • Page 242 Position the movie clip with the blend mode over the graphic symbol whose appearance you want to modify. Verify that the blend mode you selected is appropriate to the effect you’re trying to achieve. You might need to experiment with both the color and transparency settings of the movie clip and the different blend modes to achieve the effect you want.
  • Page 243: Chapter 10: Creating Motion

    CHAPTER 10 Creating Motion Macromedia Flash Basic 8 and Flash Professional 8 offer several ways to include animation and special effects in your document. Timeline effects, such as blur, expand, and explode, make it easy to animate an object: you can simply select the object, then select an effect and specify parameters.
  • Page 244: This Chapter Contains The Following Sections: Using Timeline Effects

    Tweening shapes ............261 Using shape hints .
  • Page 245 To add an effect to an object: Do one of the following to add a Timeline effect: Select the object to which you’re adding the Timeline effect. Select Insert > Timeline Effects. Then select Assistants, Effects, or Transition/Transform from the submenu, and select an effect from the list.
  • Page 246 Motion effect name and description Settings Distributed duplication Duplicates a selected object the number of • Number of copies times entered in the settings. The first • Offset distance, x position, in pixels element is a copy of the original object. The •...
  • Page 247 Motion effect name and description Settings Explode Gives the illusion of an object exploding. • Effect duration, in frames Elements of text or a complex group of • Direction of explosion, upward to left, center, or right, downward to left, center, or right objects (symbols, shapes or video clips) •...
  • Page 248: About Tweened Animation

    Editing a Timeline effect You edit Timeline effects using the Effect Settings dialog box. To edit a Timeline effect: Select the object associated with the effect on the Stage. To open the Effect Settings dialog box, do one of the following: In the Property inspector, click Edit.
  • Page 249: About Frame-By-Frame Animation

    Tweened animation is an effective way to create movement and changes over time while minimizing file size. In tweened animation, Flash stores only the values for the changes between frames. To quickly prepare elements in a document for tweened animation, distribute objects to layers.
  • Page 250: About Creating Keyframes

    About creating keyframes A keyframe is a frame where you define changes in the animation. 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 let Flash create the contents of frames in between. Flash displays the interpolated frames of a tweened animation as light blue or light green with an arrow drawn between keyframes.
  • Page 251: About Frame Rates

    A single keyframe is indicated by a black dot. Light gray frames after a single keyframe contain the same content with no changes and have a black line with a hollow rectangle at the last frame of the span. A small a indicates that the frame has been assigned a frame action with the Actions panel. A red flag indicates that the frame contains a label or comment.
  • Page 252: Distributing Objects To Layers For Tweened Animation

    To use a shortcut to extend still images: Create an image in the first keyframe. Alt-drag (Windows) or Option-drag (Macintosh) the keyframe to the right. This creates a span of new frames, but without a new keyframe at the end point. Distributing objects to layers for tweened animation You can quickly distribute selected objects in a frame to separate layers to apply tweened...
  • Page 253: Tweening Instances, Groups, And Type

    Distributing objects to layers To distribute objects to layers, you select the objects in one or more layers and select Distribute to Layers from the Modify menu or from the context menu. To tween distributed objects, follow the procedure in “Tweening instances, groups, and type”...
  • Page 254 To create a motion tween using the Motion Tweening option: Click a layer name to make it the active layer, and select an empty keyframe in the layer where you want the animation to start. To create the first frame of the motion tween, do one of the following: Create a graphic object with the Pen, Oval, Rectangle, Pencil, or Brush tool, then convert it to a symbol.
  • Page 255 To begin the motion tween rapidly and decelerate the tween toward the end of the animation, drag the slider down or enter a positive value between 1 and 100. By default, the rate of change between tweened frames is constant. Easing creates a more natural appearance of acceleration or deceleration by gradually adjusting the rate of change.
  • Page 256 Click inside the frame where you want the animation to end, and select Insert > Timeline > Frame. Move the object, instance, or text block on the Stage to the desired position. Adjust the size of the element if you want to tween its scale. Adjust the rotation of the element if you want to tween its rotation.
  • Page 257: Tweening Motion Along A Path

    Tweening motion along a path Motion guide layers let you draw paths along which tweened instances, groups, or text blocks can be animated. You can link multiple layers to a motion guide layer to have multiple objects follow the same path. A normal layer that is linked to a motion guide layer becomes a guided layer.
  • Page 258: Applying Custom Ease In/Ease Out To Motion Tweens (Flash Professional Only)

    To 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. Create a new layer under the motion guide layer.
  • Page 259 The dialog box provides the following additional controls: Use One Setting for All Properties check box The default value for this is selected, which means that the displayed curve is used for all properties, and the Properties pop-up menu is disabled.
  • Page 260 Using frame indicators (represented by square handles), you click where you want an object to slow down or speed up. Clicking the handle of a control point (the square handles) selects that control point, and displays the tangent points on either side of it. Tangent points are represented by hollow circles.
  • Page 261: Tweening Shapes

    In the Custom Ease In/Ease Out dialog box, Control-click (Windows) or Command-click (Macintosh) on the diagonal line to add a control point. Drag the control point up to increase the speed of the object, or drag it downwards to slow down the speed of the object.
  • Page 262 To tween a shape: Click a layer name to make it the active layer, and create or select a keyframe where you want the animation to start. Create or place the artwork for the first frame of the sequence. For best results, the frame should contain only one item (a graphic object or broken-apart group, bitmap, instance, or text block).
  • Page 263: Using Shape Hints

    Using shape hints To control more complex or improbable shape changes, you can use shape hints. Shape hints identify points that should correspond in starting and ending shapes. For example, if you are tweening a drawing of a face as it changes expression, you can use a shape hint to mark each eye.
  • Page 264: Creating Frame-By-Frame Animations

    To see all shape hints: Select View > Show Shape Hints. The layer and keyframe that contain shape hints must be active for Show Shape Hints to be available. To remove a shape hint: Drag it off the Stage. To remove all shape hints: Select Modify >...
  • Page 265: Editing Animation

    Editing animation After you create a frame or a keyframe, you can move it elsewhere in the active layer or to another layer, remove it, and make other changes. Only keyframes are editable. You can view tweened frames, but you can’t edit them directly. To edit tweened frames, you change one of the defining keyframes or insert a new keyframe between the beginning and ending keyframes.
  • Page 266 To convert a keyframe to a frame, select the keyframe and select Modify > Timeline > Clear Keyframe, or right-click (Windows) or Control-click (Macintosh) the keyframe and select Clear Keyframe from the context menu. The cleared keyframe and all frames up to the subsequent keyframe are replaced with the contents of the frame preceding the cleared keyframe.
  • Page 267 To enable editing of all frames between onion skin markers, click the Edit Multiple Frames button. Usually onion skinning lets you edit only the current frame. However, you can display the contents of each frame between the onion skin markers normally, and make each available for editing, regardless of which is the current frame.
  • Page 268: Using Mask Layers

    Using mask layers For spotlight effects and transitions, you can use a mask layer to create a hole through which underlying layers are visible. A mask item can be a filled shape, a type object, an instance of a graphic symbol, or a movie clip. You can group multiple layers together under a single mask layer to create sophisticated effects.
  • Page 269 To mask additional layers after creating a mask layer, do one of the following: Drag an existing layer directly below the mask layer. Create a new layer anywhere below the mask layer. Select Modify > Timeline > Layer Properties and select Masked in the Layer Properties dialog box.
  • Page 270 Creating Motion...
  • Page 271: Chapter 11: Working With Video

    CHAPTER 11 Working with Video Macromedia Flash Basic 8 and Flash Professional 8 are powerful tools for incorporating video footage into web-based presentations. Flash Video offers technological and creative benefits that let you create immersive, rich experiences that fuse video together with data, graphics, sound, and interactive control.
  • Page 272: About Video Features In Flash

    About video features in Flash Macromedia Flash Basic 8 and Macromedia Flash Professional 8 provide several ways for you to include video in your Flash documents. How you choose to deploy your video will determine how you create your video content, and how you integrate it for use with Flash.
  • Page 273 290. Importing FLV files in the Library You can import video clips in Macromedia Flash Video (FLV) format directly into Flash. When you import FLV files, you use the encoding options already applied to the files. You do not need to select encoding options during import. For more information, see “Importing Flash Video files into the Library”...
  • Page 274: About Using Video In Flash

    About using video in Flash Macromedia Flash lets you incorporate video into your Flash movie in several different ways, depending on the type of video content you are delivering and your intended application. The following sections discuss different methods of incorporating video content into Flash: “About progressively downloading video”...
  • Page 275 By programmatically controlling video and audio streams (using server-side scripting), you can create server-side play lists, synchronized streams, and more intelligent delivery options based on the client’s connection speed. To learn more about Flash Communication Server, see: www.macromedia.com/software/ flashcom/. To learn more about FVSS, see: www.macromedia.com/software/flashcom/fvss/...
  • Page 276 About embedding video in a SWF file Embedded video lets you embed a video file within a SWF file. When you import video in this way, the video is placed in the Timeline where you can see the individual video frames represented in the Timeline frames.
  • Page 277: Video And The Property Inspector

    For more information, see “Changing the properties of a video clip” on page 301. For lessons on working with video, see the Macromedia Flash Support Center at www.macromedia.com/devnet/mx/flash/video.html. Video and the Property inspector...
  • Page 278: About Digital Video And Flash

    About digital video and Flash Flash provides support for several different video codecs, and provides tools for encoding video into the Flash Video (FLV) format. In general, the preset video encoding profiles included in the Flash Video Import wizard and the Flash 8 Video Encoder (Flash Professional only) provide you with the optimum playback quality based on the bandwidth of the audience you’re targeting.
  • Page 279 The following video file formats are supported for importing embedded video if DirectX 9 or later is installed (Windows only): File type Extension Audio Video Interleaved .avi Motion Picture Experts Group .mpg, .mpeg Windows Media file .wmv, .asf By default, Flash imports and exports video using the On2 VP 6 codec. A codec is a compression/decompression algorithm that controls how multimedia files are compressed during encoding, and decompressed during playback.
  • Page 280 Another alternative is to use a computer with the Windows operating system. Windows imports MPEG video using DirectShow, which supports extracting both the video and audio tracks of an MPEG file. This lets you convert MPEG video to the FLV format without removing the audio portion of the video clip.
  • Page 281 Comparing the On2 VP6 and Sorenson Spark video codecs The On2 VP6 codec is the default video codec to use when encoding FLV content for use with Flash Player 8. The On2 VP6 codec provides: Higher quality video when compared to the Sorenson Spark codec encoded at the same data rate Support for the use of an alpha channel to composite video In order to support better quality video at the same data rate, the On2 VP6 codec requires...
  • Page 282 FLV QuickTime Export plug-in If you have Macromedia Flash Professional 8 and QuickTime 6.1.1 installed on your computer, you can use the FLV QuickTime Export plug- in to export FLV files from supported video-editing applications. You can then import these FLV files directly into Flash to use in your Flash documents.
  • Page 283 Because video looks much better at native frame rates, Macromedia recommends leaving the frame rate high if your delivery channels and playback platforms allow it. However, if you need to reduce the frame rate, the best results come from dividing the frame rate by whole numbers.
  • Page 284: Importing Video Using The Video Import Wizard

    Remove noise and interlace After you capture your video content, you might need to remove noise and interlacing. Follow the same guidelines for audio The same considerations exist for audio production as for video production. To achieve good audio compression, you must begin with clean audio.
  • Page 285 Importing video for progressive download (Flash Professional only) You can import a video file that is already deployed to a web server, or you can select a video file that is stored locally on your computer, and upload the video file to the server after importing it into your FLA file.
  • Page 286 Upload the following assets to the web server hosting your video: The FLV encoded video clip (which is located in the same folder as the source video clip you selected with a .flv extension). If the video clip is in FLV format, Flash uses a relative path to point to the FLV file (relative to the SWF), letting you use the same directory structure locally that you use on the server.
  • Page 287 (Optional) If the video you are deploying is not in FLV format, you can use the Encoding panel to select an encoding profile, and crop, trim and split the video clip. This step applies only if you are uploading the video from your local computer. Video clips that are already deployed to a server must have previously been encoded in the FLV format.
  • Page 288 Embedding video in a SWF file When you import a video clip as an embedded file, you select options in the Video Import wizard for embedding, encoding, and editing the video. Click the Next button to advance through panes in the wizard, and click the Back button to return to previous panes. You can import video clips as embedded files in several file formats, depending on your system.
  • Page 289 Embed as a graphic symbol Embedding a video clip as a graphic symbol means that you cannot interact with the video using ActionScript (typically you use graphic symbols for static images and to create reusable pieces of animation that are tied to the main Timeline).
  • Page 290 To update an embedded video clip after editing it in an external editor: Select the video clip in the Library panel. In the options menu in the upper right corner of the Library panel, select Properties. Click Update in the Embedded Video Properties dialog box. The embedded video clip is updated with the edited file.
  • Page 291 If you imported the video clip directly to the Stage in step 1, a warning appears if the imported clip contains more frames than the span in which you are placing it in the current Flash document. Do one of the following: Click Yes to extend the span the required number of frames.
  • Page 292 To edit a video clip: Import the video clip. Select Edit the Video First, and click Next to open the Editing pane of the Video Import wizard. To browse frames in the video, do one of the following: Drag the playhead along the scrubber bar. Click the Play button to move forward, and click the Pause button to stop at the desired frame.
  • Page 293: Encoding Video

    Encoding video Flash video encoding settings and crop-and-trim controls are available whether you encode video using the Flash Video Encoder within with the Video Import wizard, the standalone Flash 8 Video Encoder application, or the FLV QuickTime Export plug-in. If you are using Flash Professional 8, the various Flash video encoding solutions also allow you to embed cue points within your FLV file.
  • Page 294 Flash Player 8, choose the On2 VP6 codec. Select a frame rate. By default, Flash Video Encoder uses the same frame rate as the source video. Macromedia recommends using the default frame rate unless you are very experienced with video encoding, and have a specific application that requires modifying the source video’s frame...
  • Page 295 Select the keyframe placement for the video. Keyframes are video frames that contain complete data. For example, if you specify a keyframe interval of 30, Flash Video Encoder encodes a complete frame every 30 frames in the video clip. For frames between keyframe intervals, Flash stores only the data that changes from the preceding frame.
  • Page 296 Specifying advanced audio encoding settings The audio encoding settings portion of the dialog box is automatically selected when an audio-only file is added to the encoding list (this portion of the dialog box is disabled when encoding video content without a combined audio track). You can select an encoding profile from the Flash Video encoding profile pop-up menu, which will set a corresponding profile for the audio-only encoding format.
  • Page 297 To define and embed cue points, you must either use Flash Video Encoder or import a video clip using the Video Import wizard. For information on importing video using the Video Import wizard, see “Importing video using the Video Import wizard” on page 284.
  • Page 298 Navigation cue points are used for navigation and seeking, and to trigger ActionScript methods when the cue point is reached. Embedding a navigation cue point inserts a keyframe at that point in the video clip. Enter parameters for the selected cue point. Parameters are a set of key-value pairs that you can add to the cue point.
  • Page 299: Importing Flash Video Files Into The Library

    When you finish cropping and trimming the video, select either the Cue Point or the Encoding tab to further modify the video’s encoding settings, or click OK to return to the main Flash 8 Video Encoding dialog box. At this point, you may be ready to encode your video clips or you may want to add additional source video clips to encode.
  • Page 300: About Playing Back External Flv Files Dynamically

    FLV file. For information on exporting video as an FLV file, see “Macromedia Flash Video (FLV)” on page 506. If you have Macromedia Flash Professional 8, you can use the FLV Export plug-in to export FLV files from supported video-editing applications. For more information, see “About encoding video”...
  • Page 301: Changing The Properties Of A Video Clip

    FLV video to replace the selected clip. You can also export a video clip as an FLV file using the Embedded Video Properties dialog box. For more information, see “Macromedia Flash Video (FLV)” on page 506. To change video instance properties in the Property inspector: Select an instance of an embedded or linked video clip on the Stage.
  • Page 302: Controlling Video Playback Using Behaviors

    To update a video clip: Select the video clip in the Library panel. Select Properties from the Library options menu. In the Embedded Video Properties dialog box, click Update. Navigate to the updated video file and click Open. The file is reimported into the Flash document. To replace a video clip with an FLV clip: Select the video clip in the Library panel.
  • Page 303 The following behaviors come with Flash Basic 8 and Flash Professional 8, and are used to control embedded video: Behavior Purpose Parameters Play Video Plays a video in the current Instance name of target video document. Stop Video Stops the video. Instance name of target video Pause Video Pauses the video.
  • Page 304: Using The Flvplayback Component (Flash Professional Only)

    Using the FLVPlayback component (Flash Professional only) With Flash Professional 8 media components, you can quickly and easily add Flash video and playback controls to your documents. Then, using cue points, you can synchronize your video with animation, text, and graphics. For example, you can create a Flash presentation that has video playing in one area of the screen while text and graphics appear in another area.
  • Page 305 To configure the FLVPlayback component: With the component selected, open the Property inspector (Windows > Properties) and enter an instance name. Select the Parameters tab in the Property inspector or open the Component inspector (Windows > Components). Enter values for parameters or use default settings. For each FLVPlayback component instance you can set the following parameters in the Property inspector or in the Component inspector: In most instances, it is not necessary to alter the settings in the FLVPlayback...
  • Page 306 maintainAspectRatio A Boolean value that, if , resizes the video player within the true FLVPlayback component to retain the source FLV aspect ratio; the source FLV will still be scaled and the FLVPlayback component itself will not be resized. The autoSize parameter takes precedence over this parameter.
  • Page 307 To specify the name and location of the FLV: With the component selected, open the Property inspector (Window > Properties) and select the Parameters tab in the Property inspector, or open the Component inspector (Window > Component Inspector). Enter values for parameters, or use the default settings as appropriate. For the contentPath parameter, do the following: Double-click the Value cell for the...
  • Page 308: About Controlling Video Playback Using The Timeline

    About controlling video playback using the Timeline You can control playback of an embedded or linked video file by controlling the Timeline that contains the video. For example, to pause a video playing on the main Timeline, you would call a action that targets that Timeline.
  • Page 309 The MediaController component provides user interface controls that let the user interact with streaming media. The Controller features Play, Pause, and Rewind to Start buttons and a volume control. It also includes playbars that show how much of the media has loaded and how much has played.
  • Page 310 Working with Video...
  • Page 311: Chapter 12: Working With Sound

    CHAPTER 12 Working with Sound Macromedia Flash Basic 8 and Flash Professional 8 offer several ways to use sound. You can make sounds that play continuously, independent of the Timeline, or you can synchronize animation to a sound track. You can add sounds to buttons to make them more interactive and make sounds fade in and out for a more polished sound track.
  • Page 312: Importing Sounds

    This chapter contains the following sections: Importing sounds ............312 Adding sounds to a document.
  • Page 313: Adding Sounds To A Document

    If you want to share sounds among Flash documents, you can include the sounds in shared libraries. For more information, see “Working with common libraries” on page 36. To use a sound in a shared library, you assign the sound file an identifier string in the Linkage Properties dialog box.
  • Page 314 To add a sound to a document: Import the sound into the library if it has not already been imported. For more information, see “Importing sounds” on page 312. Select Insert > Timeline > Layer to create a layer for the sound. With the new sound layer selected, drag the sound from the Library panel onto the Stage.
  • Page 315: Adding Sounds To Buttons

    Start is the same as Event, except that if the sound is already playing, no new instance of the sound plays. Stop silences the specified sound. Stream synchronizes the sound for playing on a website. Flash forces animation to keep pace with stream sounds.
  • Page 316: Using Sounds With Sound Objects

    Enter an identifier string in the text box, and click OK. About accessing ID3 properties in MP3 files with Flash Player Macromedia Flash Player 7 and later supports ID3 v2.4 and v2.4 tags. With this version, when you load an MP3 sound using the method, the ID3...
  • Page 317: Using The Sound-Editing Controls

    Flash Player 6 (6.0.40.0) and later supports MP3 files with ID3 v1.0 and v1.1 tags. With ID3 v1.0 and v1.1 tags, the properties are available at the end of the data stream. If a sound does not contain an ID3v1 tag, the ID3 properties are undefined. Users must have Flash Player 6 (6.0.40.0) or later for the ID3 properties to function.
  • Page 318: Controlling Sound Playback Using Behaviors

    Controlling sound playback using behaviors You can control sound playback using sound behaviors. Behaviors are prewritten ActionScript scripts that you apply to an object, such as a button, to control a target object, such as a sound. Behaviors enable you to add the power, control, and flexibility of ActionScript coding to your document without having to create the ActionScript code yourself.
  • Page 319 In the Play Sound dialog box, enter the instance name of the sound you want to play, and click OK. In the Behaviors panel under Event, click On Release (the default event) and select a mouse event from the menu. If you want to use the event, leave the option unchanged.
  • Page 320: Starting And Stopping Sounds At Keyframes

    Starting and stopping sounds at keyframes The most common sound-related task in Flash is starting and stopping sounds at keyframes to synchronize with animation. To stop and start a sound at a keyframe: Add a sound to a document. For more information, see “Adding sounds to a document”...
  • Page 321: Compressing Sounds For Export

    event lets you manipulate sounds in a variety of powerful ways, such onSoundComplete as the following: Creating a dynamic playlist or sequencer Creating a multimedia presentation that checks for narration completion before advancing to the next frame or scene Building a game that synchronizes sounds to particular events or scenes and transitions smoothly between different sounds Timing an image change to a sound—for example, changing an image when a sound is halfway through at playback time...
  • Page 322 To set export properties for an individual sound: Do one of the following: Double-click the sound’s icon in the Library panel. Right-click (Windows) or Control-click (Macintosh) a sound file in the Library panel and select Properties from the context menu. Select a sound in the Library panel and select Properties from the options menu in the upper right corner of the panel.
  • Page 323 For Sample Rate, select an option to control sound fidelity and file size. Lower rates decrease file size but can also degrade sound quality. Rate options are described in the following list: 5 kHz is barely acceptable for speech. 11 kHz is the lowest recommended quality for a short segment of music and is one-quarter of the standard CD rate.
  • Page 324 For Quality, select one of the following options to determine the compression speed and sound quality: Fast yields faster compression but lower sound quality. Medium yields somewhat slower compression but higher sound quality. Best yields the slowest compression and the highest sound quality. Using the Raw compression option The Raw compression option exports sounds with no sound compression.
  • Page 325 To use speech compression: In the Sound Properties dialog box, select Speech from the Compression menu. For Sample Rate, select an option to control sound fidelity and file size. A lower rate decreases file size but can also degrade sound quality. Select from the following options: 5 kHz is acceptable for speech.
  • Page 326: About Using Sounds In Flash Lite

    About using sounds in Flash Lite Flash Lite supports two types of sound: standard Flash sounds, like those used in Flash desktop applications, and device sounds. Flash Lite 1.0 supports device sounds only; Flash Lite 1.1 supports both standard sounds and device sounds. Device sounds are stored in the published SWF file in their native audio format (such as MIDI or MFi);...
  • Page 327: Chapter 13: Writing Actionscript With Script Assist

    Writing ActionScript with Script Assist ActionScript, the scripting language of Macromedia Flash, lets you add interactivity to a movie. ActionScript provides elements, such as actions, operators, and objects, that you put together in scripts that tell your movie what to do; you set up your movie so that events, such as button clicks and key presses, trigger these scripts.
  • Page 328: Using Script Assist To Write Actionscript

    In Script Assist mode, you can add, delete, or change the order of statements in the Script pane; you can also enter parameters for actions in text boxes above the Script pane. Script Assist also lets you find and replace text, view script line numbers, and pin a script—that is, keep a script in the Script pane when you click away from the object or frame.
  • Page 329 The Up and Down Arrow buttons let you move the current selection in the scrolling text area forward or backward within the code. The Check Syntax, Auto Format, Show Code Hint, and Debug Options buttons and menu items normally visible in the Actions panel are disabled, as they do not apply to Script Assist mode.
  • Page 330 To search for text in a script, do one of the following: To go to a specific line in a script, choose GoTo Line from the Actions panel pop-up menu or press Control+G (Windows) or Command+G (Macintosh); and then enter the line number.
  • Page 331: Creating A Startdrag/Stopdrag Event Using Script Assist

    From the Actions panel pop-up menu, select Print. The Print dialog box appears. Select options and click Print. Because the printed file won’t include information about its originating Flash file, Macromedia recommends that you include this information in a action in the comment script.
  • Page 332 Place the circle_mc move clip on the Timeline. To do this: Select the circle_mc movie clip on the Stage. Select Modify > Timeline > Distribute to Layers. This menu command automatically adds a layer to the Timeline and places the circle_mc movie clip instance on the Timeline.
  • Page 333 In the Target Path dialog box, select the MyCircle movie clip instance, and ensure that the Relative path option is selected. Click OK. Click the Add (+) button, and select Global Functions > MovieClip Control > startDrag. Enter into the Target text box. type Select the Expression and Constrain to Rectangle check boxes.
  • Page 334 In the Actions Toolbox, navigate to ActionScript 2.0 Classes > Movie > MovieClip > Events > onRelease, and double-click onRelease. The method is added to the onRelease Actions panel. Click in the Object text box, and click the Target Path button. The Target Path dialog box is displayed.
  • Page 335 Working with Screens (Flash Professional Only) In Macromedia Flash Professional 8, screens provide an authoring user interface with structural building blocks that make it easy for you to create complex, hierarchical Flash documents, such as slide presentations or form-based applications.
  • Page 336: Environment (Flash Professional Only)

    This chapter contains the following sections: Understanding screen-based documents and the screen authoring environment (Flash Professional only) ....... . .336 Using the Screen Outline pane (Flash Professional only) .
  • Page 337 For detailed information, see the procedures described in the following sections: “Creating a new screen-based document (Flash Professional only)” on page 343 “Adding screens to a document (Flash Professional only)” on page 344 “Naming screens (Flash Professional only)” on page 346 “Setting properties and parameters for a screen (Flash Professional only)”...
  • Page 338 Screens are similar to nested movie clips in some ways: Child screens inherit the behavior of their parents, and you use target paths in ActionScript to send messages from one screen to another. However, screens do not appear in the library, and you cannot create multiple instances of a screen.
  • Page 339 You cannot create a preloader within a screen-based document, because all screens in a document are located on the first frame of the root Timeline, so you cannot call or load other frames. Slide screens and form screens (Flash Professional only) You can create two types of screens in a document: slide screens and form screens.
  • Page 340 Because code can be placed in many different locations, it complicates matters as to where you should put your code. Therefore, you must consider the type of application you’re writing and what it requires in the way of ActionScript. As with behaviors, you should use ActionScript consistently in screen-based applications.
  • Page 341 New Flash users frequently like the visual approach of placing ActionScript for a particular screen directly on an object. When you click the screen or a movie clip, you see the code that corresponds to the instance or the name of the function that’s called for that instance. This makes navigating an application and associated ActionScript visual.
  • Page 342: Using The Screen Outline Pane (Flash Professional Only)

    Using the Screen Outline pane (Flash Professional only) When you work with a screen-based document, the Screen Outline pane at the left of the Document window displays thumbnails of each screen in the current document, in a collapsible tree view. The tree represents the structural hierarchy of the document. Nested screens are indented below the screen that contains them.
  • Page 343: Using The Screens Context Menu (Flash Professional Only)

    Using the screens context menu (Flash Professional only) The screens context menu contains many commands for working with screens. You can insert screens, cut, copy and paste screens, and perform other operations with the context menu commands. Specific context menu commands are documented in sections describing those tasks. For example, to find information on the Insert Screen command, see“Adding screens to a document (Flash Professional only)”...
  • Page 344: Adding Screens To A Document (Flash Professional Only)

    To create a new screen-based document from the Start page: Select a screen type for your document. Under Get Started, select one of the following from the Open a File options menu: Flash Slide Presentation creates a document with the slide screen as the default screen type.
  • Page 345 Flash inserts a new nested screen directly after the currently selected screen, and nested one level down. If the document already contains a nested screen or screens below the currently selected screen, the new screen is inserted after all nested screens already in place, one level below the selected screen.
  • Page 346: Naming Screens (Flash Professional Only)

    Naming screens (Flash Professional only) By default, screens are named with their default type, in the order in which they are created: slide1, slide2, form1, form2, and so on. The creation order does not necessarily reflect the order of the screens in the Screen Outline pane. For example, you could create three sibling screens, slide1, slide2, and slide3.
  • Page 347: Setting Properties And Parameters For A Screen (Flash Professional Only)

    Setting properties and parameters for a screen (Flash Professional only) You use the Property inspector to set properties and parameters for individual screens. On the left side of the Property inspector, you can view the instance name, width, height, and x and y coordinates of a screen: The instance name is a unique name assigned to a screen, used when you target the screen in ActionScript.
  • Page 348 To move a child screen on the Stage: If the Hide Screen context menu option for the child screen is selected (the default setting for slide screens), deselect the option. Select the screen’s parent in the Screen Outline pane, and select the child screen on the Stage.
  • Page 349 To change the ActionScript class of a screen: Select a screen in the Screen Outline pane. Select Window > Properties. In the Property inspector, click the Properties tab. Enter a class name in the Class Name text box. For more information on ActionScript classes, see Chapter 7, “Classes”...
  • Page 350 The parameter specifies whether child screens overlay one another on overlayChildren the parent screen during playback. When is set to , child screens overlayChildren true overlay one another. For example, suppose you have two children, Child 1 and Child 2, which are bullet points on the parent screen.
  • Page 351: About Adding Media Content To Screens (Flash Professional Only)

    About adding media content to screens (Flash Professional only) You add media content to screens the same as you do to a Flash document that does not contain screens. You can add media content to the screen that is currently selected in the Screen Outline pane.
  • Page 352 To select multiple screens in the Screen Outline pane: To select multiple contiguous screens, Shift-click the first and last screen you want to select. To select multiple discontiguous screens, Control-click (Windows) or Command-click (Macintosh) each screen. To edit an item on a screen: Select the item in the Document window.
  • Page 353: Creating Controls And Transitions For Screens With Behaviors

    To paste a screen, do one of the following: After cutting or copying the screen, right-click (Windows) or Control-click (Macintosh) another screen and select Paste from the context menu. The cut or copied screen is pasted after the selected screen. To nest the pasted screen within the selected screen, select Paste Nested Screen from the context menu.
  • Page 354 Adding controls to screens using behaviors (Flash Professional only) To add a control to a screen using a behavior, you attach the behavior to a trigger—a button, movie clip, or screen—and target the screen that you want to affect by the behavior. You can select the event that triggers the behavior.
  • Page 355 Adding transitions to screens using behaviors (Flash Professional only) Screen transition behaviors let you add animated transitions between screens, fade a screen in or out, rotate a screen as it appears or disappears, have a screen fly in from the edge of a document, and create other effects.
  • Page 356: Using Find And Replace With Screens (Flash Professional Only)

    For Duration, enter a time in seconds. For Easing, select an option to define the transition style. If the transition has additional parameters, select options or enter values for those parameters in the fields provided. Click OK. In the Behaviors panel, go to the Event column and click in the row for the new behavior, and select an event from the list.
  • Page 357: About Using The Movie Explorer With Screens (Flash Professional Only)

    About using the Movie Explorer with screens (Flash Professional only) You can use the Movie Explorer to view and organize the contents of a document containing screens. The Movie Explorer handles documents that contain screens much as it handles those that do not contain screens, with the following exceptions: The Movie Explorer shows the contents of the current screen (the screen selected in the Screens Outline pane) only.
  • Page 358 Screens and movie clips interact with ActionScript in similar ways, but with some important differences. For more information, see “How screens interact with ActionScript (Flash Professional only)” on page 359. For more information, see “Screen class (Flash Professional only)”, “Form class (Flash Professional only)”, and “Slide class (Flash Professional only)”, in the Components Language Reference.
  • Page 359 How screens interact with ActionScript (Flash Professional only) Screens are similar to nested movie clips in the way that they interact with ActionScript. (For more information, see “About nested movie clips” on page 37.) However, there are some differences. Remember the following guidelines when you use ActionScript with screens: When you select a screen in the Screen Outline pane and add ActionScript, the script is added directly to the screen as an object action (much as ActionScript is added directly to a movie clip).
  • Page 360: About Using Components With Screens (Flash Professional Only)

    For more information on controlling screens with ActionScript, see “Screen class (Flash Professional only)”, “Form class (Flash Professional only)”, and “Slide class (Flash Professional only)”, in the Components Language Reference. For information on the Object class and the event handler, see Object onclipEvent() and onClipEvent handler in Flash ActionScript 2.0 Language Reference.
  • Page 361: Accessibility In The Flash Screens Authoring Environment (Flash Professional Only)

    Accessibility in the Flash screens authoring environment (Flash Professional only) Accessibility support is available for screen-based documents in the Flash authoring environment. Using keyboard shortcuts rather than the mouse, users can navigate a document and use interface elements, including screens, panels, the Property inspector, dialog boxes, the Stage, and objects on the Stage.
  • Page 362 Working with Screens (Flash Professional Only)
  • Page 363: Chapter 15: Creating Multilanguage Text

    CHAPTER 15 Creating Multilanguage Text Macromedia Flash Basic 8 and Flash Professional 8 provide several features that greatly enhance the work flow for authoring multiple language Unicode-based applications. You can include multilanguage text in your document in the following ways: The Strings panel lets localizers edit strings in a central location inside Flash or in external XML files with their preferred software or translation memory.
  • Page 364: Selecting An Encoding Language

    You can enter Unicode escape characters in the string value for a dynamic or input text field variable. For more information, see “Creating documents with multilanguage text using text variables” on page 384. You can create an embedded font as a symbol in your Library. For more information, see “Creating font symbols”...
  • Page 365 385. For Flash applications in Macromedia Flash Player 5 or earlier that are authored in Flash MX or earlier, Flash Player 6 and earlier versions display the text using the traditional code page of the operating system running the player.
  • Page 366: About Fonts For Unicode-Encoded Text

    Most text editors that can save files in UTF-16BE or LE automatically add the BOMs to the files. If you set the property to , the text is interpreted using the system.useCodepage true traditional code page of the operating system that is running the player; it is not interpreted as Unicode.
  • Page 367 To select and embed a range of fonts: On the Stage, select a text field, and then show the Property inspector (Window > Properties). Click the Embed button to display the Character Embedding dialog box. Select the range of font sets you want to embed by doing any of the following: Click on a character set in the Character Set text field.
  • Page 368 To remove embedded font sets: On the Stage, select a text field, and then show the Property inspector (Window > Properties). Click the Embed button to display the Character Embedding dialog box. Click the Don’t Embed button to remove all of the embedded fonts. Click OK to close the dialog box, or select other fonts sets that you want to embed in the SWF file.
  • Page 369 Font set selections The following table gives more details about each font set selection: Range Description Uppercase [A–Z] Basic Latin uppercase glyphs Lowercase [a–z] Basic Latin lowercase glyphs Numerals [0–9 Basic Latin numeral glyphs Punctuation [!@#%...] Basic Latin punctuation Basic Latin Basic Latin glyphs within the Unicode range 0x0021 to 0x007E Japanese Kana Hiragana and Katakana glyphs (including half-width forms)
  • Page 370: Authoring Multilanguage Text With The Strings Panel

    Range Description Latin Extended Add'l Latin Extended Additional range 0x1E00 to 0x1EFF (including punctuation, superscripts and subscripts, currency symbols, and letterlike symbols) Greek Greek and Coptic, plus Greek Extended (including punctuation, superscripts and subscripts, currency symbols, and letterlike symbols) Cyrillic Cyrillic (including punctuation, superscripts and subscripts, currency symbols, and letterlike symbols) Armenian...
  • Page 371 A folder is created for each language you select, and within each language folder is an XML file for that language. For more information, see “Publishing and deploying multilanguage text” on page 374. Send the published FLA file and XML folders and files to your translators. You can author in your native language, and let them make the translation.
  • Page 372 Click OK. A column for each selected language appears in the Strings panel. The columns appear in alphabetical order. Save the FLA file. When you save the FLA file, a folder for each language you selected is created in the same folder indicated in the SWF publish path. For more information, see “Publishing Flash documents”...
  • Page 373 To assign a string ID to a text field: Select Window > Other Panels > Strings to open the Strings panel. Select the Text tool from the toolbar. On the Stage, create an input or dynamic text field. While the text field is selected, enter a unique ID in the ID field in the Strings panel. If a static text field is selected on the Stage, the Stage text selection section on the Strings panel displays the message “Static text cannot have an ID associated with it.”...
  • Page 374 Changing the language displayed on the Stage You can change the language that appears on the Stage to any of the active languages you selected. For more information, see “Selecting languages for translation” on page 371. To display the text on the Stage in another language: Select Window >...
  • Page 375 When you deploy a SWF file, you also need to deploy the associated XML files with the string translations in the web server. The first frame that contains text cannot appear until the entire XML file is downloaded. Manually replacing strings at publish time using the Stage language You can choose to manually replace strings when you publish your Flash SWF file using the Stage language.
  • Page 376 To select the default language and automatic language detection: Select Window > Other Panels > Strings to open the Strings panel. Click the Settings button to display the Settings dialog box. In the Default language pop-up menu, select the language you want to use for the default language.
  • Page 377 Click OK. Flash generates the following ActionScript, which stores the language XML file paths. You can use this as a starting point for your own language detection script. The ActionScript generated by the Strings panel does not use the Locale.initialize function.
  • Page 378 Exported XML file sample The following samples show what an XML file generated by the Strings panel 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" encoding="UTF-8"?> <!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN" "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd"...
  • Page 379 </trans-unit> <trans-unit id="004" resname="IDS_TEST"> <source></source> </trans-unit> </body> </file> </xliff> Translating text in the Strings panel or an XML file After you finish authoring your document, have assigned IDs to all the text in the Strings panel and selected all the languages into which you want to translate the document, you can send it to translators.
  • Page 380 Importing 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 FLA file when it opens. You can also import an XML file into the Strings panel from another location.
  • Page 381: Creating Documents With Multilanguage Text Without Using The Strings Panel

    Creating documents with multilanguage text without using the Strings panel You can create documents with multilanguage text without using the Strings panel. Using the XMLConnector component to connect to external XML files You can use the XMLConnector component to connect to an external XML document in order to bind to properties in the document.
  • Page 382 To toggle between Japanese and Chinese character input and Korean character input: Select Edit >Preferences (Windows) or Flash > Preferences (Macintosh), and click the Editing tab in the Preferences dialog box. Under Input Language Settings, select one of the following options: Select Chinese and Japanese to input Chinese and Japanese characters from a Western keyboard.
  • Page 383 Save the file in UTF-8 (recommended), UTF-16BE, or UTF-16LE format. If you are using UTF-16 format, make sure a BOM is included at the beginning of the file to identify the encoding: For UTF-16BE, the first byte of the file should be OxFE, and the second byte should be OxFF.
  • Page 384 By default, the Flash authoring application assumes that external files that use the #include action are encoded in the traditional code page of the operating system running the authoring tool. Using the header in a file tells the authoring tool that the external file is //!-- UTF8 encoded as UTF-8.
  • Page 385: Using External Text Or Xml Files That Are Not Unicode-Encoded

    Using external text or XML files that are not Unicode-encoded If you load external files into a Flash Player 7 application that are not Unicode-encoded, the text in the external files does not appear correctly when Flash Player attempts to show them as Unicode.
  • Page 386 Creating Multilanguage Text...
  • Page 387: Chapter 16: Data Integration (Flash Professional Only)

    The Macromedia website and Flash Help has many tutorials on creating rich Internet data applications in Flash. For downloadable examples and tutorials that use the data components, “Additional resources”...
  • Page 388 The data resolution layer provides resolver components that can translate changed data into a format that is consumable by an external data source. In addition, these components can accept and translate updates from an external data source so that they can be consumed by a Flash client.
  • Page 389 The following table can help you decide what components you need to use in your Flash data application. Data source Use this connector Use this resolver web service/SOAP WebServiceConnector XUpdateResolver WebService classes (not a WebService classes (not a component) component) XML document XMLConnector XUpdateResolver...
  • Page 390: Additional Resources

    Component Data tutorials in Data tutorials on DevNet Flash Help (www.macromedia.com/devnet/mx/ flash/data_integration.html) WebServiceConnector Web Service Tutorial: Tip of the Day, Part 2, Macromedia Tips www.macromedia.com/devnet/mx/flash/ articles/tipoday_pt2.html Building a Google Search Application, www.macromedia.com/devnet/mx/flash/ articles/google_search.html XMLConnector XML Tutorial: Timesheet Tutorial in Flash Help...
  • Page 391: Creating A Simple Application

    Note that all of the namings in this example are case-sensitive. To create the dinner menu application: Copy the data source, an XML file called dinner_menu.xml, from following location: In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\DataIntegration\DinnerMenu\ On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/ Samples and Tutorials/Samples/DataIntegration/DinnerMenu/.
  • Page 392 Load a sample of the data source’s schema: with the XMLConnector instance still selected, in the Component inspector click the Schema tab and follow these steps: Select from the Schema tab top pane. results : XML Click the Import a Schema from a sample XML file button. Select the dinner_menu.xml file from the dialog box that appears.
  • Page 393: Workflows For Using The Data Components

    Workflows for using the data components This section provides a high-level overview of the steps required to create a Flash application that can dynamically interact with an external data source. You can find instructions and examples to complete each step throughout the rest of the chapter. There are two general workflows: one for connecting to web services or XML documents as your data source, and one for connecting to an external database.
  • Page 394: Data Binding (Flash Professional Only)

    Workflow for an external database (non-XML or not a web service): Set up your data source; for example, in the ColdFusion environment, set up a ColdFusion DataSource component to connect to your data source. Add components to the Stage: DataSet component. UI component for data display, such as DataGrid.
  • Page 395 In the Flash interface, you bind data by using the Bindings and Schema tabs of the Component inspector. Although you need to understand how bindings and schemas work in Flash, your connector component is usually the first component you need to set up, because it brings in the schema for your data source;...
  • Page 396 For more tutorials that show you how to create data bindings, see www.macromedia.com/ devnet/mx/flash/data_integration.html. Working with schemas in the Schema tab (Flash Professional only) The Schema tab in the Component inspector lets you view and edit the schema for each data- related component in your application.
  • Page 397 The following illustration shows the Schema tab for the XMLConnector component used in “Creating a simple application” on page 391. The top pane shows the bindable properties for instance, with the property selected, and the bottom pane shows xmlConn food:Array the settings for the property.
  • Page 398 A component identifies which of its properties are bindable. These bindable properties appear in the Schema panel as top-level schema items (component properties). A component property can have its own internal schema that defines additional schema fields that can be bound to other component properties within your application;...
  • Page 399 The following example illustrates how you make an existing component property bindable by adding the component property to the component’s schema. In the example, you create an application that uses a CheckBox component to indicate whether a TextInput component is editable.
  • Page 400 Adding a schema field to a schema item When you use a DataSet component, you manually enter the schema for the component. You might need to add schema items, which are essentially component properties (see “Adding a component property to a schema” on page 398).
  • Page 401 The following illustration shows the runtime process of the data binding engine. The four attributes that handle data types are shown in the illustration and discussed in the following text. GET DATA SET DATA DataType Type conversion Validation Formatter (maybe) (maybe) Convert to String Convert from String...
  • Page 402 Encoder The encoder’s job is to convert this data to an ActionScript data type. For example, the string data that you get from an XML document can represent a date or a number. If data binding needs the data in string form (because it is being assigned to a text component, for example) the formatter does this conversion.
  • Page 403 Working with bindings in the Bindings tab (Flash Professional only) Once you have imported and defined schemas for your data components, as described in “Working with schemas in the Schema tab (Flash Professional only)” on page 396, you can start adding bindings. You use the Bindings tab to add and remove bindings to and from components and their properties.
  • Page 404 Adding a binding To add a binding, click the Add Binding (+) button on the Bindings tab. The Add Binding dialog box appears. This dialog box shows all the schema items (properties) for the selected component. You use this dialog box to select which property you want to expose for binding. Component properties appear as root nodes within the schema tree.
  • Page 405 In the bottom pane of the Bindings tab, click Direction and select the appropriate value from the pop-up menu. See “Configuring bindings” on page 405. Repeat the steps for additional components. The schema for a component defines which schema items are bindable. However, you might need add a binding for a schema item that is not identified in the data source’s schema.
  • Page 406 Defining what to bind to When you expose a component property for binding, you need to define what to bind the property to. The Bound To dialog box appears when you click Bound To in the Binding Attributes pane of the Bindings tab. The Bound To dialog box includes the Component Path pane and the Schema Location pane.
  • Page 407 The Schema Location pane shows the schema tree of the component selected in the Component Path pane. This is the same information that appears in the Schema Tree pane of the Component inspector Schema tab. You can use a dynamic value or a constant value for the Bound To property. To use a dynamic value for the Bound To property: Select a component in the Component Path pane.
  • Page 408 To create an indexed binding: If you haven’t already done so, create the example application shown in “Creating a simple application” on page 391. Drag a TextArea component to the Stage and name it myTextArea Select the instance, click the Bindings tab, click the + symbol, and select the xmlConn property, which is in the array.
  • Page 409 Click , click the magnifying glass icon, deselect Use Constant Value, Index for ‘food’ select the DataGrid instance, and select . The settings for menu_dg selectedIndex:Number the indexed binding appear in the Bindings tab, as shown in the following image: Next, set the DataGrid index default value to 0 to make it available for data binding: select instance, click the Schema tab, select , and in the...
  • Page 410 If a binding is created for any of these items, an property appears in the index for 'row' Binding Attributes pane, so that an index can be specified for the row array. Flash uses the [n] schema field to identify this type of relationship. Therefore, you might need to duplicate this entry if you are manually creating a schema.
  • Page 411 DataSet, that provide their own events for accessing data that may become out of sync with data binding. To avoid these issues, Macromedia recommends that you publish to Flash Player 7 when using the DataSet component.
  • Page 412: Data Connectivity (Flash Professional Only)

    Components Language Reference. The WebService classes are accessible only through ActionScript code and are common to various Macromedia products. The WebServiceConnector component has an API that is unique to Flash and lets you access the component’s methods, properties, and events through the visual interface.
  • Page 413 Connecting to web services with the WebService connector component (Flash Professional only) The WebServiceConnector component lets you introspect, access, and bind data between a remote web service and your Flash application. A single instance of a WebServiceConnector component can be used to make multiple calls to the same operation. To call more than one operation, use a different instance of a WebServiceConnector component for each operation.
  • Page 414 To see this web service in action, see the Tips application in the following location: In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\DataIntegration\MacromediaTips...
  • Page 415 Using the Web Services panel You can view a list of web services, refresh web services, and add or remove web services in the Web Services panel (Window > Other Panels > Web Services). When you add a web service to the Web Services panel, the web service is then available to any application you create.
  • Page 416 Connecting to XML data with the XMLConnector component (Flash Professional only) The XMLConnector component lets you access any external data source that returns or receives XML through HTTP. A single instance of an XMLConnector component can be used to make multiple calls to the same operation. To call more than one operation, use a different instance of an XMLConnector component for each operation.
  • Page 417 In the Open File dialog box, select the file that you want to use as a sample, and click Open. The schema appears in the Schema tab. You can now create bindings between elements of your XML document and other component properties within your application. Some XML documents may have a structure that Flash MX cannot represent;...
  • Page 418 Language Reference. For a common workflow using this component, see “Using the XMLConnector component (Flash Professional only)” in the Components Language Reference. You can also read the following tutorials on Macromedia DevNet: “Bike Trips Sample” at www.macromedia.com/devnet/mx/flash/articles/xmlconnector.html and “Data Integration Using ASP”...
  • Page 419: Data Management (Flash Professional Only)

    For more information, see the DevNet article “Getting a Handle on Web Services” at www.macromedia.com/devnet/mx/flash/articles/flmxpro_webservices.html. Data management (Flash Professional only) You use the DataSet component for applications that handle managed data. The term managed data refers to the ability to perform advanced operations on a local cache of data, including multiple sorts, filters, finds, and offline caching.
  • Page 420 Language Reference. For a tutorial that uses the DataSet component, see the DevNet article “Flash Data Integration Using Microsoft Active Server Pages (ASP)” at www.macromedia.com/devnet/mx/ flash/articles/flashpro_asp.html. The DataSet component works only with Flash Player 7 or later. Managing data with the DataSet component (Flash...
  • Page 421 The following diagram illustrates the data binding that typically is needed when you use a DataSet component. The DataSet component is used to hold and organize your data; you must use data bindings and write ActionScript code to handle updates. Changes that are made to your data through UI components can be tracked and used to generate a DeltaPacket, an object produced by the DataSet component that contains a list of changes made to data at runtime.
  • Page 422 For more information on working with data in the DataSet component, see the following topics: “About loading data into the DataSet component” on page 422 “Accessing the data” on page 424 About loading data into the DataSet component To load data into the DataSet component, you edit the schema for the DataSet and create data bindings that can be done either in ActionScript or on the Bindings tab of the Component inspector.
  • Page 423 Remoting RecordSet The following ActionScript example assumes that you’re using Flash Remoting and that you’ve made a remoting call that returns a RecordSet. The RecordSet object implements the DataProvider interface. The result is assigned to the dataProvider property of the component instance: myDataset function getSQLData_Result(result) {...
  • Page 424 Array of objects returned from an XMLConnector component The following illustration shows an example of using the Component inspector to bind an array of XML nodes, represented with the XMLConnector component. It assumes that you have imported a schema for an XML file that contains an array of XML nodes. The illustration on the left shows the schema of the XML document, the array of XML nodes represented as an ActionScript array.
  • Page 425 The following code shows an example of accessing data at runtime. It loads an existing DataSet component instance with customer information and then displays each myDataSet customer’s name in the trace window. Notice that the data types for the customer information—the array of objects—are added so the data displays properly: //Drag DataSet component to Stage and name it myDataSet (easiest way to create instance and import necessary libraries)
  • Page 426 To access data at design time: Drag a DataSet component onto the Stage. Name it myDataSet. Select a layer in the Timeline, and press F9 to open the Actions panel. Type the following code: var recData = [{id:0, firstName:"Frank", lastName:"Jones", age:27, usCitizen:true}, {id:1, firstName:"Susan", lastName:"Meth", age:55, usCitizen:true},...
  • Page 427: Data Resolution (Flash Professional Only)

    If you do not create persistent fields for the DataSet component and you bind it to a WebServiceConnector component or an XMLConnector component that defines a schema, the DataSet component tries to create the correct fields based on the connector component’s schema, which might not work.
  • Page 428 Write ActionScript code using the XML class (see XML in ActionScript 2.0 Language Reference). For more information, see Chapter 16, “Working with External Data” in Learning ActionScript 2.0 in Flash. External data refers to any data that is accessible through HTTP. Resolving XML data with the XUpdateResolver component (Flash Professional only) The XUpdateResolver component converts changes made to the data in your application into...
  • Page 429 Updates sent to an external data source When a user edits data in your Flash application, the data is captured in the DataSet component. The DataSet component produces a DeltaPacket, which the resolver component uses to create an update packet. The update packet consists of XUpdate statements, which are communicated to an external data source through a connector component.
  • Page 430 448. For a tutorial that uses the RDBMSResolver component, see the DevNet article “Using the RDBMSResolver to Update a Database” at www.macromedia.com/devnet/mx/flash/articles/ delta_packet.html. Formatting your results (Flash Professional only) By default, the resolver components use the schema specified on the connector components to format values sent to the server.
  • Page 431: Advanced Topics In Data Integration

    However, in some cases, you might find that the values you’re sending to your external data source are not formatted correctly. This can occur when you don’t use a connector to retrieve your data or you want to change the format of the data to be sent to an external data source. In this case, you can control the formatting by adding properties to the resolver component’s schema.
  • Page 432 Data type: Every field has a data type, which is selected from a list of available data types. The data type of a field affects data binding in two ways: When a new value is assigned to a field through data binding, the data type determines the rules that are used to check the data for validity.
  • Page 433 Required: This is a Boolean value that determines whether this field is required to have a non-null value. Validation fails if but no value has been set. required=true Read-Only: This is a Boolean value that determines whether this field can receive new values through data binding.
  • Page 434 Default settings These settings let you set defaults for various situations. The following list describes the uses for these settings: If a field’s value is undefined, the default value is used whenever the value of the field is used as the source of a data binding. For example, the data fields of a DataSet component, or the property of a connector component, can have an undefined value.
  • Page 435 If you use this XML file to import a schema for the XMLConnector component’s results property, it generates the following code: results : XML datapacket : Object row : Array [n] : object @billable: String @hours : Integer @id : Integer @rate : Integer Suppose you want to treat the row node as a record within a grid, and you want the attribute to be treated as a Boolean value and show a...
  • Page 436 Setting the schema path property for a schema field is an optional setting that is used in special path circumstances when the schema for your component is not appropriate. Using this setting, you can create a virtual schema field (a field that exists in one location but pulls its value from another).
  • Page 437 ds.addEventListener('calcFields', calculatedFunct); See the event in the Components Language Reference. DataSet.calcFields AutoTrigger This kind can be applied to any property of any component but is mainly useful for connector component properties. When a new value is assigned to the property through data binding, the trigger method of the component is called.
  • Page 438 Date Converts data of the String type into the ActionScript Date type. You must specify (using the Encoder Options property) a template string, which works as follows: The template string should contain 0 or 1 instances of "YYYY" "MM" "DD" "HH"...
  • Page 439 The XPath to uniquely identify the row node is shown in the following example: datapacket/row[@id=’xxx’] In this example, xxx represents a value for the attribute. In a typical case, the attribute in the XML file would be bound to the field of the DataSet component.
  • Page 440 You can create custom encoders. The number of encoders allowed is unlimited. Encoders are defined by XML files found in the Flash Professional 8 Configuration/Encoders folder. The definition includes the following metadata: An ActionScript class that will be instantiated to encode/decode the data. This class must be a subclass of mx.databinding.DataAccessor.
  • Page 441 Rearrange Fields This formatter creates a new array of objects based on the original array in your binding. It can only be applied to fields that are arrays. You define the fields on the new array by using a string template in the form: fieldname1=definition1;fieldname2=definition2;and so on.
  • Page 442 Schema data types A data type is an object that represents all the runtime logic needed to support a particular data type. A data type can be a scalar type, such as integer, string, date, currency amount, or ZIP code. It can also be a complex type, with subfields and so on. A data type can test a data value to determine if it is valid for that data type.
  • Page 443 You can create custom data types. The number of data types allowed is unlimited. Data types are defined by XML files found in the Flash Professional 8 Configuration/DataTypes folder. The definition includes the following metadata: An ActionScript class that will be instantiated for validation and type conversion A Validation Options dialog box The name of the standard formatter, which you can override using the formatter...
  • Page 444 Component Property/field Settings When to use DataSet Any data field Name, Data Type You must set these for every data set field that you define. Validation Options, If validation is desired. Read-Only, Required Formatter, Formatter For fields that need Options formatting for display as text.
  • Page 445 For example, the schema for Animals.xml file described in “Connecting to XML data with the XMLConnector component (Flash Professional only)” on page 416 defines an array of objects called Bird. Each object contains two fields ( ). They also contain a sub-element name with one field called .
  • Page 446 (attribute value syntax; selects all B nodes that have an attribute whose /B[@id="A1"] value is A1) Support for predicate comparison operators: Support for Boolean values in predicates: /B[@id=1 and @customer="macromedia"] The following operators are not supported: "<", ">", "//". Data Integration (Flash Professional Only)
  • Page 447 To add a binding using path expressions: In either the Add Binding dialog box or the Bound To dialog box, select Use path expression. Enter a path expression to identify the schema item to which you want to bind. Path expressions are entered in the following formats: For properties that contain ActionScript data, the path follows this format: field [.field]...
  • Page 448 Example of an RDMBSResolver component XML update packet About receiving results from an external data source In addition to the information in this section, see the DevNet article “Using the RDBMSResolver to Update a Database” at www.macromedia.com/devnet/mx/flash/articles/ delta_packet.html. Data Integration (Flash Professional Only)
  • Page 449 Example of an RDMBSResolver component XML update packet To handle server-side code, you’ll need to understand the XML update packet generated by the resolver component. The information contained within the XML update packet is affected in part by the component parameter values that are assigned by the developer. For information on the RDBMSResolver component parameters, see “Using the RDBMSResolver component (Flash Professional only)”...
  • Page 450 : A number that uniquely identifies the operation within the transaction. This information should accompany the results packet returned to this component. : This attribute contains the new value for a field that was modified. It appears newValue only when the field value has changed. : This attribute is if the field should be used to locate the row to update.
  • Page 451 The following example shows a sample RDBMSResolver component results packet (with both update results and change information nodes): <results_packet nullValue="{_NULL_}" transID="46386292065:Wed Jun 25 15:52:34 GMT-0700 2003"> <operation op="delete" id="11295627479" msg="The record could not be found"/> <delete> <field name="id" oldValue="1000" key="true" /> </delete>...
  • Page 452 Update nodes contain information about records that have been modified since the client was last updated. Update nodes should have child nodes that list the fields that are field necessary to uniquely identify the record that was deleted and that describe fields that were modified.
  • Page 453 To request the data, use the ActionScript expression, as for any array. You myArray[myIndex] must access the array using numeric indices; that is, must be a number. To iterate over myIndex the array, use the following statement: for(var i=0; i < myArray.length; i++); The expression won’t work in this case.
  • Page 454 Data Integration (Flash Professional Only)
  • Page 455: Chapter 17: Publishing

    CHAPTER 17 Publishing When you’re ready to deliver Macromedia Flash Basic 8 and Flash Professional 8 content to an audience, you can publish it for playback. By default, the Publish command creates a Flash SWF file and an HTML document that inserts your Flash content in a browser window. The Publish command also creates and copies detection files for Flash 4 and later.
  • Page 456: This Chapter Contains The Following Sections: Playing Your Flash Swf Files

    About configuring a web server for Flash ........499 Playing your Flash SWF files The Macromedia Flash SWF file format is for deploying Flash content. You can play Flash content in the following ways:...
  • Page 457: About Publishing Secure Flash Documents

    Exact domain matching Flash Player 6 lets SWF files from similar domains (for example, ) communicate freely with each other www.macromedia.com store.macromedia.com and with other documents. In Flash Player 7, the domain of the data to be accessed must match the data provider’s domain exactly for the domains to communicate.
  • Page 458: Configuring A Server For Flash Player

    SWF files. Your server may already be configured properly. To test server configuration, see TechNote 4151 on the Macromedia Flash Support Center at www.macromedia.com/go/tn_4151. If your server is not properly configured, follow the procedure below to configure it.
  • Page 459: Publishing Flash Documents

    The security configuration file is a text file placed in the same folder as the Flash Player installer. The Flash Player installer reads the configuration file during installation and follows its security directives. Flash Player exposes the configuration file to ActionScript using the System object.
  • Page 460 To set general publish settings for a Flash document: Open the Publish Settings dialog box. Do one of the following: Select File > Publish Settings. In the Property inspector for the document (which is available when no object is selected), click the Settings button. To create a publish profile for the publish settings that you specify, see “Using publish profiles”...
  • Page 461 Click the Flash tab and select a Player version from the Version pop-up menu. Not all Macromedia Flash Basic 8 and Flash Professional 8 features work in published SWF files that target Flash Player versions earlier than Flash Player 8.
  • Page 462 Protect from Import prevents others from importing a SWF file and converting it back into a FLA document. If you select this option, you can decide to use password protection with your Flash SWF file. Debugging Permitted activates the Debugger and allows remote debugging of a Flash SWF file.
  • Page 463 If you want to use the settings selected in step 8 to override settings for individual sounds selected in the Sound section of the Property inspector, select Override Sound Settings. You might want to select this option to create a smaller low-fidelity version of a SWF file. If the Select Override Sound Settings option is deselected, Flash scans all stream sounds in the document (including sounds in imported video) and publishes all stream sounds at the highest individual setting.
  • Page 464 Do any of the following: To add a folder to the classpath, click the Browse to Path button, browse to the folder you want to add, and click OK. You can also click the Add New Path (+) button to add a new line to the Classpath list. Double-click the new line, type a relative or absolute path, and click OK.
  • Page 465 To publish HTML that displays your Flash SWF file: Do one of the following to open the Publish Settings dialog box: Select File > Publish Settings. In the Property inspector for the document (which is available when no object is selected), click the Settings button.
  • Page 466 Display Menu shows a shortcut menu when users right-click (Windows) or Control-click (Macintosh) the SWF file. Deselect this option to show only About Flash in the shortcut menu. By default, this option is selected (the parameter is set to MENU true).
  • Page 467 Opaque Windowless sets the background of the Flash content to opaque, obscuring anything underneath the Flash content. Opaque Windowless lets HTML content appear above or on top of Flash content. Transparent Windowless sets the background of the Flash content to transparent. This allows the HTML content to appear above and below the Flash content.
  • Page 468 The following browsers support windowless modes: Operating system Internet Explorer Netscape Other Macintosh OS X 10.1.5 and 5.1 and IE 5.2 7.0 and later • Opera 6 or later 10.2 • Mozilla 1.0 or later • AOL/Compuserve Windows 5.0, 5.5, and 6.0 7.0 and later •...
  • Page 469 The following HTML Templates do not support Player Detection because they do not embed the Flash Player: Image Map QuickTime To enable Flash Player detection: Select File > Publish Settings, and select the HTML tab. Select either the Flash Only or Flash HTTPS template from the Template pop-up menu. The Flash Only and Flash HTTPS templates support the new single-page HTML detection kit.
  • Page 470 Flash can generate an image map for a GIF file to maintain URL links for buttons in the original document. You use the Property inspector to place the frame label #Map in the keyframe in which you want to create the image map. If you don’t create a frame label, Flash creates an image map using the buttons in the last frame of the SWF file.
  • Page 471 Smooth applies anti-aliasing to an exported bitmap to produce a higher-quality bitmap image and improve text display quality. However, smoothing might cause a halo of gray pixels to appear around an anti-aliased image placed on a colored background, and it increases the GIF file size.
  • Page 472 Ellipsis (...) button to the right of the Palette box at the bottom of the dialog box and select a palette file. Flash supports palettes saved in the ACT format, exported by Macromedia Fireworks and other leading graphics applications; for more information, see “Importing and exporting color palettes” on page 126.
  • Page 473 PNG is the only cross-platform bitmap format that supports transparency (an alpha channel). It is also the native file format for Macromedia Fireworks. Flash exports the first frame in the SWF file as a PNG file, unless you mark a different keyframe for export by entering the frame label #Static.
  • Page 474 Select a bit depth to set the number of bits per pixel and colors to use in creating the image: Select 8-bit for a 256-color image. Select 24-bit for thousands of colors. Select 24-bit with Alpha for thousands of colors with transparency (32 bits). The higher the bit depth, the larger the file.
  • Page 475 Ellipsis (...) button to the right of the Palette box at the bottom of the dialog box and select a palette file. Flash supports palettes saved in the ACT format, exported by Macromedia Fireworks and other leading graphics applications; for more information, see “Importing and exporting color palettes” on page 126.
  • Page 476 Adaptive analyzes the colors in the image and creates a unique color table for the selected PNG file. This option is best for systems 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 palette.
  • Page 477 On the Formats tab, select the QuickTime file type. For the QuickTime filename, either use the default filename, or enter a new filename with the .mov extension. Click the QuickTime panel to show its settings. For Dimensions, enter a width and height in pixels for the exported QuickTime video, or select Match Movie to make the QuickTime video the same size as the Flash SWF file and keep its aspect ratio.
  • Page 478: About Publishing Flash Lite Documents

    To save the settings with the current file, click OK. About publishing Flash Lite documents Macromedia Flash Lite lets Flash designers, developers, and content providers quickly create engaging content for mobile phones using the ActionScript scripting language, drawing tools, and templates. For detailed information on authoring for mobile devices, see the Flash Lite...
  • Page 479 Creating a publish profile The Publish Settings dialog box includes a Create New Profile button, which creates a profile based on the publish settings you’ve specified. To create a publish profile: In the Publish Settings dialog box, click the Create New Profile (+) button. In the Create New Profile dialog box, name the publish profile, and click OK.
  • Page 480 Exporting a publish profile You can export a publish profile as an XML file for import into other documents. After import, the publish profile appears in the Publish Settings dialog box as an option in the Current Profile pop-up menu. To export a publish profile: From the Current Profile pop-up menu in the Publish Settings dialog box (File >...
  • Page 481: About Html Publishing Templates

    About HTML publishing templates A Flash HTML template is a text file that contains both static HTML code and flexible template code consisting of a special type of variables (which differ from ActionScript variables). When you publish a Flash SWF file, Flash replaces these variables with the values you selected in the HTML tab of the Publish Settings dialog box and produces an HTML page with your SWF file embedded.
  • Page 482: Customizing Html Publishing Templates

    For Windows operating systems: Windows 2000 or Windows XP boot drive:\Documents and Settings\user\Local Settings\ Application Data\Macromedia\Flash 8\language\Configuration\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 483 When you finish editing the variables, save the template in the same folder from which you retrieved it. To apply the template settings to your Flash SWF file, select File > Publish Settings, select the HTML panel, and select the template you modified. Flash changes only the template variables in the template selected in the Publish Settings dialog box.
  • Page 484 Attribute/parameter Template variable Devicefont Bgcolor Movie text (area to write movie text) Movie URL (location of SWF file URL) Image width (unspecified image type) Image height (unspecified image type) Image filename (unspecified image type) Image map name Image map tag location QuickTime width QuickTime height QuickTime filename...
  • Page 485 For JPEG, during the publish operation, place the playhead on the frame to be used for display. In an HTML editor, open the HTML template you’ll modify. Flash stores HTML templates in the following location: boot drive:\Program Files\Macromedia\Flash 8\ language\First Run\HTML. Save your template.
  • Page 486 Creating a text report template variable causes Flash to insert all the text from the current Flash SWF file as a comment in the HTML code. This is useful for indexing the content of a SWF file and making it visible to search engines. Creating a URL report template variable makes Flash generate a list of the URLs referred to by actions in the current SWF file and insert it at the current location as a comment.
  • Page 487 Sample template The following Default.HTML template file in Flash includes many of the commonly used template variables: $TTFlash Only Display Macromedia Flash Movie 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> <title>$TI</title>...
  • Page 488: Editing Flash Html Settings

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100" height="100" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/ flash/swflash.cab#version=7,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>...
  • Page 489 To use both tags, position the tag before the closing tag, as shown in the embed object following example: <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100" height="100" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/ flash/swflash.cab#version=7,0,0,0"> <param name="movie" value="moviename.swf"> <param name="play" value="true"> <param name="loop" value="true"> <param name="quality" value="high"> <embed src="moviename.swf" width="100" height="100" play="true”...
  • Page 490 devicefont attribute/parameter Value true | false Template variable: Description (Optional) Specifies whether static text objects that the Device Font option has not been selected for will be drawn using device fonts anyway, if the necessary fonts are available from the operating system. src attribute Value movieName.swf...
  • Page 491 (For example, the following sizes all have a 4:3 aspect ratio: 640 x 480 pixels, 320 x 240 pixels, and 240 x 180 pixels.) codebase attribute Value http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=7,0,0,0 Description Identifies the location of the Flash Player ActiveX control so that the browser can automatically download it if it is not already installed.
  • Page 492 Value http://www.macromedia.com/shockwave/download/ index.cgi?P1_Prod_Version=ShockwaveFlash Description Identifies the location of the Flash Player plug-in so that the user can download it if it is not already installed. The value must be entered exactly as shown. Applies to the tag only.
  • Page 493 loop attribute/parameter Value true | false Template variable: Description (Optional) Specifies whether the Flash content repeats indefinitely or stops when it reaches the last frame. The default value is if this attribute is omitted. true quality attribute/parameter Value medium high autolow autohigh best...
  • Page 494 The default value for if this attribute is omitted. quality high bgcolor attribute/parameter Value (hexadecimal RGB value) #RRGGBB Template variable: Description (Optional) Specifies the background color of the application. Use this attribute to override the background color setting specified in the Flash SWF file. This attribute does not affect the background color of the HTML page.
  • Page 495 Description Specifies the value for the , and tags and determines how the Flash align object embed SWF file is positioned within the browser window. Default centers the application in the browser window and crops edges if the browser window is smaller than the application.
  • Page 496 About Macromedia Flash Player 6 option and the Settings option. The default value is if this attribute is omitted...
  • Page 497 allowscriptaccess attribute/parameter Value always never samedomain Description to let your Flash application communicate with the HTML page allowscriptaccess hosting it. This is required because operations can cause fscommand() getURL() JavaScript to use the permissions of the HTML page, which can be different from the permissions of your Flash application.
  • Page 498: Previewing The Publishing Format And Settings

    Previewing the publishing format and settings To preview your Flash SWF file with your specified publishing format and settings, you can use the Publish Preview command. This command exports the file and opens the preview in the default browser. If you preview a QuickTime video, Publish Preview starts the QuickTime video Player.
  • Page 499: About Configuring A Web Server For Flash

    To control applications from Flash Player: Do one of the following: Open a new or existing file by selecting File > New or File > Open. Change your view of the application by selecting View > Magnification, and from the submenu, select Show All, Zoom In, Zoom Out, or 100%.
  • Page 500 Publishing...
  • Page 501: Chapter 18: Exporting

    CHAPTER 18 Exporting The Export Movie command in Macromedia Flash Basic 8 and Flash Professional 8 lets you create content that can be edited in other applications and export Flash content directly into a single format. For example, you can export an entire document as a Flash SWF file, as a series of bitmap images, as a single frame or image file, or as moving and still images in various formats, including GIF, JPEG, PNG, BMP, PICT, QuickTime, or Windows AVI.
  • Page 502: About Export File Formats

    To export the contents of the current frame or the currently selected image to one of the still- image formats or to a single-frame Flash Player application, you use the Export Image command. Remember the following considerations: When you export a Flash image as a vector-graphic file (in Adobe Illustrator format), you preserve its vector information.
  • Page 503 Adobe Illustrator The Adobe Illustrator format is ideal for exchanging drawings between Flash and other drawing applications such as Macromedia FreeHand. This format supports accurate conversion of curve, line style, and fill information. Flash supports importing and exporting Adobe Illustrator 88, 3, 5, 6, and 8 through 10 formats. (See “Importing Adobe Illustrator,...
  • Page 504 The Export Adobe Illustrator dialog box lets you select the Adobe Illustrator version—88, 3.0, 5.0, or 6.0. You can use the Macromedia Flashwriter plug-in to export files in SWF format from Adobe Illustrator 8. Adobe Illustrator versions 9 and 10 have built-in support for SWF export, so the Macromedia Flashwriter plug-in is not needed.
  • Page 505 Smooth applies anti-aliasing to the exported bitmap. Anti-aliasing produces a higher-quality bitmap image, but it can create a halo of gray pixels around an image placed on a colored background. Deselect this option if a halo appears. DXF Sequence and AutoCAD DXF Image The DXF Sequence and AutoCad DXF Image 3D format lets you export Flash content as AutoCAD DXF release 10 files, so that they can be brought into a DXF-compatible application for additional editing.
  • Page 506 Macromedia Flash Video (FLV) The Macromedia FLV file format lets you import or export a static video stream with encoded audio. This format is intended for use with communications applications, such as video conferencing and files that contain screen share encoded data exported from the Flash Communication Server.
  • Page 507 Include sets the portion of the document to be exported, either Minimum Image Area or Full Document Size. Color Depth designates whether the PICT file is object-based or bitmap. Object-based images generally look better 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.
  • Page 508 If you import a video clip (in any format) into a document as an embedded file, you can publish the document as a QuickTime movie. If you have imported a video clip in QuickTime format into a document as a linked file, you can also publish the document as a QuickTime movie.
  • Page 509 WAV audio (Windows) The WAV Export Movie option exports only the sound file of the current document to a single WAV file. You can specify the sound format of the new file. Select Sound Format to determine the sampling frequency, bit rate, and stereo or mono setting of the exported sound.
  • Page 510 Updating Flash content for Dreamweaver If you have Dreamweaver installed on your system, you can export Flash SWF files directly to a Dreamweaver site. For more information on working with Dreamweaver, see Using Dreamweaver. In Dreamweaver, you can add the Flash content to your page. With a single click, you can update the Flash document (FLA file) and reexport the updated Flash content automatically.
  • Page 511: Chapter 19: Creating Accessible Content

    You can create Flash content that is accessible to all users, including those with disabilities, using the accessibility features provided with Macromedia Flash 8 and Macromedia Flash Professional 8. As you design accessible Flash applications, consider how users might interact with the content.
  • Page 512: This Chapter Contains The Following Sections: Worldwide Accessibility Standards

    Worldwide accessibility standards ......... 512 Macromedia Flash Accessibility web page........513 Understanding screen reader technology.
  • Page 513: Macromedia Flash Accessibility Web Page

    For the latest information on creating and viewing accessible Flash content, including supported platforms, screen reader compatibility, articles, and accessible examples, consult the Macromedia Flash Accessibility web page at www.macromedia.com/go/flash_accessibility/. Understanding screen reader technology Screen readers are software applications designed to navigate through a website and read the web content aloud.
  • Page 514 Because different screen reader applications use varying methods to translate information into speech, the presentation of your content will vary according to each user. As you design accessible applications, remember that you have no control over how any screen reader will behave.
  • Page 515 Input text fields An input text object has a value, an optional name, a description string, and a keyboard shortcut string. As with dynamic text, an input text object’s name can come from a text object that is above or to the left of it. Buttons A button object has a state (pressed or not pressed), supports a programmatic default action that causes the button to depress momentarily, and can optionally have a name,...
  • Page 516: Using Flash To Enter Accessibility Information For Screen Readers

    Using Flash to enter accessibility information for screen readers Screen readers read aloud a description of the content, read text, and assist users as they navigate through the user interfaces of traditional applications such as menus, toolbars, dialog boxes, and input text fields. By default, the following objects are defined as accessible in all Flash documents and are included in the information that Flash Player provides to screen reader software: Dynamic text...
  • Page 517 All objects in Flash documents must have instance names for you to apply accessibility options to them. You create instance names for objects in the Property inspector. The instance name is used to refer to the object in ActionScript. To open the Accessibility panel: Select Window >...
  • Page 518 “Creating a tab order index for keyboard navigation in the Accessibility panel (Flash Professional only)” on page 526. For more information, see the Macromedia Flash Accessibility web page at www.macromedia.com/go/flash_accessibility/. Selecting names for buttons, text fields, and entire Flash applications You can use the Accessibility panel to assign names to buttons and input text fields so that they are identified appropriately by the screen reader.
  • Page 519 In the Accessibility panel, you can turn off automatic labeling if it is not appropriate for your document. You can also turn off automatic labeling for specific objects within your document. See “Turning off automatic labeling for an object and specifying a name” on page 521.
  • Page 520 To specify a name and description for a button, text field, or entire Flash application: Do one of the following: To provide a name for a button or text field, select the object on the Stage. To provide a name for an entire Flash application, deselect all objects on the Stage. Do one of the following: Select Window >...
  • Page 521 Movie clips Enter a name for the object. Enter a description in the Description text box. Select Make Child Objects Accessible to expose the objects inside the movie clip to screen readers. If your application can be described in a simple phrase of text that can be easily conveyed by a screen reader, turn off the Make Children Accessible option for your document, and type in a suitable description.
  • Page 522 If the text object is static text, convert it to dynamic text (in the Property inspector, select Dynamic Text from the Text type pop-up menu). In the Accessibility panel, deselect Make Object Accessible. Hiding an object from the screen reader You can hide an object from the screen reader simply by turning off accessibility for the object.
  • Page 523 Keyboard shortcut functionality also depends on the screen reader software used. Make sure to test your Flash content with multiple screen readers. The key combination Control+F, for example, is a reserved keystroke for both the browser and the screen reader. The arrow keys are also reserved by the screen reader.
  • Page 524 Keyboard shortcut example To create a keyboard shortcut, Control+7, for a button with the instance name myButton, you would do the following: Select the object on the Stage, display the Accessibility panel, and in the Shortcut field, type Control+7. Enter the following code in the Actions panel: function myOnPress() { trace( "hello"...
  • Page 525: Viewing And Creating Tab Order And Reading Order

    In the Accessibility panel, select Make Movie Accessible (the default setting) to expose the document to screen readers. Select or deselect the Make Children Accessible option to expose or omit any accessible objects in the document to screen readers. If you selected Make Movie Accessible in step 3, enter information for the document as needed: Enter a name for the document in the Name text box.
  • Page 526: Accessibility Panel (Flash Professional Only)

    Tab order You can create a tab order that determines the order in which objects receive input focus when users press the Tab key. You can use ActionScript to do this, or if you have Flash Professional 8, you can use the Accessibility panel to specify the tab order. Remember that the tab index that you assign in the Accessibility panel does not necessarily control the reading order.
  • Page 527 When you move user-defined tab indexed objects around in your document, or to another document, Flash retains the index attributes. You should then check for and resolve index conflicts (for example, two different objects on the Stage that have the same tab index number).
  • Page 528: About Animation And Accessibility For The Visually Impaired

    About animation and accessibility for the visually impaired In some situations, you may want to change the property of an accessible object during movie playback. For example, you might want to indicate changes that take place on a keyframe in an animation.
  • Page 529: Using Accessible Components

    Using accessible components To accelerate building accessible applications, Macromedia has built a core set of UI components. 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 530: Creating Accessibility With Actionscript

    Creating accessibility with ActionScript In addition to the accessibility features included in the Flash user interface, you can create accessible documents with ActionScript. For accessibility properties that apply to the entire document, you can create or modify a global variable called .
  • Page 531 When updating accessibility properties of multiple objects at once, you need to include only a single call to (too frequent updates to the screen reader Accessiblity.updateProperties can cause some screen readers to become too verbose). in the ActionScript 2.0 Language updateProperties (Accessibility.updateProperties method) Reference.
  • Page 532 Using ActionScript to create a tab order for accessible objects In addition to assigning a tab index to objects with the Accessibility panel (see “Creating a tab order index for keyboard navigation in the Accessibility panel (Flash Professional only)” on page 526), you can create the tab order with ActionScript by assigning the tabIndex property to the following objects:...
  • Page 533: Accessibility For Hearing-Impaired Users

    Caption SE for use with Flash. The white paper titled Captioning Multimedia with Hi- Caption SE for Use with Macromedia Flash MX explains how to use Hi-Caption SE and Flash together to create an a captioned document. The white paper is available on the Macromedia website on the Accessibility White Papers page at www.macromedia.com/...
  • Page 534 Creating Accessible Content...
  • Page 535: Chapter 20: Printing From Swf Files

    CHAPTER 20 Printing from SWF Files You can add printing functionality to your Macromedia Flash Basic 8 and Macromedia Flash Professional 8 document that lets users print from Flash Player. You can use the ActionScript PrintJob class, or you can use the ActionScript functions.
  • Page 536: Controlling Printing

    This chapter contains the following sections: Controlling printing............536 Supported printers .
  • Page 537: Supported Printers

    Supported printers With Flash Player, you can print to PostScript and non-PostScript printers. For a list of supported Flash Player printing platforms, see the “Macromedia Flash Player Web Printing FAQ” on the Macromedia website (www.macromedia.com/software/flash/open/webprinting/ faq.html). Using the ActionScript PrintJob class...
  • Page 538 To build a print job: Create an instance of the print job object: new PrintJob() Start the print job and display the print dialog box for the operating system: . For more information, see “Starting a print job” on page 539.
  • Page 539: Starting A Print Job

    Starting a print job Calling the method prompts Flash Player to spool the print job to the PrintJob.start() user’s operating system and also prompts the user’s operating system print dialog box to appear. If the user selects an option in the print dialog box to begin printing, the PrintJob.start( method returns a value of .
  • Page 540 Adding pages to a print job You add pages to your print job with the method. Although the PrintJob.addPage() method can include as many as four parameters, the only required parameter is target/ . The three optional parameters are , and level printArea options...
  • Page 541 , and values represent screen pixels relative to the target level or xMin xMax yMin yMax movie clip registration point. The print area orientation is from the upper left corner of the printable area on the page. If the print area is larger than the printable area on the page, then the print data that exceeds the right and bottom edge of the page is clipped.
  • Page 542 The following list further illustrates the relationship between units of measure. 1 pixel = 20 twips 1 point = 20 twips 72 pixels = 1 inch 72 points = 1 inch 567 twips = 1 cm 1440 twips = 1 inch To scale a movie clip before printing, set its MovieClip.xscale MovieClip.yscale...
  • Page 543: Printing Frames Independent Of The Printjob Class

    Sending the print job to the printer To send the print job to the printer after using the calls, use the addPage() method, which causes Flash Player to stop spooling the print job so that PrintJob.send() the printer starts printing. Deleting the print job After sending the print job to a printer, use the ActionScript function delete PrintJob()
  • Page 544 To designate printable frames: Open or make active the SWF file that you want to publish. Select the desired frame in the Timeline that you want to make printable and add a keyframe. In the Property inspector (Window > Properties), enter #p in the Label text box to specify the frame as printable.
  • Page 545 Specifying a print area (when not using the PrintJob object) By default, when frames are printed, the document file’s Stage determines the print area. Any object that extends off the Stage is clipped and does not print. Loaded movies use their own Stage size for the print area, not the main movie’s Stage size.
  • Page 546 Create a shape on the Stage the size of the desired print area. You can also select a frame with any object of the appropriate print area size to use that frame’s bounding box. Select the frame in the Timeline that contains the shape you want to use for the bounding box.
  • Page 547: Changing The Printed Background Color

    Changing the printed background color With Flash Player, you can print the background color set in the Document Properties dialog box. You can change the background color for only the frames to be printed by placing a colored object on the lowest layer of the Timeline being printed. To change the printed background color: Place a filled shape that covers the Stage on the lowest layer of the Timeline that will print.
  • Page 548: Printing From The Flash Player Context Menu

    To disable printing in the Flash Player context menu by dimming the Print command: Open or make active the Flash document (FLA file) that you want to publish. Select the first keyframe in the main Timeline. Select Window > Properties to view the Property inspector. In the Property inspector, for Label enter !#p to specify the frame as nonprinting.
  • Page 549 To print frames using the Flash Player context menu Print command: Open the document with frames you want to print. The command prints the frames labeled #p using the Stage for the print area or the specified bounding box. If you haven’t designated specific frames to print, all frames in the document main Timeline print.
  • Page 550: Publishing A Document With Printable Frames

    Publishing a document with printable frames You can publish a Flash document with printable frames to the web using the Publish command to generate the necessary Flash HTML templates. For more information, see “Publishing Flash documents” on page 459. Users must have Flash Player 4.0.25 (Windows) or 4.0.20 (Macintosh) or later to take advantage of any print functionality you have added and to print the designated frames in Flash.
  • Page 551: Chapter 21: Creating E-Learning Content

    CHAPTER 21 Creating E-learning Content Macromedia Flash Basic 8 and Macromedia Flash Professional 8 learning interactions help you create interactive online (e-learning) courses that run in Flash. Using the Flash learning interactions has many benefits: Anyone with a Flash-enabled web browser can use the instructional content you create.
  • Page 552: Getting Started With Flash Learning Interactions

    Getting started with Flash learning interactions Your e-learning courseware runs on any computer with Macromedia Flash Player 6 or later and a Flash-enabled web browser. To track user data from the Flash learning interactions, you must have a web server-side LMS, such as an AICC- or SCORM-compatible system.
  • Page 553: Including A Flash Learning Interaction In A Document

    Including a Flash learning interaction in a document You can use either quiz templates or stand-alone interactions in your Flash documents: The quiz templates are designed for scenarios in which interaction-based quizzes are required or tracking is necessary. The quiz learning interactions are graphically designed to fit into the quiz format.
  • Page 554 To create a quiz: Create a new file by selecting File > New. In the New from Template window, select the Templates tab. In the Category column, select Quiz; then in the Templates column, select one of the quiz styles. Setting the quiz parameters After you create a new file and select one of the quiz templates, the next step is to set the quiz parameters.
  • Page 555 To set quiz parameters: Select the Quiz Options component with instructions to the left of the Stage in the quiz template. The component lets you set the parameters for the quiz. These instructions do not appear in the SWF file. Do one of the following to open the Component inspector: Select Window >...
  • Page 556 Select Randomize if you want the quiz questions to be presented in a random order and not necessarily in the order in which they appear in the Timeline. In the Questions to Ask text box, specify the number of questions to ask for one presentation of the quiz.
  • Page 557 Modifying learning interactions in a quiz Each question in the quiz is considered an interaction. When you use a quiz template, you place interactions sequentially between the first and last frame of the Interactions layer on the root Timeline. You may add or remove frames and keyframes as needed, as long as the interactions remain sequential and the first and last frames are reserved for the Welcome page and Results page.
  • Page 558 Configuring a Learning Interaction component Included with each quiz template is one of each of the six learning interaction types, stored in movie clips in the library. These movie clips are simply containers for the collection of elements that make up each interaction. When you add an interaction (movie clip) to the Stage, you must break it apart to edit the individual objects.
  • Page 559 In the Property inspector, click Launch Component Inspector. If the Flash application will send tracking information to a server-side LMS, specify a name for the interaction in the Interaction ID text box. You should uniquely name each interaction in the quiz as specified by your LMS. Each interaction in the quiz templates is uniquely named.
  • Page 560 At the bottom of the Component inspector, click Options and enter feedback and Knowledge Track parameters for the learning interaction. See “Adding, naming, and registering assets” on page 576, “Setting Knowledge Track options for a learning interaction” on page 583, and “Setting navigation options for a learning interaction”...
  • Page 561 On the Interactions layer, select the frame you added and select Insert > Timeline > Blank Keyframe. To add an interaction, do one of the following: To copy and paste an interaction that already exists in the Timeline, right-click (Windows) or Control-click (Macintosh) the keyframe with the interaction and select Copy Frames.
  • Page 562 To add a stand-alone learning interaction to the Timeline when not using a quiz template: If you are adding interactions to a document that does not use the quiz template, select the appropriate layer, and then select Insert > Timeline > Blank Keyframe. Select Window >...
  • Page 563 About managing library assets for learning interactions When you drag a learning interaction from the Learning Interactions common library to the Stage, the symbols that comprise the learning interaction are copied from the common library to the library of the Flash document you are creating. For example, if you copy a Hot Object learning interaction from the Learning Interactions common library to your document, the symbols in the following illustration become part of the document library.
  • Page 564: Changing The Appearance Of A Learning Interaction

    To remove an interaction from the Timeline: On the Interactions layer, select the keyframe containing the interaction to be deleted. Shift-select the same frame number on other layers if you want to also delete those frames. To delete frames across all layers, do one of the following: Right-click (Windows) or Control-click (Macintosh) the keyframe and select Remove Frames.
  • Page 565 Changing the images in a graphical learning interaction For Drag and Drop, Hot Spot, and Hot Object learning interactions, you change the appearance of the graphic distractors (the selectable choices) in the interaction to suit the purposes of your course. To change the images in a graphical learning interaction: If it has not been broken apart, select the learning interaction movie clip and the select Modify >...
  • Page 566 Sizing The Button components used for the Control button and Reset button can be scaled to fit your needs, as can the CheckBox, RadioButton, and TextInput components. To set the width and height of the Button, CheckBox, and RadioButton components: Select the component and change its settings in the Property inspector.
  • Page 567: Testing A Quiz

    Testing a quiz It is important to test a quiz frequently as you add and remove interactions. To test a quiz: Select Control > Test Movie. The quiz appears in the Flash Player window. Answer the questions as they appear. When you complete the quiz, close it in the Flash Player window to return to the workspace in which you edit the document.
  • Page 568 In the Drag Object Name column, list the instance names for the Drag objects on the Stage. Each Drag object must have a unique name. If you add a new Drag object on the Stage, make sure to enter its name here. In the Matches Target Name column, list the matching target instance name for that Drag object.
  • Page 569 To remove a Drag and Drop object: Select the Drag and Drop instance that you want to remove, and delete it from the Stage. Select the Drag and Drop component (to the left of the Stage in the quiz template), and then display the Component inspector by opening it from the Property inspector, if necessary.
  • Page 570 In the Component inspector, do one of the following to enter one to three possible correct answers: Type the text for the responses that the user can enter that are considered correct responses. Select the Correct option to the right of the correct responses. To set up the interaction to accept all responses except those you type, enter the invalid responses in the list and deselect the Correct option to the right of them.
  • Page 571 Configuring a Hot Object interaction The Hot Object interaction accepts one to eight hot objects. The default sample uses six hot objects. To configure a Hot Object interaction: If you are not using a quiz template, place the learning interaction on the Stage. If you are using a quiz template, select the frame on the Interactions layer that contains the Hot Object interaction (Frame 5, if you have not added or removed keyframes).
  • Page 572 Adding and removing hot object distractors You can change the default number of six distractors (choices) by adding more distractors or deleting existing distrators. You can include from one to eight hot object distractors in a Hot Object learning interaction. To add a hot object distractor: Create a movie clip symbol containing the graphics for the hot object distractor.
  • Page 573 Configuring a Hot Spot interaction The Hot Spot learning interaction sets up an interaction in which the user responds by clicking an object (or objects) onscreen. An example of a Hot Spot interaction created with the quiz template To configure a Hot Spot interaction: If you are not using a quiz template, place the learning interaction on the Stage.
  • Page 574 Adding and removing hot spot distractors You can include from one to eight distractors (choices) in a Hot Spot learning interaction. You can change the default number of six distractors by adding more distractors or deleting existing distrators. In general, you place the hot spot distractors over another graphic that the user is really intended to see.
  • Page 575 To configure a Multiple Choice interaction: If you are not using a quiz template, place the learning interaction on the Stage. If you are using a quiz template, select the frame on the Interactions layer that contains the Multiple Choice interaction (Frame 6, if you have not added or removed keyframes). Break the movie clip apart (Modify >...
  • Page 576: Adding, Naming, And Registering Assets

    Configuring a True or False interaction In a True or False interaction, the user responds with an answer of either True or False. To configure a True or False interaction: If you are not using a quiz template, place the learning interaction on the Stage. If you are using a quiz template, select the frame on the Interactions layer that contains the True or False interaction (Frame 7, if you have not added or removed keyframes).
  • Page 577 If you have experience handling and naming graphics, you can enter your own instance names for the graphic assets on the Stage. You do not need to use the movie clip containers or the templates—instead, you can add your own assets to the Stage, add a Learning Interaction component to the Stage, and then register the assets’...
  • Page 578 Naming dynamic text fields If you have more than one of any type of learning interaction in a quiz—for example, if you have two Drag and Drop learning interactions—the objects in each learning interaction must have unique names. These new unique instance names need to be registered in the Component inspector for the learning interaction.
  • Page 579 Naming and registering graphic distractors Graphic distractors such as Drag objects, Target objects, hot spots, and hot objects must be named uniquely across all interactions. This means that in a file with two Drag and Drop interactions, each containing four Drag objects, each of the eight Drag objects in the file must be named uniquely.
  • Page 580 Drag and Drop learning interaction asset names Asset Description Object type Instance name Question text field Holds question text Dynamic text field Template_Question Feedback text field Holds feedback text Dynamic text field Template_Feedback Control button Submits user Flash UI Button Template_ControlButton response and controls component...
  • Page 581 Hot Spot learning interaction asset names Asset Description Object type Instance name Question text field Holds question text Dynamic text field Template_Question Feedback text field Holds feedback text Dynamic text field Template_Feedback Control button Submits user response Flash UI Button Template_ControlButton and controls navigation component...
  • Page 582: Setting Feedback Options For A Learning Interaction

    Setting feedback options for a learning interaction Feedback options control the text that the user sees before and while responding to an interaction. To set feedback options for an interaction: Select the interaction component (to the left of the Stage in the quiz template). If the Component inspector is not already visible, open it from the Property inspector;...
  • Page 583: Setting Knowledge Track Options For A Learning Interaction

    Setting Knowledge Track options for a learning interaction Knowledge Track is an automatic data-tracking feature that lets you transmit student performance data to a LMS, such as Lotus LearningSpace, or to other back-end tracking systems. Knowledge Track works with both AICC- and SCORM-compliant learning management systems.
  • Page 584: Setting Navigation Options For A Learning Interaction

    To set Knowledge Track options for an interaction: Select the Learning Interaction component to the left of the Stage in the quiz template. If the Component inspector is not already visible, open it from the Property inspector, and then click Options at the bottom of the panel. Select Knowledge Track if you are using the learning interaction in a document created using a quiz template and you want the learning interaction to send data to a server-side learning management database.
  • Page 585: Setting Control Button Labels For A Learning Interaction

    Under Navigation, specify how the interaction proceeds after the user submits a response for this interaction: Select Off to disable navigation. Select this option if you are using the quiz templates, because the templates include their own navigation. Select Next Button to require that the user click a Next button after submitting a response.
  • Page 586: Management Systems

    Tracking to AICC- or SCORM-compliant learning management systems The Flash learning interactions and quiz templates allow easy communication with both AICC- and SCORM-compliant LMSs. The code built into both the Flash documents and the corresponding HTML/JavaScript files send properly formatted data to the LMS. The stand-alone interactions send question data, while the quiz templates track the score and time spent overall.
  • Page 587 The content is located on a web server (for example, http://myserver/flashcontent.htm). To track properly, the Flash file needs to be embedded in the Flash AICC tracking frameset. “Preparing Flash learning interactions for web hosting” on page 588. Communication with the LMS, and data tracking, is not exposed to your user. The LMS creates two parameters that are appended to the end of the URL: AICC_URL and AICC_SID.
  • Page 588 Preparing Flash learning interactions for web hosting In order for web users to see your Flash application, you need to embed it into a web page. The steps to prepare AICC- and SCORM-compliant files for web hosting are slightly different and are covered in the following two sections. Preparing an AICC-compliant learning interaction for web hosting To send tracking data to an AICC-compliant LMS, you need to enable tracking for the quiz...
  • Page 589 Open the new copy of the frameset.htm file in a text editor. The following lines are found in the frameset.htm file: <frameset frameborder="0" border="0" framespacing="0" rows="*,1"> <frame src="Untitled-1.htm" name="content" frameborder="0"> <frame src="results.htm" name="cmiresults" scrolling="0" frameborder="0"> In the second line, change to the name of the HTML file you published Untitled-1.htm in Flash (typically the HTML filename specified in the formats Tab of Publish Settings).
  • Page 590: Extending Learning Interaction Scripts

    Extending learning interaction scripts The information in this section is intended for intermediate and advanced developers who want to extend the interaction capabilities. The Flash learning interactions use an organized data structure to store and retrieve information about each interaction session. This data structure powers the evaluations and provides new possibilities for developers wanting to extend tracking features.
  • Page 591 Tracking properties available in the SessionArray The property names reference standard interaction tracking values for both AICC and SCORM LMSs. You can retrieve an interaction’s properties by referencing its location in the following command: SessionArray[n].[property_name] For example, to reference the value for interaction #1, you would use the interaction_id following command:...
  • Page 592 Basic structure of the Learning Interaction scripts and components Now that you know how the interaction data are stored and retrieved, here’s a little more information to complete the picture. The Learning Interaction components are really the center of the e-learning setup. They collect user parameters and build the SessionArray and the interaction event handling functions on the level of the interaction assets.
  • Page 593: Appendix A: Using Templates

    APPENDIX A Using Templates Macromedia Flash Basic 8 and Flash Professional 8 come with several templates to help you get started. This appendix contains information on how to use templates. Using templates Flash is equipped with several templates to help streamline your work. See the following sections for information about how to use each template: “Using advertising templates ”...
  • Page 594 Internet advertising experience. Visit the MFAA and participate in the ongoing discussion at the Macromedia Flash Advertising Alliance website at www.mfaa.org.
  • Page 595 Flash Professional 8 lets you creatively use and deploy video in your Flash projects. The ability to play back external Flash Video (FLV) files enables authors to use video in more projects that can be viewable by wider audiences. The video templates provided with Flash Professional 8 can help you create video presentations and user interfaces for selecting from multiple bandwidth-tuned streams of video.
  • Page 596 Using the Video Presentation template (Flash Professional only) The Video Presentation template uses slides, media components, and behaviors to create a self-running presentation that progresses according to cues from the video playback. Video presentations are great for self-running demos, kiosks, or presentations to audiences over the web.
  • Page 597 JPEGs typically work best for photographs. For best results, save your photos as JPEGs using an image-editing program such as Macromedia Fireworks. Each image should have a size of 640 x 480 pixels and should be named in a numbered sequence.
  • Page 598 Using autoplay mode with the Photo Slideshow template The Photo Slideshow template also has a built-in autoplay mode that automatically changes the photo after a set delay. The template is set to a default delay time of 4 seconds, but you can change this setting easily.
  • Page 599 Presenting your slides Use the controls at the bottom of the application or your keyboard’s arrow keys to move between slides during your presentation. Press the Left Arrow and Right Arrow keys to move to the corresponding previous and next slides; press the Up Arrow and Down Arrow keys to jump to the first and last slides.
  • Page 600 To create a slide: Create a new file using one of the screen presentation templates. To add new slides to the presentation, do one of the following actions: Select Insert > Screen. Press Enter. Click the Plus (+) button in the header of the Screen Outline pane. Right-click to open the context menu, and select Insert Screen.
  • Page 601 The skins are on guide layers and won’t export with your content or appear at runtime. For more information on authoring Flash files for mobile devices, see the Macromedia Mobile Devices site at www.macromedia.com/devnet/devices/.
  • Page 602 Query-Error-Response template (Flash Professional only) The Query-Error-Response template helps you create applications that perform a simple query to a remote data source, and then, depending on the outcome, display the results in a response form or show an error on an error form. This type of application is useful when performing queries on web services because they are structured as a simple query/response transaction.
  • Page 603 To customize the Response form: Select the Response form in the Screen Outline pane. Use components to create fields that will show the results. For example, if your service is a weather service that returns temperature, you could use a label component to create a non-editable text display.
  • Page 604 Modifying and adding window content Window content is created on subforms of the Application form. The template comes with four forms: a calendar, a DataGrid component showing simulated inbox content, a scroll pane showing an image, and a login form. To modify window content: Select any form in the outline and replace the contents with components of your choice.
  • Page 605: Appendix B: Xml To Ui

    APPENDIX B XML to UI Macromedia Flash Basic 8 and Flash Professional 8 come with several extensibility features including Behaviors, Commands (JavaScript API), Effects, and Tools. With these features, advanced users can extend or automate the authoring tool’s functionality. The XML to UI engine works with each of these extensibility features to create dialog boxes that the user sees if the extension either requires or accepts parameters.
  • Page 606: Layout Tag Summary For Xml To Ui Dialog Boxes

    Layout tag summary for XML to UI dialog boxes The following tags are used for dialog box layout: Description Creates one column in a tabular grid layout. <column> Creates a container tag for the <column> tags in a tabular grid layout. <columns>...
  • Page 607: Control Tag Summary For Xml To Ui Dialog Boxes

    Control tag summary for XML to UI dialog boxes The following XML tags are used to create controls: Description Creates a button control. <button> Creates a check box control. <checkbox> Creates a file chooser control (this is not part of the XUL standard). <choosefile>...
  • Page 608 <column> Availability Flash MX 2004. Usage <column> child tags </column> Attributes None. Child tags Control tags. Parent tag <columns> Description Layout tag; creates one column in a tabular grid layout. The column tag must be within a tag, which must be within a tag.
  • Page 609 Child tags <column> Parent tag <grid> Description Layout tag; creates a container tag for the tags in a tabular grid layout. The <column> tag must be within a tag. <columns> <grid> Example See the example for <grid> <dialog> Availability Flash MX 2004. Usage <dialog id = "myID"...
  • Page 610 Example For an example that uses the tag with the tags, see the <dialog> <hbox> <vbox> examples in . For an example that uses the tag with the <hbox> <vbox> <dialog> <grid> tag, see the example in <grid> <grid> Availability Flash MX 2004.
  • Page 611 Example The following example uses the <grid>, <columns> and <rows> tags to define a dialog box. To see how this dialog box works with a JavaScript API command, see the example for <menulist> <dialog id="scale-dialog" title="Scale Selection" buttons="accept, cancel"> <grid> <columns>...
  • Page 612 Description Layout tag; creates a container for items laid out horizontally. All layout objects defined within <hbox> tags are arranged horizontally with respect to one another. By default, each layout object is evenly spaced, but this setting can be altered with the tag.
  • Page 613 <row> Availability Flash MX 2004. Usage <row> child tags </row> Attributes None. Child tags Control tags. Parent tag <rows> Description Layout tag; creates one row in a tabular grid layout. The row tag must be within a tag, <rows> which must be within a tag.
  • Page 614 Example The following example uses the <row> tag to help define a dialog box. To see how this dialog box works with a JavaScript API command, see the example for <menulist> <dialog id="scale-dialog" title="Scale Selection" buttons="accept, cancel"> <grid> <columns> <column/> <column/>...
  • Page 615 Description Layout tag; creates a container tag for the row tags in a tabular grid layout. The columns tag must be within a tag. <grid> Example The following example uses the <grid>, <columns> and <rows> tags to define a dialog box. To see how this dialog box works with a JavaScript API command, see the example for <menulist>...
  • Page 616 Description Layout tag; creates a separator bar that displays vertically in an <hbox> and horizontally in a <vbox>. Example The following example adds a separator bar to the Labeled Frame Cuepoint Navigation behavior dialog box. The current dialog box, which comes with Flash MX 2004, is defined in the file CuePointNamedFrame.xml.
  • Page 617 The following example adds a separator bar and removes the tags: <hbox> <dialog id="NamedFrameCuePointDialog" title="Labeled Frame CuePoint Navigation" buttons="accept, cancel"> <vbox> <label value="Select clip with labeled frames:" control="target" required="true" /> <targetlist id="target" class="movieclip" /> <separator/> <checkbox id="stop" label="gotoAndStop? (vs gotoAndPlay)" checked="false"...
  • Page 618 Parent tag <column> <hbox> <row> <vbox> Description Layout tag; creates a transparent fill space used to arrange controls. Example The following example uses the JavaScript API to create a simple command that sends selected values to the Output Panel. Create the files, as described in this section, and place them in the Commands folder in your user-level configuration folder.
  • Page 619 command now appears on the Commands menu. If you select the Trace Selections command from the Commands menu, the dialog box defined by Trace Trace Selections Selections.xml appears, as shown in the following figure: Finally, add the tag to the Trace Selections.xml file: <spacer/>...
  • Page 620 <vbox> Availability Flash MX 2004. Usage <vbox> child tags </vbox> Attributes None. Child tags , control tags <hbox> <vbox> Parent tag <grid> Description Layout tag; creates a container for items laid out vertically. XML to UI...
  • Page 621 Example The following example redefines the -based dialog box used in the <grid> <popupslider> example with tags instead: <vbox> <hbox> <dialog id="skew-dialog" title="Skew Selection" buttons="accept, cancel"> <vbox> <hbox> <label value="Skew x: " control="xSkew" align="left"/> <popupslider id="xSkew" minvalue="-180" maxvalue="180"/> </hbox> <hbox> <label value="Skew y:"...
  • Page 622 <button> Availability Flash MX 2004. Usage <button id=”myID” label=”myLabel” tabindex=”myIdx” accesskey=”myChar”/> Attributes String; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. String; text that appears on the button. label Number;...
  • Page 623 First, create a file named button.jsfl and place it in your Commands folder. Place the following code into the file and save the file: // Create an XML to UI dialog box using the XML definition // in the button.xml file var buttonDlg = fl.getDocumentDOM().xmlPanel( fl.configURI + "Commands/ button.xml"...
  • Page 624 <checkbox> Availability Flash MX 2004. Usage <checkbox id=”myID” label=”myLabel” tabindex=”myIdx” checked=”true|false” accesskey=”myChar”/> Attributes String; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. String; text that appears next to the check box. label Number;...
  • Page 625 Example The following example is excerpted from the Labeled Frame CuePoint Navigation behavior definition file: <dialog id="NamedFrameCuePointDialog" title="Labeled Frame CuePoint Navigation" buttons="accept, cancel"> <vbox> <hbox> <label value="Select clip with labeled frames:" control="target"/> <targetlist id="target" class="movieclip" /> </hbox> <hbox> <checkbox id="stop" label="gotoAndStop? (vs gotoAndPlay)" checked="false"...
  • Page 626 Number; an integer that sets the width of the input field using the average character size width. Number; an integer used to set the control’s position in the tab order (available tabindex only on Windows). String; can be either type "open"...
  • Page 627 Second, create a file named choosefile.xml and place it in your Commands folder. Place the following code into the file and save the file: <?xml version="1.0"?> <dialog id="choosefile-dialog" title="Choose File Example" buttons="accept, cancel"> <vbox> <label value="Please select a file: "/> <choosefile id="choosefileControl"...
  • Page 628 Description Control tag; Creates a color picker control (this is not part of the XUL standard). This tag is specific to Flash and is not a part of the XUL tag set. Example The following example uses the JavaScript API to create a new command that appears on the Commands menu.
  • Page 629 command now appears on the Commands menu. If you have a Flash setcolor document open, draw a shape on the Stage and select the command from the setcolor Commands menu. The dialog box defined by setcolor.xml appears, as shown in the following figure: <flash>...
  • Page 630 Description Control tag; creates a container for an embedded SWF file (this is not part of the XUL standard). The xmlui object in the JavaScript API allows getting and setting of parameter values in the embedded SWF file. Example The following example is excerpted from the blur.xml file, which defines the dialog box for the Blur Timeline Effect.
  • Page 631 Child tags None. Parent tag <dialog>, <hbox>, <row> <vbox> Description Control tag; creates a text label that can be associated with another control. Example The following example is excerpted from the HideScreen.xml file, which defines the Hide Screen Behavior. <dialog id="SelectScreenDialog" title="Select Screen" buttons="accept, cancel">...
  • Page 632 Attributes String; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. Number; an integer representing the number of rows to display in the listbox. rows Number; an integer used to set the control’s position in the tab order (available tabindex only on Windows).
  • Page 633 First, create a file named skewlist.jsfl and place it in your Commands folder. Place the following code into the file and save the file: // Create an XML to UI dialog box using the XML definition in the skew.xml file var skewlistDlg = fl.getDocumentDOM().xmlPanel( fl.configURI + "Commands/ skewlist.xml"...
  • Page 634 Second, create a file named skewlist.xml and place it in your Commands folder. Place the following code into the file and save the file: <dialog id="skewlist-dialog" title="Skew Selection" buttons="accept, cancel"> <grid> <columns> <column/> <column/> </columns> <rows> <row align="left"> <label value="Skew x: " control="xSkew" align="left"/> <popupslider id="xSkew"...
  • Page 635 <listitem> Availability Flash MX 2004. Usage <listitem label="mylabel" value="myValue"/> Attributes String; text that appears in the listbox for that item. label String; text that is returned if the user selects the item. If not set, the value of the value attribute is returned.
  • Page 636 <menulist> Availability Flash MX 2004. Usage <menulist id="myID" tabindex="myIdx"> <menupop> <menuitem/> <menuitem/> </menupop> </menulist> Attributes String; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. Number; an integer used to set the control’s position in the tab order (available tabindex only on Windows).
  • Page 637 Parent tag <dialog>, <hbox>, <row> <vbox> Description Control tag; creates a pop-up menu control that contains tags. <menupop> <menuitem> Example The following example uses the JavaScript API to create a new Convert to Symbol command that appears on the Commands menu. This command is a simple version of the Convert to Symbol dialog box that is on the Modify menu.
  • Page 638 Second, create a file named Convert to Symbol.xml and place it in your Commands folder. Place the following code into the file and save the file: <dialog id="convertToSymbolDlg" title="Convert to Symbol" buttons="accept, cancel"> <grid> <columns> <column/> <column/> </columns> <rows> <row align="right"> <label value="Name: "...
  • Page 639 command now appears on the Commands menu. Draw a shape on Convert to Symbol the Stage, and select it with the pointer tool. If you then select the Convert to Symbol command from the Commands menu, the dialog box defined by Convert to Symbol.xml appears, as shown in the following figure: <menupop>...
  • Page 640 Description Control tag; creates the pop-up menu of a pop-up menu control, and must contain at least tag. <menuitem> Example The following example creates a pop-up menu control with eight elements. To see the XML definition of the entire dialog box, see the example for <menulist>...
  • Page 641 Attributes String; text that appears in the pop-up menu for that item. label String; text that is returned if the user selects the item. If not set, the value of the value attribute is returned. label Child tags None. Parent tag <menupop>...
  • Page 642 <popupslider> Availability Flash MX 2004. Usage <popupslider id="myLabel" tabindex="" minvalue="" maxvalue=""/> Attributes String; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. Number; an integer that represents the control’s position in the tab order tabindex (available only on Windows).
  • Page 643 First, create a file named skew.jsfl and place it in your Commands folder. Place the following code into the file and save the file: // Create an XML to UI dialog box using the XML definition in the skew.xml file var skewDlg = fl.getDocumentDOM().xmlPanel( fl.configURI + "Commands/ skew.xml"...
  • Page 644 Second, create a file named skew.xml and place it in your Commands folder. Place the following code into the file and save the file: <dialog id="skew-dialog" title="Skew Selection" buttons="accept, cancel"> <grid> <columns> <column/> <column/> </columns> <rows> <row align="left"> <label value="Skew x: " control="xSkew" align="left"/> <popupslider id="xSkew"...
  • Page 645 <property> Category Flash MX 2004. Usage <property id="myID"/> Attributes String; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. Child tags None. Parent tag <flash> Description Control tag; creates a custom property in an embedded SWF file; used with the <flash> tag. This tag is used to declare properties that are specific to a SWF file that is embedded in an XML to UI dialog box.
  • Page 646 Attributes String; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. String; defines a string that appears above the group of radio buttons. label Boolean value; if , the entire group of radio buttons have a border around groupbox true...
  • Page 647 Attributes Text that appears next to the radio button. label Boolean value; if it makes the radio button the default selection in the selected true, radio group. String; a character to be used for the keyboard shortcut for this control accesskey (available only on Windows).
  • Page 648 Attributes String; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. The class or classes for which to list instances. class Boolean value; if , the OK button cannot function until a value is entered required true for this control;...
  • Page 649 <textbox> Availability Flash MX 2004. Usage <textbox id = "myID" literal = "true|false" maxlength = "myLength" multiline = "true|false" size = "mySize" tabindex = "myIdx" value = "myValue"/> Attributes String; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns.
  • Page 650 Example The following example uses the JavaScript API to create a new command that appears on the Commands menu. Create two files, as described in this section, and place them in your Commands folder in your user-level configuration folder. For more information, see “Configuration folders installed with Flash”...
  • Page 651: About The Configuration Folders

    <rows> <row align="center"> <label value="Scale x: " control="xScale"/> <textbox id="xScale"/> </row> <row align="center"> <label value="Scale y:" control="yScale"/> <textbox id="yScale" /> </row> </rows> </grid> </dialog> command now appears on the Commands menu. Draw a shape on the Stage and scale select it with the pointer tool. If you select the command from the Commands menu, scale the dialog box defined by scale.xml appears, as shown in the following figure:...
  • Page 652 Application Level Configuration Directories The Application configuration folders are: File/folder name Contents authplay.dll/ External Macromedia Flash Player for use within the authoring tool authplaylib (test movie, debug movie) Components* Location of compiled component SWC files that drive the Component panel.
  • Page 653 File/folder name Contents Libraries* Location of FLA source files that drive the Window > Common Libraries menu. Templates* Location of FLA source files that drive the File > New from Template... dialog. These folders/files can exist in both the Application Data configuration and User configuration folders.
  • Page 654 Video Contains the video encoding profiles. WindowSWF Macromedia Flash content used within the Window menu. These folders/files can exist in both the Application Data configuration and User configuration folders. User Level configuration has precedence when there are identical file names in both folders. The Extension Manager installs files to the User configuration...
  • Page 655: Index

    Actions toolbox instance names and 517 adding an action with 329 keyboard navigation for 533 resizing 330 Macromedia Flash Accessibility web page 513 viewing item descriptions in 329 for movie clip children 521 ActionScript naming buttons and text fields for 519...
  • Page 656 Adobe Illustrator files frame-by-frame 264 exporting 503 frames in Timeline 250 importing 198 graphics compared to movie clips 93 Adobe Photoshop files inserting frames 265 exporting 502 linking layers to a motion path 258 importing 194 modifying or deleting frames in the Timeline 265 ADPCM compression, for sounds 322 motion paths for 257 Advanced effect, for symbol instances 92...
  • Page 657 automating tasks 58 importing 200 AVI files, exporting 509 importing with the Clipboard 214 Aviation Industry CBT Committee, tracking to a modifying filled areas 205 compliant LMS 586 preserving transparency when importing 192 setting compression options for 202 setting properties for 202 Bitmap Properties dialog box 202 bitmaps, finding and replacing 53 background color 25...
  • Page 658 button symbols 79 Color Swatches panel buttons Add Colors option 127 accessible descriptions for 520 Clear Colors option 125 accessible labels for 518 loading default palette 126 adding sounds to 315 modifying color palettes and 125 creating 86 Replace Colors option 127 disabling and enabling 88 Save as Default option 126 disjoint rollover 88...
  • Page 659 compiled clip, in Library panel 31 drawing, with Pen tool 140 Component inspector optimizing 149 Bindings tab 403 straightening and smoothing 147 Drag and Drop interactions and 567 Custom color palette 472 feedback options and 582 Custom Ease in/Ease Out dialog box 258 Fill in the Blank interactions and 569 Custom option, for sound 314 Hot Object interactions and 571...
  • Page 660 Distribute to Layers command 253 ruler units, setting 24 distributing saving as template 26 Flash SWF files 456 saving Flash 25 objects to layers 253 saving in Flash MX format 26 objects to top, bottom, left, right, or center 222 saving when quitting 27 dithering colors, GIF files 471, 474 screen hierarchy 337...
  • Page 661 Pencil tool 136 Edit Multiple Frames button 267 pixels, snapping to 152 Edit Selected command 211 polygons and stars 138 Edit Symbols command 90 precise lines and curves 138 editing Punch command 135 imported bitmap images 204 reshaping lines and shapes 146 reshaping lines and shapes 146 rounded rectangles 137 softening edges of an object 151...
  • Page 662 files finding and replacing closing, in projects 73 bitmaps 53 deleting, in projects 71 colors 51 finding missing, in projects 73 fonts 50 importing 193 sound 53 moving and opening, in projects 71 text 49 opening, with version control 75 video 53 saving, in projects 72 Fireworks PNG files, importing 195...
  • Page 663 folders exporting as static images 501 in Library panel 33 images, registering in 266 renaming, in projects 73 inserting 265 working with projects 71 keyframes, converting into 266 font symbol multiple, editing 267 identifier string for 173 onion skinning 266 Linkage option for 173 pasting 265 fonts...
  • Page 664 graphic object, converting to a symbol 32 publishing templates 481 graphic symbols tag reference 488 about 79 templates 482 controlling with behaviors 94 HTML Alignment publish setting 467 graphics hyperlinks, viewing in Flash Player 63 creating symbol instances 85 load behavior 95 setting animation options 93 grayscale images, in imported FreeHand files 197 identifiers, assigning to sounds 203, 316...
  • Page 665 Instance Properties dialog box 91 motion tweening 257 instances, symbol removing 265 behavior, changing 93 selecting everything between two 209 behaviors 94 shape tweening 261 breaking apart 222 sounds, associating with 320 color and transparency, changing 91 tweened frame sequences, dragging in 266 creating 85 tweening 248 defined 77...
  • Page 666 33 Macromedia Authorware, playing a Flash SWF file in using 31 using an item in another document 32 Macromedia Director, playing a Flash SWF file in 456 using folders in 33 Macromedia Fireworks wide display of 32...
  • Page 667 MENU parameter publish settings 466 MIME types compression, for sound 323 configuring for 458 sounds, importing 312 Flash Player 499 MSAA (Microsoft Active Accessibility) 514 mobile devices, templates 601 multilanguage text Modify Onion Markers button 267 creating with Strings panel 370 morphing 261 encoding language 364 Motion Guide command 257...
  • Page 668 erasing 149 flipping 221 Page Setup command (Windows only) 68 grouping 211 Paint Bucket tool hiding from screen readers 521 applying fills with 120 making accessible 517 Gap Size modifier 121 matching size 222 Lock Fill modifier 124 modifying with Envelope modifier 219 painting moving 212 closing gaps with the Paint Bucket tool 121...
  • Page 669 pointer 139 PrintJob preferences 139 addPage method 540 using 138 object and class 535 Pencil tool orientation property 539 drawing modes 136 pageHeight property 539 drawing with 136 pageWidth property 539 smoothing curves 154 paperHeight property 539 straightening lines 154 paperWidth property 539 Photo Slideshow template 597 send() method 543...
  • Page 670 Publish command 459 Recognize Shapes preference 154 Publish Preview command 498 Rectangle tool publish profiles, for projects 72 about 137 publish settings Round Rectangle modifier 137 file formats created 459 Redo command 53 generating HTML 464 redoing steps with the History panel 55 projectors 459 registering images from frame to frame 266 publishing...
  • Page 671 SCORM communication overview 587 salign parameter 495 preparing compliant learning interactions for web SALIGN parameter publish settings 467 hosting 589 Sample Rate tracking quiz results 583 for ADPCM sound compression 323 tracking to a compliant LMS 586 for raw sound compression 324 Screen Outline pane Save and Compact command 58 about 342...
  • Page 672 form screens 339 selectable text 172 fully rendering content 352 selecting instance name 358 adding to a selection 209 instance name, viewing and changing 347 connected lines 208 Movie Explorer and 357 deselecting 209 moving 353 everything between two keyframes 209 moving a child screen on the Stage 348 everything in a scene 209 multiple, selecting 352...
  • Page 673 Shareable Content Object Reference Model. See sounds SCORM in accessible applications 525 shared libraries ADPCM compression 322 adding sounds to 203, 316 buttons, adding to 315 font symbols 173 compressing for export 321 using assets 104 compression menu options 322 shared library assets controls, editing for 317 during authoring, about 104...
  • Page 674 stand-alone Flash Player 498 substitute fonts Start Dragging Movieclip behavior 95 deleting 182 Start option, for sound 315 specifying 181 statements, reordering 329 turning off alert 182 static images, exporting frames as 501 viewing 181 static text Sun AU files, importing 312 changing to dynamic text for accessibility 521 Swap Symbol dialog box 93 creating 162...
  • Page 675 Clipboard, importing with 213 color, choosing 167 tab order creating 162 about 525 device fonts 160 in Accessibility panel 526 device fonts, selecting 172 in ActionScript 532 dynamic text options 183 default for accessibility 525 dynamically formatting 186 viewing 527 editing 174 tabs, for multiple documents 25 embedded fonts 160...
  • Page 676 text fields Timeline frames creating and removing dynamically 184 copying and pasting 265 naming for accessibility 520 deleting 265 rich text formatting in 178 dragging 265 setting properties dynamically 185 Tint effect 92 triggering scripts with events 188 Tint instance property 92 text fonts tolerance, for snapping to objects 154 choosing 167...
  • Page 677 transparent windowless mode, and accessibility 514 editing sites 75 True or False interaction opening a file 75 asset names 581 troubleshooting remote folder setup 75 configuring in the Component inspector 576 vertical text tweened frames, dragging keyframes in 266 creating 162 tweening flow 165 about 248...
  • Page 678 Web Snap Adaptive color palette 472 web-safe color palette 126 WebServiceConnector component about 413 lazy decoding 452 weight, for lines 116 width attribute 465, 491 window, opening new 24 Windows Metafile files exporting 509 importing 194 wmode attribute/parameter 496, 497 WSDL file 413 XLIFF 377 XML data sources, schemas for 416...

This manual is also suitable for:

Flash 8

Table of Contents