MACROMEDIA FLASH 8-USING FLASH Using Manual

Summary of FLASH 8-USING FLASH

  • Page 1

    Using flash.

  • Page 2

    Trademarks 1 step robopdf, activeedit, activetest, authorware, blue sky software, blue sky, breeze, breezo, captivate, central, coldfusion, contribute, database explorer, director, dreamweaver, fireworks, flash, flashcast, flashhelp, flash lite, flashpaper, flash video encoder, flex, flex builder, f...

  • Page 3

    3 contents introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 about flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 about flash player . . . . . . . . . . . . . . . . . . . . . . . . ....

  • Page 4

    4 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

    Contents 5 chapter 5: drawing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 about vector and bitmap graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130 about flash drawing models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 6

    6 contents chapter 8: working with graphic objects . . . . . . . . . . . . . . . . . 207 selecting objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 grouping objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 7

    Contents 7 chapter 11: working with video. . . . . . . . . . . . . . . . . . . . . . . . . . . 271 about video features in flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 about using video in flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27...

  • Page 8

    8 contents creating a new screen-based document (flash professional only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343 adding screens to a document (flash professional only) . . . . . . . . 344 naming screens (flash professional only). . . . . . . . . . . . . . . . ...

  • Page 9

    Contents 9 chapter 17: publishing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 playing your flash swf files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 about publishing secure flash documents. . . . . . . . . . . . . . . . . . . . . . 457 configuri...

  • Page 10

    10 contents using frame labels to disable printing . . . . . . . . . . . . . . . . . . . . . . . . . . .547 printing from the flash player context menu . . . . . . . . . . . . . . . . . . . .548 publishing a document with printable frames . . . . . . . . . . . . . . . . . . . 550 chapter 21: creatin...

  • Page 11

    Contents 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .631 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....

  • Page 12

    12 contents.

  • Page 13

    13 introduction welcome to macromedia flash basic 8 and macromedia flash professional 8. Flash provides everything you need to create and deliver rich web content and powerful applications. Whether you’re designing motion graphics or building data-driven applications, flash has the tools to produce ...

  • Page 14

    14 introduction 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 ...

  • Page 15

    What’s new in flash 15 adjustable gradient focal point the fill transform tool now includes an editable focal point that lets you position the focal point (center) of a gradient fill applied to an object. For more information, see “transforming gradient and bitmap fills” on page 121 . Object drawing...

  • Page 16

    16 introduction text support flashtype, a new text rendering engine, enhances the quality and consistency of the way flash displays text. Improved text in both flash authoring and flash player text on the stage now has a more consistent appearance in the flash authoring tool and in flash player. For...

  • Page 17

    What’s new in flash 17 improved panel management 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. Flash lets you ...

  • Page 18

    18 introduction 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 . Swf file metadata yo...

  • Page 19

    What’s new in flash 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 ...

  • Page 20

    20 introduction 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...

  • Page 21

    21 1 chapter 1 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 d...

  • Page 22

    22 working with flash documents using the history panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 saving documents when you undo steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 automating tasks with the...

  • Page 23

    Creating or opening a document and setting properties 23 to create a new document: 1. Select file > new. 2. 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 sam...

  • Page 24

    24 working with flash documents 4. 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. ■ to set the stage s...

  • Page 25

    Saving flash documents 25 3. Click the size control to display the document properties dialog box and access its settings. 4. To select a background color, click the triangle in the background color box and select a color from the palette. 5. For frame rate, enter the number of animation frames to a...

  • Page 26

    26 working with flash documents 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...

  • Page 27

    Saving flash documents 27 3. Select flash mx 2004 document from the format pop-up menu. 4. Click save. To save documents when quitting flash: 1. Select file > exit (windows) or flash > quit flash (macintosh). 2. If you have documents open with unsaved changes, flash prompts you to save or discard th...

  • Page 28

    28 working with flash documents 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 wit...

  • Page 29

    About creating motion and interactivity 29 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 conten...

  • Page 30

    30 working with flash documents 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...

  • Page 31

    Managing media assets with the library 31 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...

  • Page 32

    32 working with flash documents 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 chang...

  • Page 33

    Managing media assets with the library 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 s...

  • Page 34

    34 working with flash documents 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 i...

  • Page 35

    Managing media assets with the library 35 to delete a library item: 1. Select the item and click the trash can icon at the bottom of the library panel. 2. In the warning box that appears, select delete symbol instances (the default) to delete the library item and all its instances. Deselect the opti...

  • Page 36

    36 working with flash documents 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 l...

  • Page 37

    About nested movie clips 37 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 stack...

  • Page 38

    38 working with flash documents 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 th...

  • Page 39

    Using absolute and relative target paths 39 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 timeli...

  • Page 40

    40 working with flash documents to communicate between documents on different levels, you must use the level name in the target path. The following example shows how the portland instance would address the atlanta instance located on a movie clip called georgia ( georgia is at the same level as oreg...

  • Page 41

    Using absolute and relative target paths 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...

  • Page 42

    42 working with flash documents 3. In the actions toolbox (at the left of the panel), select an action or method that requires a target path. 4. Click the parameter box or location in the script where you want to insert the target path. 5. Click the insert target path button above the script pane. 6...

  • Page 43

    Using absolute and relative target paths 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 a...

  • Page 44

    44 working with flash documents 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 timel...

  • Page 45

    Working with scenes 45 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. When you publish a flash document that contains more than one scene, the scenes in the document play bac...

  • Page 46

    46 working with flash documents 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 t...

  • Page 47

    Using the movie explorer 47 ■ from the options menu in movie explorer, select show symbol definitions to show information about symbols. 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. The find feature searc...

  • Page 48

    48 working with flash documents 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. Cut , copy , paste , and clear perform t...

  • Page 49

    Using find and replace 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 con...

  • Page 50

    50 working with flash documents 8. 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 ...

  • Page 51

    Using find and replace 51 4. To find a font, do one of the following: ■ click find next to find the next occurrence of the specified font. ■ click find all to find all occurrences of the specified font. 5. To replace a font, do one of the following: ■ click replace to replace the currently selected ...

  • Page 52

    52 working with flash documents 5. Select the fills, strokes, or text option or any combination of those options to specify which occurrence of the color to find and replace. 6. Select live edit to select the next occurrence of the specified color on the stage and edit it in place. 7. To find a colo...

  • Page 53

    Using the undo, redo, and repeat menu commands 53 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 so...

  • Page 54

    54 working with flash documents 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 symbo...

  • Page 55

    Using the history panel 55 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 58 . You can use the repeat command to reapply a step to the same object or to a different object. For example, if...

  • Page 56

    56 working with flash documents 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...

  • Page 57

    Using the history panel 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: 1. Select steps in the history panel by doing one of the following: ■ drag from one ...

  • Page 58

    58 working with flash documents 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 ...

  • Page 59

    Automating tasks with the commands menu 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: 1. Select a step or set of steps in the history panel. 2. Sele...

  • Page 60

    60 working with flash documents getting more commands you can use the get more commands option in the commands menu to link to the flash exchange website at www.Macromedia.Com/cfusion/exchange/index.Cfm and download commands that other flash users have posted. For more information on the commands po...

  • Page 61

    Creating custom keyboard shortcuts 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 cha...

  • Page 62

    62 working with flash documents 4. Press a key combination. The key combination appears in the press key text box. 5. Click change. The new key combination is assigned to the command. To edit an existing shortcut: 1. From the commands pop-up menu, select a command category. The commands list display...

  • Page 63

    About the links menu in flash player 63 ■ 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. You customize context menus ...

  • Page 64

    64 working with flash documents 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 docum...

  • Page 65

    Optimizing flash documents 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 s...

  • Page 66

    66 working with flash documents 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 downloa...

  • Page 67

    Testing document download performance 67 2. 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. 3. When viewing the swf file, sel...

  • Page 68

    68 working with flash documents 3. 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 fl...

  • Page 69

    69 2 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. You can use version-...

  • Page 70

    70 working with 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....

  • Page 71

    Creating and managing projects (flash professional only) 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...

  • Page 72

    72 working with projects (flash professional only) to test a project: 1. Click test project in the flash project panel. 2. 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. 3. If no fla, html, or htm file is designate...

  • Page 73

    Using version control with projects (flash professional only) 73 to close all files when you close a project: 1. Select edit > preferences (windows) or flash > preferences (macintosh) and click the editing tab. 2. Under project preferences, click close open files on project close (selected by defaul...

  • Page 74

    74 working with projects (flash professional only) 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: 1. Create a new project and add files. See “creating and managing projects (flash pro...

  • Page 75

    Troubleshooting remote folder setup (flash professional only) 75 to edit a file with version control applied: 1. Open the project that contains the file, as described in “creating and managing projects (flash professional only)” on page 70 . 2. Select the file in the tree structure in the project pa...

  • Page 76

    76 working with projects (flash professional only) ■ 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 part...

  • Page 77

    77 3 chapter 3 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. A symbol can...

  • Page 78

    78 using symbols, instances, and library assets 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 ...

  • Page 79

    About 9-slice scaling and movie clip symbols 79 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...

  • Page 80

    80 using symbols, instances, and library assets 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 ...

  • Page 81

    Runtime bitmap caching movie clip and button symbols 81 to edit a movie clip symbol using 9-slice scaling: 1. 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 con...

  • Page 82

    82 using symbols, instances, and library assets for more information, see “when to enable caching” in chapter 11, “working with movie clips,” of learning actionscript 2.0 in flash. Under the following circumstances, a movie clip will not use a bitmap (even if the use runtime bitmap caching check box...

  • Page 83

    Creating symbols 83 to convert selected elements to a symbol: 1. 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 t...

  • Page 84

    84 using symbols, instances, and library assets 5. 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 ba...

  • Page 85

    Creating instances 85 6. 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. Duplica...

  • Page 86

    86 using symbols, instances, and library assets to create a new instance of a symbol: 1. 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 ...

  • Page 87

    Creating buttons 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 b...

  • Page 88

    88 using symbols, instances, and library assets 7. 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 enco...

  • Page 89

    Editing symbols 89 to move or edit an enabled button: 1. Select the button, as described above. 2. 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-clic...

  • Page 90

    90 using symbols, instances, and library assets to edit a symbol in place: 1. 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 con...

  • Page 91

    Changing instance properties 91 3. To change the registration point, drag the symbol on the stage. A cross hair indicates the location of the registration point. 4. 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 edi...

  • Page 92

    92 using symbols, instances, and library assets to change the color and transparency of an instance: 1. Select the instance on the stage and select window > properties. 2. In the property inspector, select one of the following options from the color pop-up menu: brightness adjusts the relative light...

  • Page 93

    Changing instance properties 93 to assign a different symbol to an instance: 1. Select the instance on the stage and select window > properties. 2. Click the swap button in the property inspector. 3. In the swap symbol dialog box, select a symbol to replace the one currently assigned to the instance...

  • Page 94

    94 using symbols, instances, and library assets to set the looping of a graphic instance: 1. Select a graphic instance on the stage and select window > properties. 2. In the property inspector, select an animation option from the pop-up menu below the instance name: loop loops all the animation sequ...

  • Page 95

    Controlling instances with behaviors 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 beha...

  • Page 96

    96 using symbols, instances, and library assets to add and configure a behavior: 1. Select the object, such as a button, that will trigger the behavior. 2. In the behaviors panel (window > behaviors), click the add (+) button and select the desired behavior from the movieclip submenu. 3. In the dial...

  • Page 97

    Creating custom behaviors 97 to create a custom behavior: 1. Using an xml editor, create a new xml file, and name it appropriately for the behavior you intend to create. 2. Enter a category name. This creates a category in the behaviors panel under which the behavior is listed. Authoringedition="pro...

  • Page 98

    98 using symbols, instances, and library assets 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 behavio...

  • Page 99

    Best practices for using behaviors 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 d...

  • Page 100

    100 using symbols, instances, and library assets 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 actionscri...

  • Page 101

    Breaking apart instances 101 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 d...

  • Page 102

    102 using symbols, instances, and library assets 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 ide...

  • Page 103

    Copying library assets between documents 103 to view the symbol definition for the selected symbol in the movie explorer: 1. Click the show buttons, movie clips, and graphics button at the top of the movie explorer. 2. Right-click (windows) or control-click (macintosh) and select show symbol instanc...

  • Page 104

    104 using symbols, instances, and library assets to copy a library asset by dragging: 1. With the destination document open in flash, select the asset in the library panel in the source document. 2. Drag the asset into the library panel in the destination document. To copy a library asset by opening...

  • Page 105

    Using shared library assets 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 wil...

  • Page 106

    106 using symbols, instances, and library assets 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 a...

  • Page 107

    Using shared library assets 107 to turn off linkage for a symbol in a destination document: 1. 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...

  • Page 108

    108 using symbols, instances, and 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 ...

  • Page 109

    Resolving conflicts between library assets 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 instan...

  • Page 110

    110 using symbols, instances, and library assets.

  • Page 111

    111 4 chapter 4 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 t...

  • Page 112

    112 working with color, strokes, and fills this chapter contains the following sections: about the color mixer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 about creating gradients. . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 113

    About the color mixer 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 remove...

  • Page 114

    114 working with color, strokes, and fills repeat repeats the gradient from the beginning of the gradient to the end until the selected shape is filled. Linear rgb creates an svg-compliant (scalable vector graphics) linear or radial gradient. About creating gradients a gradient is a multicolor fill ...

  • Page 115

    Using the stroke color and fill color controls in the property inspector 115 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 ...

  • Page 116

    116 working with color, strokes, and fills 4. To select a stroke weight, click the triangle next to the weight pop-up menu and set the slider at the weight you want. 5. Specify a stroke height by doing one of the following: ■ select one of the preset values from the height pop-up menu. Preset values...

  • Page 117

    Working with solid colors and gradient fills in the color mixer 117 10. 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...

  • Page 118

    118 working with color, strokes, and fills to create or edit a solid color with the color mixer: 1. To apply the color to existing artwork, select an object or objects on the stage. 2. Select window > color mixer. 3. To select a color mode display, select rgb (the default setting) or hsb from the po...

  • Page 119

    Working with solid colors and gradient fills in the color mixer 119 to create or edit a gradient fill with the color mixer: 1. To apply a gradient fill to existing artwork, select an object or objects on the stage. 2. If the color mixer is not visible, select window > color mixer. 3. To select a col...

  • Page 120

    120 working with color, strokes, and fills 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. Using the ink bottle ...

  • Page 121

    Transforming gradient and bitmap fills 121 3. 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 ...

  • Page 122

    122 working with color, strokes, and fills 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. Press shift to constrain the direction of a linear gradient fill to multiples of 45°. 3. Reshape the gradient or fill...

  • Page 123

    Transforming gradient and bitmap fills 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...

  • Page 124

    124 working with color, strokes, and fills 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 fi...

  • Page 125

    Modifying color palettes 125 to use a locked bitmap fill: 1. Select the bitmap you want to use. 2. Select bitmap from the type pop-up menu in the color mixer before selecting the brush or paint bucket tool. 3. Select the brush or paint bucket tool. 4. Click the lock fill modifier. 5. First paint the...

  • Page 126

    126 working with color, strokes, and fills using the default palette and the web-safe palette you can save the current palette as the default palette, replace the current palette with the default palette defined for the file, or load the web-safe palette to replace the current palette. To load or sa...

  • Page 127

    Modifying color palettes 127 to import a color palette: 1. 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 c...

  • Page 128

    128 working with color, strokes, and fills.

  • Page 129

    129 5 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. Before you draw and paint...

  • Page 130

    130 drawing 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 manipula...

  • Page 131

    About flash drawing models 131 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 mosai...

  • Page 132

    132 drawing 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...

  • Page 133

    About flash drawing and painting tools 133 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...

  • Page 134

    134 drawing 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

    Using the object drawing model 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 sele...

  • Page 136

    136 drawing 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. To draw with the penc...

  • Page 137

    Drawing straight lines, ovals, and rectangles 137 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 ...

  • Page 138

    138 drawing 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. To draw a polygon or star: 1. Click and hold the mouse...

  • Page 139

    Using the pen tool 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...

  • Page 140

    140 drawing 4. Click again where you want the first segment of the straight line to end. Shift-click to constrain lines to multiples of 45°. 5. Continue clicking to create additional straight segments. 6. To complete the path as an open or closed shape, do one of the following: ■ to complete an open...

  • Page 141

    Using the pen tool 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 pa...

  • Page 142

    142 drawing 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 del...

  • Page 143

    Using the pen tool 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 ...

  • Page 144

    144 drawing to adjust points or tangent handles on a curve: 1. Select the subselection tool, and select an anchor point on a curved segment. A tangent handle appears for the point you selected. 2. To adjust the shape of the curve on either side of the anchor point, drag the anchor point, or drag the...

  • Page 145

    Painting with the brush tool 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) en...

  • Page 146

    146 drawing 5. 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. ■ select the til...

  • Page 147

    Reshaping lines and shape outlines 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 s...

  • Page 148

    148 drawing 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 recogni...

  • Page 149

    Erasing 149 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 ...

  • Page 150

    150 drawing to erase by dragging: 1. Select the eraser tool. 2. 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 ...

  • Page 151

    Snapping 151 to expand the shape of a filled object: 1. Select a filled shape. This command works best on a single filled color shape with no stroke. 2. Select modify > shape > expand fill. 3. In the expand path dialog box, enter a value in pixels for distance and select expand or inset for directio...

  • Page 152

    152 drawing 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. The small ring chang...

  • Page 153

    Snapping 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. When you release the x key, the pixel grid reappear...

  • Page 154

    154 drawing 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 r...

  • Page 155

    Specifying drawing settings 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 o...

  • Page 156

    156 drawing.

  • Page 157

    157 6 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 dy...

  • Page 158

    158 working with text 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 capabilit...

  • Page 159

    About flashtype 159 substituting missing fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 controlling text with actionscript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 creating scrolling text . . . ...

  • Page 160

    160 working with text ■ an anti-aliasing option other than anti-alias for readability or custom anti-alias is selected. ■ text is skewed or flipped. ■ the fla file is exported to a png file. About unicode text encoding in flash applications macromedia flash player 7 and later supports unicode text e...

  • Page 161

    About font outlines and device fonts 161 about using device fonts for static horizontal text only, you can use special fonts in flash called device fonts as an alternative to exporting font outline information. Device fonts are not embedded in the flash swf file. Instead, flash player uses whatever ...

  • Page 162

    162 working with 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 . A new feature in fl...

  • Page 163

    Creating text 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...

  • Page 164

    164 working with text ■ 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” on page 189 . ...

  • Page 165

    Creating text 165 4. 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). Vertica...

  • Page 166

    166 working with 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...

  • Page 167

    Setting text attributes 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 ...

  • Page 168

    168 working with text 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. M...

  • Page 169

    Setting text attributes 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...

  • Page 170

    170 working with text 4. 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 va...

  • Page 171

    Setting text attributes 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. Anti-alias for readability uses a ne...

  • Page 172

    172 working with text to upgrade flash 7 content to use the advanced or custom anti-alias options: 1. Open a fla file created for use with flash 7 or earlier. 2. Open the publish settings dialog box (file > publish settings), and select flash player 8 from the version pop-up menu. 3. Select the text...

  • Page 173

    Creating font symbols 173 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...

  • Page 174

    174 working with text 5. In the url text box, enter the url where the swf file that contains the font symbol will be posted. 6. 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” o...

  • Page 175

    Checking spelling 175 ■ create a personal dictionary with words and phrases you add yourself. ■ select checking options to specify ways to handle specific word and character types, such as nonalphabetic words or internet addresses, when checking spelling. When the check spelling feature identifies a...

  • Page 176

    176 working with text 6. 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 matche...

  • Page 177

    Breaking text apart 177 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 ref...

  • Page 178

    178 working with text to break apart text: 1. Select the selection tool and click a text block. 2. Select modify > break apart. Each character in the selected text is placed in a separate text block. The text remains in the same position on the stage. 3. Select modify > break apart again to convert ...

  • Page 179

    Preserving rich text formatting 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 htmltext property text fields: a , b , font color , font face , font size , i ...

  • Page 180

    180 working with text 4. 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 txt . The text is rendered in bold if you select the render text as html option in the property inspector, or if the html pr...

  • Page 181

    Substituting missing fonts 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 missin...

  • Page 182

    182 working with text to view all the font mappings saved on your system and delete font mappings: 1. Close all documents in flash. 2. Select edit > font mapping. 3. To delete a font mapping, select the mapping and press delete. 4. Click ok. To turn off the missing fonts alert, do one of the followi...

  • Page 183

    Controlling text with actionscript 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: 1. Click in an existing dynamic text field. To create a n...

  • Page 184

    184 working with text creating and removing text fields dynamically you can use the createtextfield method of the movieclip object to create a new, empty 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 createte...

  • Page 185

    Controlling text with actionscript 185 to create a dynamic text field: 1. Select a frame, button, or movie clip that is to receive the action. 2. Select window > actions to open the actions panel if it isn’t already open. 3. In the actions toolbox, select the built-in classes category, then select t...

  • Page 186

    186 working with text to set text field properties dynamically: 1. Select window > actions to open the actions panel if it isn’t already open. 2. 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...

  • Page 187

    Controlling text with actionscript 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...

  • Page 188

    188 working with text 6. 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 te...

  • Page 189

    Creating scrolling text 189 creating scrolling text you can use the scroll and maxscroll properties of the textfield object to control vertical scrolling and the hscroll and maxhscroll properties to control horizontal scrolling in a text block. The scroll and hscroll properties contain a number that...

  • Page 190

    190 working with text.

  • Page 191

    191 7 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...

  • Page 192

    192 using imported artwork you can load jpeg files into a flash movie during runtime using the loadmovie action or 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 f...

  • Page 193

    Placing artwork into flash 193 to import a file into flash: 1. 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. (to use a library i...

  • Page 194

    194 using imported artwork 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...

  • Page 195

    Placing artwork into flash 195 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. When y...

  • Page 196

    196 using imported artwork 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. To import a fireworks png file: 1. Select file > import to stage or import to library. 2. In the import dialog box, select png image...

  • Page 197

    Placing artwork into flash 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, an...

  • Page 198

    198 using imported artwork 5. 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. 6. For mappin...

  • Page 199

    Placing artwork into flash 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. ■ mai...

  • Page 200

    200 using imported artwork 8. 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 bitm...

  • Page 201

    Working with imported bitmaps 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. ...

  • Page 202

    202 using imported artwork 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...

  • Page 203

    Working with imported bitmaps 203 importing bitmaps at runtime you can use the actionscript 2.0 command bitmapdata to add bitmaps to a document at 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 6...

  • Page 204

    204 using imported artwork 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. If you have fireworks 3 or later or another image-editing application installed on your s...

  • Page 205

    Working with imported bitmaps 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 to...

  • Page 206

    206 using imported artwork 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 conver...

  • Page 207

    207 8 chapter 8 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. Keep in mind that ...

  • Page 208

    208 working with graphic 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 (se...

  • Page 209

    Selecting objects 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. Instances, groups, and type...

  • Page 210

    210 working with graphic objects 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 sele...

  • Page 211

    Grouping objects 211 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 grou...

  • Page 212

    212 working with graphic 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 applicatio...

  • Page 213

    Moving, copying, and deleting objects 213 3. 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. To move objects using the info panel: 1. Select an object or multiple objects. 2. If the info panel is not visib...

  • Page 214

    214 working with graphic objects ■ 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 . C...

  • Page 215

    Transforming objects 215 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 stack...

  • Page 216

    216 working with graphic objects 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 ...

  • Page 217

    Transforming objects 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. Transforming objects freely you can use the ...

  • Page 218

    218 working with graphic objects ■ 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...

  • Page 219

    Transforming objects 219 to modify a shape with the envelope modifier: 1. Select a shape on the stage. 2. Select modify > transform > envelope. 3. Drag the points and tangent handles to modify the envelope. Scaling objects scaling an object enlarges or reduces the object horizontally, vertically, or...

  • Page 220

    220 working with graphic objects 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 ...

  • Page 221

    Aligning objects 221 flipping objects you can flip objects across their vertical or horizontal axis without moving their relative position on the stage. To flip an object: 1. Select the object. 2. Select modify > transform > flip vertical or flip horizontal. Restoring transformed objects when you us...

  • Page 222

    222 working with graphic objects to align objects: 1. Select the objects to align. 2. Select window > align. 3. In the align panel, select to stage to apply alignment modifications relative to stage dimensions. 4. Select alignment buttons to modify the selected objects: ■ for align, select align lef...

  • Page 223

    Breaking apart groups and objects 223 to break apart groups or objects: 1. Select the group, bitmap, or symbol that you want to break apart. 2. Select modify > break apart. No te breaking apart animated symbols, or groups within an interpolated animation, is not recommended and might have unpredicta...

  • Page 224

    224 working with graphic objects.

  • Page 225

    225 9 chapter 9 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...

  • Page 226

    226 using filters and blends (flash professional only) 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 i...

  • Page 227

    About animating filters (flash professional only) 227 fireworks blend modes supported in flash flash imports the following fireworks blend modes as modifiable blends: flash ignores all other blending modes imported from fireworks. The blending modes that are not supported in flash are average, negat...

  • Page 228

    228 using filters and blends (flash professional only) ■ if you place movie clips on two different frames with different filters applied to each, and you apply a motion tween between the frames, flash first processes the movie clip with the most filters. Flash then compares the filters applied to th...

  • Page 229

    Applying filters (flash professional only) 229 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 inspec...

  • Page 230

    230 using filters and blends (flash professional only) to remove a filter: 1. Select the movie clip, button, or text object that you want to remove a filter from. 2. Select the filter tab in the property inspector. 3. Select the filter you want to remove in the list of applied filters. 4. Click the ...

  • Page 231

    Applying filters (flash professional only) 231 creating preset filter libraries you can save filter settings as preset libraries that you can easily apply to movie clip and text objects. You can also share your filter presets with other users by providing them with the filter configuration file. The...

  • Page 232

    232 using filters and blends (flash professional only) 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 t...

  • Page 233

    Applying filters (flash professional only) 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 sha...

  • Page 234

    234 using filters and blends (flash professional only) 4. 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...

  • Page 235

    Applying filters (flash professional only) 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...

  • Page 236

    236 using filters and blends (flash professional only) 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...

  • Page 237

    Applying filters (flash professional only) 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 gradien...

  • Page 238

    238 using filters and blends (flash professional only) 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 ...

  • Page 239

    About blend modes (flash professional only) 239 about blend modes (flash professional only) 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 lets you create unique effects by blending...

  • Page 240

    240 using filters and blends (flash professional only) invert inverts the base color. Alpha applies an alpha mask. Erase removes all base color pixels, including those in the background image. To see examples of the blending modes, see “blend mode examples” on page 240 . Blend mode examples the foll...

  • Page 241

    Applying a blend mode (flash professional only) 241 applying a blend mode (flash professional only) you use the property inspector for movie clips to apply blends to selected movie clips. To apply a blend mode to a movie clip: 1. Select the movie clip instance (on the stage) that you want to apply a...

  • Page 242

    242 using filters and blends (flash professional only) 4. Position the movie clip with the blend mode over the graphic symbol whose appearance you want to modify. 5. Verify that the blend mode you selected is appropriate to the effect you’re trying to achieve. You might need to experiment with both ...

  • Page 243

    243 10 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 e...

  • Page 244

    244 creating motion tweening shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 using shape hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263 creating frame-...

  • Page 245

    Using timeline effects 245 to add an effect to an object: 1. 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 ef...

  • Page 246

    246 creating motion distributed duplication duplicates a selected object the number of times entered in the settings. The first element is a copy of the original object. The objects are modified in increments until the final object reflects the parameters entered in the settings. • number of copies ...

  • Page 247

    Using timeline effects 247 explode gives the illusion of an object exploding. Elements of text or a complex group of objects (symbols, shapes or video clips) break apart, spin, and arc outward. • effect duration, in frames • direction of explosion, upward to left, center, or right, downward to left,...

  • Page 248

    248 creating motion editing a timeline effect you edit timeline effects using the effect settings dialog box. To edit a timeline effect: 1. Select the object associated with the effect on the stage. 2. To open the effect settings dialog box, do one of the following: ■ in the property inspector, clic...

  • Page 249

    About layers in animation 249 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 obje...

  • Page 250

    250 creating motion 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 f...

  • Page 251

    Extending still images 251 ■ 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 a...

  • Page 252

    252 creating motion to use a shortcut to extend still images: 1. Create an image in the first keyframe. 2. 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 tween...

  • Page 253

    Tweening instances, groups, and type 253 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 instanc...

  • Page 254

    254 creating motion to create a motion tween using the motion tweening option: 1. 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. 2. To create the first frame of the motion tween, do one of the following: ■ create a gra...

  • Page 255

    Tweening instances, groups, and type 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 ap...

  • Page 256

    256 creating motion 3. Click inside the frame where you want the animation to end, and select insert > timeline > frame. 4. 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...

  • Page 257

    Tweening motion along a path 257 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 linke...

  • Page 258

    258 creating motion 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...

  • Page 259

    Applying custom ease in/ease out to motion tweens (flash professional only) 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 pro...

  • Page 260

    260 creating motion 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 re...

  • Page 261

    Tweening shapes 261 4. 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. 5. Drag the control point up to increase the speed of the object, or drag it downwards to slow down the speed of the object. 6. Drag the...

  • Page 262

    262 creating motion to tween a shape: 1. Click a layer name to make it the active layer, and create or select a keyframe where you want the animation to start. 2. Create or place the artwork for the first frame of the sequence. For best results, the frame should contain only one item (a graphic obje...

  • Page 263

    Using shape hints 263 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 h...

  • Page 264

    264 creating motion 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 > shape > remove all hints. C...

  • Page 265

    Editing animation 265 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, yo...

  • Page 266

    266 creating motion ■ 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 keyf...

  • Page 267

    Editing animation 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...

  • Page 268

    268 creating motion 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 togeth...

  • Page 269

    Using mask layers 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 di...

  • Page 270

    270 creating motion.

  • Page 271

    271 11 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...

  • Page 272

    272 working with video 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 ...

  • Page 273

    About video features in flash 273 importing embedded video you can import video clips into flash as embedded files. As with an imported bitmap or vector artwork file, an embedded video file becomes part of the flash document. For this reason, you can only import very short duration video clips. For ...

  • Page 274

    274 working with video 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 vi...

  • Page 275

    About using video in flash 275 about streaming video using flash communication server streaming video from either your own server running flash communication server or from a host fvss provides the most complete, consistent, and robust delivery option for both audio and video files. In streaming, ea...

  • Page 276

    276 working with video 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. As with an imported bitmap...

  • Page 277

    Video and the property inspector 277 about linked quicktime video using flash, you can create quicktime movies (mov files) that can be played back by users who have the quicktime plug-in installed on their computers. This is often done when people use flash to create title sequences or animation for...

  • Page 278

    278 working with video 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 enco...

  • Page 279

    About digital video and flash 279 the following video file formats are supported for importing embedded video if directx 9 or later is installed (windows only): by default, flash imports and exports video using the on2 vp 6 codec. A codec is a compression/decompression algorithm that controls how mu...

  • Page 280

    280 working with video 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 por...

  • Page 281

    About digital video and flash 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 t...

  • Page 282

    282 working with video 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 in...

  • Page 283

    About digital video and flash 283 select the proper frame rate frame rate indicates how many frames play each second (fps). If you have a higher data rate clip, a lower frame rate can improve playback on lower-end computers. For example, if you are compressing a talking head clip with little motion,...

  • Page 284

    284 working with video 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 w...

  • Page 285

    Importing video using the video import wizard 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 a...

  • Page 286

    286 working with video 6. 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). ■ the video skin (if you chose to use a skin). If you choose to use a predefined...

  • Page 287

    Importing video using the video import wizard 287 4. (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. When the video you are deploying is not in flv format, the import video wizard d...

  • Page 288

    288 working with video 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 pr...

  • Page 289

    Importing video using the video import wizard 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...

  • Page 290

    290 working with video to update an embedded video clip after editing it in an external editor: 1. Select the video clip in the library panel. 2. In the options menu in the upper right corner of the library panel, select properties. 3. Click update in the embedded video properties dialog box. The em...

  • Page 291

    Importing video using the video import wizard 291 3. 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...

  • Page 292

    292 working with video to edit a video clip: 1. Import the video clip. 2. Select edit the video first, and click next to open the editing pane of the video import wizard. 3. To browse frames in the video, do one of the following: ■ drag the playhead along the scrubber bar. ■ click the play button to...

  • Page 293

    Encoding video 293 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...

  • Page 294

    294 working with video 3. Do one of the following: ■ click show advanced settings to further adjust the encoding settings, or to modify the video clip’s size or playback length using the crop-and-trim controls. ■ click continue to encode the video. Specifying advanced encoding settings (flash profes...

  • Page 295

    Encoding video 295 4. 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, flas...

  • Page 296

    296 working with video 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 tr...

  • Page 297

    Encoding video 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 . To define and embed cue...

  • Page 298

    298 working with video ■ 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. 7. Enter parameters for the selected cue point. Parameters are a...

  • Page 299

    Importing flash video files into the library 299 7. 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 t...

  • Page 300

    300 working with video about playing back external flv files dynamically as an alternative to importing video into the flash authoring environment, you can use either the flvplayback component or actionscript to dynamically play external flv files in flash player. You can play flv files posted as ht...

  • Page 301

    Changing the properties of a video clip 301 changing the properties of a video clip you can use the property inspector to change properties for an instance of an embedded or linked video clip on the stage. In the property inspector, you can assign the instance an instance name and change its width, ...

  • Page 302

    302 working with video to update a video clip: 1. Select the video clip in the library panel. 2. Select properties from the library options menu. 3. In the embedded video properties dialog box, click update. 4. Navigate to the updated video file and click open. The file is reimported into the flash ...

  • Page 303

    Controlling video playback using behaviors 303 the following behaviors come with flash basic 8 and flash professional 8, and are used to control embedded video: for lessons on working with video, see “tutorial: building a video player (flash professional only)” in getting started with flash. To add ...

  • Page 304

    304 working with video 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. ...

  • Page 305

    Using the flvplayback component (flash professional only) 305 to configure the flvplayback component: 1. With the component selected, open the property inspector (windows > properties) and enter an instance name. 2. Select the parameters tab in the property inspector or open the component inspector ...

  • Page 306

    306 working with video maintainaspectratio a boolean value that, if true , resizes the video player within the 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 prece...

  • Page 307

    Using the flvplayback component (flash professional only) 307 to specify the name and location of the flv: 1. 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 in...

  • Page 308

    308 working with video 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 stop() action that targets that ti...

  • Page 309

    Media components (flash player 6 and 7) 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...

  • Page 310

    310 working with video.

  • Page 311

    311 12 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 interact...

  • Page 312

    312 working with sound this chapter contains the following sections: importing sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 adding sounds to a document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....

  • Page 313

    Adding sounds to a document 313 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 ...

  • Page 314

    314 working with sound to add a sound to a document: 1. Import the sound into the library if it has not already been imported. For more information, see “importing sounds” on page 312 . 2. Select insert > timeline > layer to create a layer for the sound. 3. With the new sound layer selected, drag th...

  • Page 315

    Adding sounds to buttons 315 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. If flash can’t ...

  • Page 316

    316 working with sound 7. In the property inspector, select a sound file from the sound pop-up menu. 8. Select event from the synchronization pop-up menu. To associate a different sound with each of the button’s keyframes, create a blank keyframe and add another sound file for each keyframe. You can...

  • Page 317

    Using the sound-editing controls 317 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 hav...

  • Page 318

    318 working with sound 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, con...

  • Page 319

    Controlling sound playback using behaviors 319 4. In the play sound dialog box, enter the instance name of the sound you want to play, and click ok. 5. 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 onrelease ev...

  • Page 320

    320 working with sound 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: 1. Add a sound to a document. For more information, see “adding sounds to ...

  • Page 321

    Compressing sounds for export 321 the onsoundcomplete event lets you manipulate sounds in a variety of powerful ways, such 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 scen...

  • Page 322

    322 working with sound to set export properties for an individual sound: 1. 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 so...

  • Page 323

    Compressing sounds for export 323 3. 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...

  • Page 324

    324 working with sound 5. 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 hig...

  • Page 325

    Compressing sounds for export 325 to use speech compression: 1. In the sound properties dialog box, select speech from the compression menu. 2. 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 ...

  • Page 326

    326 working with sound 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 ...

  • Page 327

    327 13 chapter 13 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 se...

  • Page 328

    328 writing actionscript with script assist 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, an...

  • Page 329

    Using script assist to write actionscript 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 p...

  • Page 330

    330 writing actionscript with script assist 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. ■ to find text, clic...

  • Page 331

    Creating a startdrag/stopdrag event using script assist 331 to print actions: 1. From the actions panel pop-up menu, select print. The print dialog box appears. 2. Select options and click print. Because the printed file won’t include information about its originating flash file, macromedia recommen...

  • Page 332

    332 writing actionscript with script assist 7. Place the circle_mc move clip on the timeline. To do this: a. Select the circle_mc movie clip on the stage. B. Select modify > timeline > distribute to layers. This menu command automatically adds a layer to the timeline and places the circle_mc movie c...

  • Page 333

    Creating a startdrag/stopdrag event using script assist 333 14. In the target path dialog box, select the mycircle movie clip instance, and ensure that the relative path option is selected. Click ok. 15. Click the add (+) button, and select global functions > movieclip control > startdrag. 16. Enter...

  • Page 334

    334 writing actionscript with script assist 20. In the actions toolbox, navigate to actionscript 2.0 classes > movie > movieclip > events > onrelease, and double-click onrelease. The onrelease method is added to the actions panel. 21. Click in the object text box, and click the target path button. T...

  • Page 335

    335 14 chapter 14 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 applic...

  • Page 336

    336 working with screens (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 (fla...

  • Page 337

    Understanding screen-based documents and the screen authoring environment (flash professional only) 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 (fl...

  • Page 338

    338 working with screens (flash professional only) 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...

  • Page 339

    Understanding screen-based documents and the screen authoring environment (flash professional only) 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 ...

  • Page 340

    340 working with screens (flash professional only) 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 behavio...

  • Page 341

    Understanding screen-based documents and the screen authoring environment (flash professional only) 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 correspo...

  • Page 342

    342 working with screens (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. Th...

  • Page 343

    Creating a new screen-based document (flash professional only) 343 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 men...

  • Page 344

    344 working with screens (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 ...

  • Page 345

    Adding screens to a document (flash professional only) 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 al...

  • Page 346

    346 working with 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...

  • Page 347

    Setting properties and parameters for a screen (flash professional only) 347 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 i...

  • Page 348

    348 working with screens (flash professional only) to move a child screen on the stage: 1. If the hide screen context menu option for the child screen is selected (the default setting for slide screens), deselect the option. 2. Select the screen’s parent in the screen outline pane, and select the ch...

  • Page 349

    Setting properties and parameters for a screen (flash professional only) 349 to change the actionscript class of a screen: 1. Select a screen in the screen outline pane. 2. Select window > properties. 3. In the property inspector, click the properties tab. 4. Enter a class name in the class name tex...

  • Page 350

    350 working with screens (flash professional only) ■ the parameter overlaychildren specifies whether child screens overlay one another on the parent screen during playback. When overlaychildren is set to true , child screens overlay one another. For example, suppose you have two children, child 1 an...

  • Page 351

    Selecting and moving screens (flash professional only) 351 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 ...

  • Page 352

    352 working with screens (flash professional only) 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...

  • Page 353

    Creating controls and transitions for screens with behaviors (flash professional only) 353 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 sc...

  • Page 354

    354 working with screens (flash professional only) 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. Y...

  • Page 355

    Creating controls and transitions for screens with behaviors (flash professional only) 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 d...

  • Page 356

    356 working with screens (flash professional only) 6. For duration, enter a time in seconds. 7. For easing, select an option to define the transition style. 8. If the transition has additional parameters, select options or enter values for those parameters in the fields provided. 9. Click ok. 10. In...

  • Page 357

    About using actionscript with screens (flash professional only) 357 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 ...

  • Page 358

    358 working with screens (flash professional only) 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 cla...

  • Page 359

    About using actionscript with screens (flash professional only) 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,...

  • Page 360

    360 working 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 o...

  • Page 361

    Accessibility in the flash screens authoring environment (flash professional only) 361 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 ...

  • Page 362

    362 working with screens (flash professional only).

  • Page 363

    363 15 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 str...

  • Page 364

    364 creating multilanguage text ■ 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 li...

  • Page 365

    Selecting an encoding language 365 unicode and macromedia flash player macromedia flash player 6 and later supports unicode text encoding. Any user with flash player 6 or later can view multilanguage text, regardless of the language used by the operating system running the player, if they have the c...

  • Page 366

    366 creating multilanguage text most text editors that can save files in utf-16be or le automatically add the boms to the files. About encoding in external xml files you cannot change the encoding of an xml file by changing the encoding tag. Flash player identifies the encoding of an external xml fi...

  • Page 367

    Using embedded fonts 367 to select and embed a range of fonts: 1. On the stage, select a text field, and then show the property inspector (window > properties). 2. Click the embed button to display the character embedding dialog box. 3. Select the range of font sets you want to embed by doing any of...

  • Page 368

    368 creating multilanguage text to remove embedded font sets: 1. On the stage, select a text field, and then show the property inspector (window > properties). 2. Click the embed button to display the character embedding dialog box. 3. Click the don’t embed button to remove all of the embedded fonts...

  • Page 369

    Using embedded fonts 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 pu...

  • Page 370

    370 creating multilanguage text authoring multilanguage text with the strings panel the strings panel lets you create and update multilingual content. You can specify content for text fields that span multiple languages, and have flash automatically determine the content that should appear in a cert...

  • Page 371

    Authoring multilanguage text with the strings panel 371 6. 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 . 7. Send the published fla file and xml ...

  • Page 372

    372 creating multilanguage text 7. Click ok. A column for each selected language appears in the strings panel. The columns appear in alphabetical order. 8. 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 publis...

  • Page 373

    Authoring multilanguage text with the strings panel 373 to assign a string id to a text field: 1. Select window > other panels > strings to open the strings panel. 2. Select the text tool from the toolbar. On the stage, create an input or dynamic text field. 3. While the text field is selected, ente...

  • Page 374

    374 creating multilanguage text 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 la...

  • Page 375

    Authoring multilanguage text with the strings panel 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...

  • Page 376

    376 creating multilanguage text to select the default language and automatic language detection: 1. Select window > other panels > strings to open the strings panel. 2. Click the settings button to display the settings dialog box. 3. In the default language pop-up menu, select the language you want ...

  • Page 377

    Authoring multilanguage text with the strings panel 377 5. 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. Import mx.Lang.Locale; locale.Setflaname("flafilename>"); locale.Set...

  • Page 378

    378 creating multilanguage text 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 /p> "http://www.Oasis-open.Org...

  • Page 379

    Authoring multilanguage text with the strings panel 379 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 ...

  • Page 380

    380 creating multilanguage text 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 fr...

  • Page 381

    Creating documents with multilanguage text without using the strings panel 381 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 file...

  • Page 382

    382 creating multilanguage text to toggle between japanese and chinese character input and korean character input: 1. Select edit >preferences (windows) or flash > preferences (macintosh), and click the editing tab in the preferences dialog box. 2. Under input language settings, select one of the fo...

  • Page 383

    Creating documents with multilanguage text without using the strings panel 383 4. 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 t...

  • Page 384

    384 creating multilanguage text 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 //!-- utf8 header in a file tells the authoring tool that the ex...

  • Page 385

    Using external text or xml files that are not unicode-encoded 385 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 attemp...

  • Page 386

    386 creating multilanguage text.

  • Page 387

    387 16 chapter 16 data integration (flash professional only) macromedia flash professional 8 provides a flexible, component-based architecture and object model for connecting to external data sources, binding data to user interface (ui) components, and managing what data is displayed and how it’s up...

  • Page 388

    388 data integration (flash professional only) ■ 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 the...

  • Page 389

    389 the following table can help you decide what components you need to use in your flash data application. Flash is a client-side technology. To create a flash application that integrates with a data source, you will need to implement server-side code as well. Building and exposing business logic o...

  • Page 390

    390 data integration (flash professional only) additional resources the following table outlines additional resources that are available for learning to use the data integration components in flash. Component data tutorials in flash help data tutorials on devnet (www.Macromedia.Com/devnet/mx/ flash/...

  • Page 391

    Creating a simple application 391 creating a simple application the following example walks you through creating a simple data integration application, which can help you understand the concepts and steps involved. In the example, you create a simple application that loads and displays a dinner menu...

  • Page 392

    392 data integration (flash professional only) 6. 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: a. Select results : xml from the schema tab top pane. B. Click the import a schema from ...

  • Page 393

    Workflows for using the data components 393 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...

  • Page 394

    394 data integration (flash professional only) workflow for an external database (non-xml or not a web service): 1. Set up your data source; for example, in the coldfusion environment, set up a coldfusion datasource component to connect to your data source. 2. Add components to the stage: ■ dataset ...

  • Page 395

    Data binding (flash professional only) 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, becau...

  • Page 396

    396 data integration (flash professional only) 9. Return to editing the application. 10. Add another numericstepper component and name it stepper3_nm . 11. Add a textinput component called myinput_txt . 12. Repeat steps 4-7 and bind the value property of stepper3_nm to the text property of myinput_t...

  • Page 397

    Data binding (flash professional only) 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 the xmlconn instance, with the food:array property selected, and the bottom p...

  • Page 398

    398 data integration (flash professional only) 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 fiel...

  • Page 399

    Data binding (flash professional only) 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 compo...

  • Page 400

    400 data integration (flash professional only) 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 pa...

  • Page 401

    Data binding (flash professional only) 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. Kind when flash wants to get data from a component, the data is fe...

  • Page 402

    402 data integration (flash professional only) 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 ...

  • Page 403

    Data binding (flash professional only) 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 bi...

  • Page 404

    404 data integration (flash professional only) 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 prop...

  • Page 405

    Data binding (flash professional only) 405 7. 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 . 8. Repeat the steps for additional components. The schema for a component defines which schema items a...

  • Page 406

    406 data integration (flash professional only) 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 b...

  • Page 407

    Data binding (flash professional only) 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...

  • Page 408

    408 data integration (flash professional only) to create an indexed binding: 1. If you haven’t already done so, create the example application shown in “creating a simple application” on page 391 . 2. Drag a textarea component to the stage and name it mytextarea . 3. Select the xmlconn instance, cli...

  • Page 409

    Data binding (flash professional only) 409 5. Click index for ‘food’ , click the magnifying glass icon, deselect use constant value, select the menu_dg datagrid instance, and select selectedindex:number . The settings for the indexed binding appear in the bindings tab, as shown in the following imag...

  • Page 410

    410 data integration (flash professional only) if a binding is created for any of these items, an index for 'row' property appears in the 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, yo...

  • Page 411

    Data binding (flash professional only) 411 the following list describes the types of things reported: ■ executing bindings ■ calling web service methods ■ fetching xml documents ■ status and result events from webservice and xml components ■ valid and invalid events from validated data fields ■ a va...

  • Page 412

    412 data integration (flash professional only) data connectivity (flash professional only) you use the connector components in flash to connect to your data source. The schema for your data source is mapped to properties of a connector component. A typical application might contain several connector...

  • Page 413

    Data connectivity (flash professional only) 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 we...

  • Page 414

    414 data integration (flash professional only) 5. Click the schema tab and view the auto-generated schema for the web service: the schema tab displays a schematic representation of the service that you are calling. The parameters and results structure are defined within the schema. The tips schema s...

  • Page 415

    Data connectivity (flash professional only) 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 servi...

  • Page 416

    416 data integration (flash professional only) 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...

  • Page 417

    Data connectivity (flash professional only) 417 6. 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 applica...

  • Page 418

    418 data integration (flash professional only) the string and integer fields can be bound to ui components. The array field bird can be bound to a dataset component or to list-based ui components such as list, datagrid, or combobox, which all use the data provider interface. Or, you can directly bin...

  • Page 419

    Data management (flash professional only) 419 ■ create an intermediary object that resides on the server to act as a bridge between your client and the public services you want to use. This approach offers several advantages: ■ public web services can be aggregated. With this approach you can provid...

  • Page 420

    420 data integration (flash professional only) ■ you want to create a custom transfer object implementation to complement a business class on the server. ■ you plan to send updates back to an external data source using the built-in features of the dataset and resolver components (such as automated t...

  • Page 421

    Data management (flash professional only) 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 ...

  • Page 422

    422 data integration (flash professional only) 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 int...

  • Page 423

    Data management (flash professional only) 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 datapr...

  • Page 424

    424 data integration (flash professional only) 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 ...

  • Page 425

    Data management (flash professional only) 425 the following code shows an example of accessing data at runtime. It loads an existing dataset component instance mydataset with customer information and then displays each customer’s name in the trace window. Notice that the data types for the customer ...

  • Page 426

    426 data integration (flash professional only) to access data at design time: 1. Drag a dataset component onto the stage. Name it mydataset. 2. 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", ...

  • Page 427

    Data resolution (flash professional only) 427 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 compon...

  • Page 428

    428 data integration (flash professional only) ■ 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. Resolving xml data with the xupdateresolver compone...

  • Page 429

    Data resolution (flash professional only) 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 updat...

  • Page 430

    430 data integration (flash professional only) resolving data to a relational database (flash professional only) the rdbmsresolver component creates an xml packet that can be sent to an external data source (such as asp/jsp page, servlet, and so on). The xml packet can easily be translated into sql ...

  • Page 431

    Advanced topics in data integration 431 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 ex...

  • Page 432

    432 data integration (flash professional only) ■ 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 ...

  • Page 433

    Advanced topics in data integration 433 ■ required: this is a boolean value that determines whether this field is required to have a non-null value. Validation fails if required=true but no value has been set. ■ read-only: this is a boolean value that determines whether this field can receive new va...

  • Page 434

    434 data integration (flash professional only) 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 ...

  • Page 435

    Advanced topics in data integration 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 ...

  • Page 436

    436 data integration (flash professional only) setting the schema path the path property for a schema field is an optional setting that is used in special circumstances when the schema for your component is not appropriate. Using this setting, you can create a virtual schema field (a field that exis...

  • Page 437

    Advanced topics in data integration 437 ds.Addeventlistener('calcfields', calculatedfunct); } see the dataset.Calcfields event in the components language reference. Autotrigger this kind can be applied to any property of any component but is mainly useful for connector component properties. When a n...

  • Page 438

    438 data integration (flash professional only) 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

    Advanced topics in data integration 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 id attribute. In a typical case, the id attribute in the xml file would be bound to the id field of the dat...

  • Page 440

    440 data integration (flash professional only) 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 ...

  • Page 441

    Advanced topics in data integration 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;...

  • Page 442

    442 data integration (flash professional only) 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...

  • Page 443

    Advanced topics in data integration 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 ...

  • Page 444

    444 data integration (flash professional only) virtual schemas when you bind an array of data to a dataset’s items or dataprovider property, the data set only recognizes fields that are top-level items within each row of the array. It does not recognize items nested within other objects. A virtual s...

  • Page 445

    Advanced topics in data integration 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 ( name and url ). They also contai...

  • Page 446

    446 data integration (flash professional only) adding bindings using path expressions you can use path expressions for data binding in two areas: ■ in the add binding dialog, to identify the field you are binding to ■ in the bound to dialog box, to identify the field you’re binding from. The followi...

  • Page 447

    Advanced topics in data integration 447 to add a binding using path expressions: 1. In either the add binding dialog box or the bound to dialog box, select use path expression. 2. Enter a path expression to identify the schema item to which you want to bind. Path expressions are entered in the follo...

  • Page 448

    448 data integration (flash professional only) the following example shows a sample results packet for an update packet that has no errors and contains no xml updates: 15:52:34 gmt-0700 2003"/> a sample results packet (with xml updates) follows: 15:52:34 gmt-0700 2003"> found"/> the results packet c...

  • Page 449

    Advanced topics in data integration 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...

  • Page 450

    450 data integration (flash professional only) ■ id : a number that uniquely identifies the operation within the transaction. This information should accompany the results packet returned to this component. ■ newvalue : this attribute contains the new value for a field that was modified. It appears ...

  • Page 451

    Advanced topics in data integration 451 the following example shows a sample rdbmsresolver component results packet (with both update results and change information nodes): 15:52:34 gmt-0700 2003"> found"/> employee."> the results packet contains four types of nodes: operation nodes contain the resu...

  • Page 452

    452 data integration (flash professional only) update nodes contain information about records that have been modified since the client was last updated. Update nodes should have field child nodes that list the fields that are necessary to uniquely identify the record that was deleted and that descri...

  • Page 453

    Advanced topics in data integration 453 to request the data, use the myarray[myindex] actionscript expression, as for any array. You must access the array using numeric indices; that is, myindex must be a number. To iterate over the array, use the following statement: for(var i=0; i the expression f...

  • Page 454

    454 data integration (flash professional only).

  • Page 455

    455 17 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 ...

  • Page 456

    456 publishing before you publish your swf file, it’s important to test how the swf file works using the test movie and test scene commands. This chapter contains the following sections: playing your flash swf files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....

  • Page 457

    About publishing secure flash documents 457 about publishing secure flash documents flash player 8 contains several features that help you ensure the security of your flash documents. The security features are: ■ buffer overrun protection ■ exact domain matching for sharing data between documents ■ ...

  • Page 458

    458 publishing about local and network playback security flash player 8 introduces a new security model that lets you determine the local and network playback security for swf files that you publish. By default, swf files are granted read access to local files and networks. However, a swf file with ...

  • Page 459

    Publishing flash documents 459 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 actio...

  • Page 460

    460 publishing to set general publish settings for a flash document: 1. 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. 2. In the ...

  • Page 461

    Publishing flash documents 461 setting publish options for the flash swf file format when publishing a flash document, you can set image and sound compression options, and an option to protect your swf file from being imported. You use the controls in the flash panel of the publish settings dialog b...

  • Page 462

    462 publishing 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 sw...

  • Page 463

    Publishing flash documents 463 9. 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 ...

  • Page 464

    464 publishing 5. 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 ab...

  • Page 465

    Publishing flash documents 465 to publish html that displays your flash swf file: 1. 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 but...

  • Page 466

    466 publishing 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 menu parameter is set to true). Device font (windows only) substi...

  • Page 467

    Publishing flash documents 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 transp...

  • Page 468

    468 publishing the following browsers support windowless modes: configuring publish settings for flash player detection you can configure your document to detect your users’ flash player version. If you select detect flash version in the publish settings dialog box, your swf is embedded in a web pag...

  • Page 469

    Publishing flash documents 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: 1. Select file > publish settings, and select the html tab. 2. Select either the flash only or flash https...

  • Page 470

    470 publishing 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 ...

  • Page 471

    Publishing flash documents 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 th...

  • Page 472

    472 publishing web snap adaptive is the same as the adaptive palette option except it converts similar colors to the web 216 color palette. The resulting color palette is optimized for the image, but when possible, flash uses colors from the web 216 palette. This produces better colors for the image...

  • Page 473

    Publishing flash documents 473 4. For dimensions, enter a width and height in pixels for the exported bitmap image, or select match movie to make the jpeg image the same size as the stage and maintain the aspect ratio of your original image. 5. For quality, drag the slider or enter a value to contro...

  • Page 474

    474 publishing 4. 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, t...

  • Page 475

    Publishing flash documents 475 7. Select one of the following palette types to define the color palette for the png image: web 216 uses the standard 216-color, browser-safe palette to create the png image, for good image quality and the fastest processing on the server. Adaptive analyzes the colors ...

  • Page 476

    476 publishing 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...

  • Page 477

    Publishing flash documents 477 2. 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. 3. Click the quicktime panel to show its settings. 4. For dimensions, enter a width and height in pixels...

  • Page 478

    478 publishing 10. Select file flatten (make self-contained) to combine the flash content and imported video content into a single quicktime video. Deselecting this option makes the quicktime video refer to the imported files externally; the video won’t work properly if these files are missing. 11. ...

  • Page 479

    Using publish profiles 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: 1. In the publish settings dialog box, click the create new profile (+) but...

  • Page 480

    480 publishing 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: 1. From the current p...

  • Page 481

    About html publishing templates 481 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 repla...

  • Page 482

    482 publishing customizing html publishing templates if you’re familiar with html, you can modify html template variables to create an image map, a text report, or a url report, or to insert custom values for some of the most common flash object and embed parameters (for internet explorer and netsca...

  • Page 483

    Customizing html publishing templates 483 3. When you finish editing the variables, save the template in the same folder from which you retrieved it. 4. To apply the template settings to your flash swf file, select file > publish settings, select the html panel, and select the template you modified....

  • Page 484

    484 publishing creating an image map flash can generate an image map to show any image and maintain the function of buttons that link to urls. When an html template includes the $im template variable, flash inserts the image map code. The $iu variable identifies the name of the gif, jpeg, or png fil...

  • Page 485

    Customizing html publishing templates 485 to create an image map: 1. In your flash document, select the keyframe to be used for the image map and label it #map in the frame property inspector (select window > properties if the property inspector is not visible). You can use any keyframe with buttons...

  • Page 486

    486 publishing creating a text report the $mt 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 the $mu template var...

  • Page 487

    Customizing html publishing templates 487 sample template the following default.Html template file in flash includes many of the commonly used template variables: $ttflash only $ds display macromedia flash movie in html. $df osition:absolute;top:349px;left:155px;white-space:nowrap" class="ft03">www....

  • Page 488

    488 publishing editing flash html settings you need an html document to play a flash swf file in a web browser and specify browser settings. If you are experienced with html, you can change or enter html parameters in an html editor or create custom html files to control a flash swf file. You can al...

  • Page 489

    Editing flash html settings 489 to use both tags, position the embed tag before the closing object tag, as shown in the following example: height="100" codebase="http://fpdownload.Macromedia.Com/pub/shockwave/cabs/ flash/swflash.Cab#version=7,0,0,0"> loop="true" quality="high" pluginspage="http://ww...

  • Page 491

    Editing flash html settings 491 width attribute value n or n% template variable: $wi description specifies the width of the application either in pixels or as a percentage of the browser window. Height attribute value n or n% template variable: $he description specifies the height of the application...

  • Page 492

    492 publishing pluginspage attribute 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 show...

  • Page 494

    494 publishing the default value for quality is high if this attribute is omitted. Bgcolor attribute/parameter value #rrggbb (hexadecimal rgb value) template variable: $bg description (optional) specifies the background color of the application. Use this attribute to override the background color se...

  • Page 495

    Editing flash html settings 495 description specifies the align value for the object , embed , and img tags and determines how the flash 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 a...

  • Page 498

    498 publishing 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, publi...

  • Page 499

    About configuring a web server for flash 499 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, zoo...

  • Page 500

    500 publishing.

  • Page 501

    501 18 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 ...

  • Page 502

    502 exporting 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 fil...

  • Page 503

    About export file formats 503 for more information on a specific file format, see the sections listed in the following table: adobe illustrator the adobe illustrator format is ideal for exchanging drawings between flash and other drawing applications such as macromedia freehand. This format supports...

  • Page 504

    504 exporting 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, s...

  • Page 505

    About export file formats 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 ...

  • Page 506

    506 exporting 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 th...

  • Page 507

    About export file formats 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 app...

  • Page 508

    508 exporting 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. When you ex...

  • Page 509

    About export file formats 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 t...

  • Page 510

    510 exporting 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. W...

  • Page 511

    511 19 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 ...

  • Page 512

    512 creating accessible content ■ provide captions for narrative audio. Be aware of audio in your document that might interfere with a user being able to listen to the screen reader. See “testing accessible content” on page 533 . ■ ensure that color is not the only means of conveying information. In...

  • Page 513

    Understanding screen reader technology 513 in the united states, the law that governs accessibility is commonly known as section 508, which is an amendment to the u.S. Rehabilitation act. Section 508 prohibits federal agencies from buying, developing, maintaining, or using electronic technology that...

  • Page 514

    514 creating accessible content 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 reade...

  • Page 515

    Understanding screen reader technology 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 ob...

  • Page 516

    516 creating accessible content 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 in...

  • Page 517

    Using flash to enter accessibility information for screen readers 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 actionscr...

  • Page 518

    518 creating accessible content shortcut is used to describe keyboard shortcuts to the user. The text entered in this text box is read by the screen reader. Entering keyboard shortcut text here does not create a keyboard shortcut for the selected object. You must provide actionscript keyboard handle...

  • Page 519

    Using flash to enter accessibility information for screen readers 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 fo...

  • Page 520

    520 creating accessible content to specify a name and description for a button, text field, or entire flash application: 1. 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 objec...

  • Page 521

    Using flash to enter accessibility information for screen readers 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. Specifying advanced accessibility option...

  • Page 522

    522 creating accessible content 6. 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). 7. In the accessibility panel, deselect make object accessible. Hiding an object from the screen reader you can hide an ob...

  • Page 523

    Using flash to enter accessibility information for screen readers 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 b...

  • Page 524

    524 creating accessible content keyboard shortcut example to create a keyboard shortcut, control+7, for a button with the instance name mybutton, you would do the following: 1. Select the object on the stage, display the accessibility panel, and in the shortcut field, type control+7. 2. Enter the fo...

  • Page 525

    Viewing and creating tab order and reading order 525 2. In the accessibility panel, select make movie accessible (the default setting) to expose the document to screen readers. 3. Select or deselect the make children accessible option to expose or omit any accessible objects in the document to scree...

  • Page 526

    526 creating accessible content 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. Re...

  • Page 527

    Creating a tab order index for keyboard navigation in the accessibility panel (flash professional only) 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 e...

  • Page 528

    528 creating accessible content 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. However, d...

  • Page 529

    Using accessible components 529 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 ...

  • Page 530

    530 creating accessible content 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 g...

  • Page 531

    Creating accessibility with actionscript 531 when updating accessibility properties of multiple objects at once, you need to include only a single call to accessiblity.Updateproperties (too frequent updates to the screen reader can cause some screen readers to become too verbose). See updateproperti...

  • Page 532

    532 creating accessible content 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 ), y...

  • Page 533

    Testing accessible content 533 accessibility for hearing-impaired users to provide accessibility for hearing-impaired users, you can include captions for audio content that is integral to comprehending the material. A video of a speech, for example, would probably require captions for accessibility,...

  • Page 534

    534 creating accessible content.

  • Page 535

    535 20 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 print() or printasbitmap() actionscript ...

  • Page 536

    536 printing from swf files this chapter contains the following sections: controlling printing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .536 supported printers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 537

    Building a print job 537 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/webpr...

  • Page 538

    538 printing from swf files to build a print job: 1. Create an instance of the print job object: new printjob() . 2. Start the print job and display the print dialog box for the operating system: printjob.Start() . For more information, see “starting a print job” on page 539 . 3. Add pages to the pr...

  • Page 539

    Starting a print job 539 starting a print job calling the printjob.Start() method prompts flash player to spool the print job to the 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 printin...

  • Page 540

    540 printing from swf files adding pages to a print job you add pages to your print job with the printjob.Addpage() method. Although the method can include as many as four parameters, the only required parameter is target/ level . The three optional parameters are printarea , options , and framenum ...

  • Page 541

    Starting a print job 541 the xmin , xmax , ymin , and ymax values represent screen pixels relative to the target level or 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 ...

  • Page 542

    542 printing from swf files 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 a...

  • Page 543

    Printing frames independent of the printjob class 543 sending the print job to the printer to send the print job to the printer after using the addpage() calls, use the printjob.Send() method, which causes flash player to stop spooling the print job so that the printer starts printing. Deleting the ...

  • Page 544

    544 printing from swf files to designate printable frames: 1. Open or make active the swf file that you want to publish. 2. Select the desired frame in the timeline that you want to make printable and add a keyframe. 3. In the property inspector (window > properties), enter #p in the label text box ...

  • Page 545

    Printing frames independent of the printjob class 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 ow...

  • Page 546

    546 printing from swf files 3. 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. 4. Select the frame in the timeline that contains the shape you want to use for the bounding...

  • Page 547

    Using frame labels to disable printing 547 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 t...

  • Page 548

    548 printing from swf files to disable printing in the flash player context menu by dimming the print command: 1. Open or make active the flash document (fla file) that you want to publish. 2. Select the first keyframe in the main timeline. 3. Select window > properties to view the property inspecto...

  • Page 549

    Printing from the flash player context menu 549 to print frames using the flash player context menu print command: 1. 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 ...

  • Page 550

    550 printing from swf files 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 fla...

  • Page 551

    551 21 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 brows...

  • Page 552

    552 creating e-learning content setting navigation options for a learning interaction . . . . . . . . . . . . . . . . . . . . . . . . .584 setting control button labels for a learning interaction . . . . . . . . . . . . . . . . . . . . . . .585 tracking to aicc- or scorm-compliant learning managemen...

  • Page 553

    Including a flash learning interaction in a document 553 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 trac...

  • Page 554

    554 creating e-learning content to create a quiz: 1. Create a new file by selecting file > new. 2. In the new from template window, select the templates tab. 3. In the category column, select quiz; then in the templates column, select one of the quiz styles. Setting the quiz parameters after you cre...

  • Page 555

    Including a flash learning interaction in a document 555 to set quiz parameters: 1. 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. 2. Do one of the following to open the component inspector: ■...

  • Page 556

    556 creating e-learning content 3. 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. 4. In the questions to ask text box, specify the number of questions to ask for one presentation of the quiz. If...

  • Page 557

    Including a flash learning interaction in a document 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...

  • Page 558

    558 creating e-learning content 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 interacti...

  • Page 559

    Including a flash learning interaction in a document 559 4. In the property inspector, click launch component inspector. 5. 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 i...

  • Page 560

    560 creating e-learning content 8. 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 5...

  • Page 561

    Including a flash learning interaction in a document 561 4. On the interactions layer, select the frame you added and select insert > timeline > blank keyframe. 5. To add an interaction, do one of the following: ■ to copy and paste an interaction that already exists in the timeline, right-click (win...

  • Page 562

    562 creating e-learning content to add a stand-alone learning interaction to the timeline when not using a quiz template: 1. 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. 2. Select w...

  • Page 563

    Including a flash learning interaction in a document 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 t...

  • Page 564

    564 creating e-learning content to remove an interaction from the timeline: 1. 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. 2. To delete frames across all layers, d...

  • Page 565

    Changing the appearance of a learning interaction 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 yo...

  • Page 566

    566 creating e-learning content 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 compone...

  • Page 567

    Configuring learning interactions 567 testing a quiz it is important to test a quiz frequently as you add and remove interactions. To test a quiz: 1. Select control > test movie. The quiz appears in the flash player window. 2. Answer the questions as they appear. 3. When you complete the quiz, close...

  • Page 568

    568 creating e-learning content 3. 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. 4. In the matches target name column, list the matching...

  • Page 569

    Configuring learning interactions 569 to remove a drag and drop object: 1. Select the drag and drop instance that you want to remove, and delete it from the stage. 2. Select the drag and drop component (to the left of the stage in the quiz template), and then display the component inspector by openi...

  • Page 570

    570 creating e-learning content 3. 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. ■ t...

  • Page 571

    Configuring learning interactions 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: 1. If you are not using a quiz template, place the learning interaction on the stage...

  • Page 572

    572 creating e-learning content 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 ...

  • Page 573

    Configuring learning interactions 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 intera...

  • Page 574

    574 creating e-learning content 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 ...

  • Page 575

    Configuring learning interactions 575 to configure a multiple choice interaction: 1. 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,...

  • Page 576

    576 creating e-learning content 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: 1. If you are not using a quiz template, place the learning interaction on the stage. If you are...

  • Page 577

    Adding, naming, and registering assets 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 learni...

  • Page 578

    578 creating e-learning content 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...

  • Page 579

    Adding, naming, and registering assets 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 fo...

  • Page 580

    580 creating e-learning content drag and drop learning interaction asset names fill in the blank learning interaction asset names hot object learning interaction asset names asset description object type instance name question text field holds question text dynamic text field template_question feedb...

  • Page 581

    Adding, naming, and registering assets 581 hot spot learning interaction asset names multiple choice learning interaction asset names true or false learning interaction asset names asset description object type instance name question text field holds question text dynamic text field template_questio...

  • Page 582

    582 creating e-learning content 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: 1. Select the interaction component (to the left of the stage in the qui...

  • Page 583

    Setting knowledge track options for a learning interaction 583 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...

  • Page 584

    584 creating e-learning content to set knowledge track options for an interaction: 1. Select the learning interaction component to the left of the stage in the quiz template. 2. If the component inspector is not already visible, open it from the property inspector, and then click options at the bott...

  • Page 585

    Setting control button labels for a learning interaction 585 3. 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 the...

  • Page 586

    586 creating e-learning content 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 fi...

  • Page 587

    Tracking to aicc- or scorm-compliant learning management systems 587 5. 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. See “preparing flash learning interactions for w...

  • Page 588

    588 creating e-learning content 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 followi...

  • Page 589

    Tracking to aicc- or scorm-compliant learning management systems 589 8. Open the new copy of the frameset.Htm file in a text editor. The following lines are found in the frameset.Htm file: frameborder="0"> 9. In the second line, change untitled-1.Htm to the name of the html file you published in fla...

  • Page 590

    590 creating e-learning content extending learning interaction scripts 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...

  • Page 591

    Extending learning interaction scripts 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...

  • Page 592

    592 creating e-learning content 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-learnin...

  • Page 593

    593 a 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...

  • Page 594

    594 using templates using advertising templates advertising templates facilitate the creation of standard rich media types and sizes defined by the interactive advertising bureau (iab) and accepted by the industry. For more information on iab-endorsed ad types, see the iab site at www.Iab.Net . Test...

  • Page 595

    Using templates 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 professio...

  • Page 596

    596 using templates 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-run...

  • Page 597

    Using templates 597 for more information on adding slides and transitions, see the instructions in “using the screen presentation templates (flash professional only)” on page 599 . Using the photo slideshow template the photo slideshow template lets you easily create and customize a photo slideshow....

  • Page 598

    598 using templates 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. To adjust...

  • Page 599

    Using templates 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 arr...

  • Page 600

    600 using templates to create a slide: 1. Create a new file using one of the screen presentation templates. 2. 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. ■ righ...

  • Page 601

    Using templates 601 using the mobile device templates flash content is viewable across multiple browsers, platforms, and mobile phones. You can author the following: ■ high-quality animations ■ games ■ rich-media custom user interfaces for devices and desktop systems ■ immersive e-commerce and busin...

  • Page 602

    602 using templates 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 for...

  • Page 603

    Using templates 603 to customize the response form: 1. Select the response form in the screen outline pane. 2. 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-edita...

  • Page 604

    604 using templates 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: 1. ...

  • Page 605

    605 b 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 engin...

  • Page 606

    606 xml to ui layout tag summary for xml to ui dialog boxes the following tags are used for dialog box layout: tag description creates one column in a tabular grid layout. Creates a container tag for the tags in a tabular grid layout. Creates the container tag for the entire dialog box. Creates a co...

  • Page 607

    Control tag summary for xml to ui dialog boxes 607 control tag summary for xml to ui dialog boxes the following xml tags are used to create controls: tag description creates a button control. Creates a check box control. Creates a file chooser control (this is not part of the xul standard). Creates ...

  • Page 608

    608 xml to ui availability flash mx 2004. Usage ... Child tags ... Attributes none. Child tags control tags. Parent tag 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. Example see the example for . Availability fla...

  • Page 609

    609 child tags parent tag description layout tag; creates a container tag for the tags in a tabular grid layout. The tag must be within a tag. Example see the example for . Availability flash mx 2004. Usage id = "myid" title="yourtitle" buttons="accept[, cancel]"> ... Child tags ... Id = "myid" titl...

  • Page 610

    610 xml to ui example for an example that uses the tag with the and tags, see the examples in and . For an example that uses the tag with the tag, see the example in . Availability flash mx 2004. Usage ... Child tags ... Attributes none. Child tags , parent tag description layout tag; creates a cont...

  • Page 611

    611 example the following example uses the , and tags to define a dialog box. To see how this dialog box works with a javascript api command, see the example for . Availability flash mx 2004. Usage ... Child tags ... Attributes none. Child tags , parent tag , ,.

  • Page 612

    612 xml to ui description layout tag; creates a container for items laid out horizontally. All layout objects defined within 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. Example the followin...

  • Page 613

    613 availability flash mx 2004. Usage ... Child tags ... Attributes none. Child tags control tags. Parent tag description layout tag; creates one row in a tabular grid layout. The row tag must be within a tag, which must be within a tag..

  • Page 614

    614 xml to ui example the following example uses the tag to help define a dialog box. To see how this dialog box works with a javascript api command, see the example for . Availability flash mx 2004. Usage ... Child tags ... Attributes none. Child tags parent tag.

  • Page 615

    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. Example the following example uses the , and tags to define a dialog box. To see how this dialog box works with a javascript api command, see the example for . Availab...

  • Page 616

    616 xml to ui description layout tag; creates a separator bar that displays vertically in an and horizontally in a . 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 ...

  • Page 617

    617 the following example adds a separator bar and removes the tags: navigation" buttons="accept, cancel"> required="true" /> checked="false" /> the modified tags produce the following dialog box: availability flash mx 2004. Usage attributes none. Child tags none. Required="true" /> checked="false" ...

  • Page 618

    618 xml to ui parent tag , , , 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...

  • Page 619

    619 the trace selections command now appears on the commands menu. If you select the trace selections command from the commands menu, the dialog box defined by trace selections.Xml appears, as shown in the following figure: finally, add the tag to the trace selections.Xml file: cancel"> adding the t...

  • Page 620

    620 xml to ui availability flash mx 2004. Usage ... Child tags ... Attributes none. Child tags , , control tags parent tag description layout tag; creates a container for items laid out vertically..

  • Page 621

    621 example the following example redefines the -based dialog box used in the example with and tags instead: the following figure shows the skew selection dialog box defined using and tags instead of the tag. Red and blue outlines of the vbox and hbox containers have been added to show how these con...

  • Page 622

    622 xml to ui availability flash mx 2004. Usage id=”myid” label=”mylabel” tabindex=”myidx” accesskey=”mychar”/> attributes id string; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. Label string; text that ...

  • Page 623

    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/ butt...

  • Page 626

    626 xml to ui size number; an integer that sets the width of the input field using the average character width. Tabindex number; an integer used to set the control’s position in the tab order (available only on windows). Type string; can be either "open" or "save" . Value string; default text that a...

  • Page 627

    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: cancel"> the choosefile command now appears on the commands menu. If you have a flash document open, you can select the choosefile command from the commands ...

  • Page 628

    628 xml to ui 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. Create tw...

  • Page 629

    629 the setcolor command now appears on the commands menu. If you have a flash document open, draw a shape on the stage and select the setcolor command from the commands menu. The dialog box defined by setcolor.Xml appears, as shown in the following figure: availability flash mx 2004. Usage id="myid...

  • Page 630

    630 xml to ui 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 fil...

  • Page 631

    631 child tags none. Parent tag , , , 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. Cancel"> cancel"> availability flash mx 2004. Usage id="my...

  • Page 632

    632 xml to ui attributes id string; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. Rows number; an integer representing the number of rows to display in the listbox. Tabindex number; an integer used to set...

  • Page 633

    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/ skewl...

  • Page 634

    634 xml to ui 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: cancel"> the skewlist command now appears on the commands menu. Draw a shape on the stage, and select it with the pointer tool. If you select the ske...

  • Page 635

    635 availability flash mx 2004. Usage label="mylabel" value="myvalue"/> attributes label string; text that appears in the listbox for that item. Value string; text that is returned if the user selects the item. If not set, the value of the label attribute is returned. Child tags none. Parent tag des...

  • Page 636

    636 xml to ui availability flash mx 2004. Usage id="myid" tabindex="myidx"> ... Id="myid" tabindex="myidx"> ... Attributes id string; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. Tabindex number; an inte...

  • Page 637

    637 parent tag , , , description control tag; creates a pop-up menu control that contains and tags. 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 ...

  • Page 638

    638 xml to ui 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: cancel"> cancel">.

  • Page 639

    639 the convert to symbol command now appears on the commands menu. Draw a shape on 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: avai...

  • Page 640

    640 xml to ui description control tag; creates the pop-up menu of a pop-up menu control, and must contain at least one tag. 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 . Availability flash mx...

  • Page 641

    641 attributes label string; text that appears in the pop-up menu for that item. Value string; text that is returned if the user selects the item. If not set, the value of the label attribute is returned. Child tags none. Parent tag description control tag; creates the pop-up aspect of a pop-up menu...

  • Page 642

    642 xml to ui availability flash mx 2004. Usage id="mylabel" tabindex="" minvalue="" maxvalue=""/> attributes id string; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. Tabindex number; an integer that repr...

  • Page 643

    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

    644 xml to ui 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: the skew command now appears on the commands menu. Draw a shape on the stage, then select it with the pointer tool. If you then select the skew command f...

  • Page 645

    645 category flash mx 2004. Usage id="myid"/> attributes id 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 description control tag; creates a custom property in an embed...

  • Page 646

    646 xml to ui attributes id string; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. Label string; defines a string that appears above the group of radio buttons. Groupbox boolean value; if true , the entire...

  • Page 647

    647 attributes label text that appears next to the radio button. Selected boolean value; if true, it makes the radio button the default selection in the radio group. Accesskey string; a character to be used for the keyboard shortcut for this control (available only on windows). Child tags none. Pare...

  • Page 648

    648 xml to ui attributes id string; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. Class the class or classes for which to list instances. Required boolean value; if true , the ok button cannot function un...

  • Page 650

    650 xml to ui 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 fold...

  • Page 651

    About the configuration folders 651 the scale command now appears on the commands menu. Draw a shape on the stage and select it with the pointer tool. If you select the scale command from the commands menu, the dialog box defined by scale.Xml appears, as shown in the following figure: about the conf...

  • Page 652

    652 xml to ui user configuration: windows: ■ 98 second edition: c:\windows directory\application data\macromedia\flash 8 ■ 2000 and xp: c:\documents and settings\user name\local settings\application data\macromedia\flash 8 mac os: ■ mac os x: hard disk/users/user name/library/application support/mac...

  • Page 653

    About the configuration folders 653 user level configuration directories the user configuration folders are: 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 folde...

  • Page 654

    654 xml to ui all users level configuration folder the all users configuration folder contains the helppanel folder, which in turn contains the files that drive the help panel. These files can exist in both all users and user configuration folders. The user configuration folder has precedence when t...

  • Page 655

    655 index a absolute target path 39 accessibility animation and 528 automatic labeling 518 automatic labels for buttons and input text fields 525 button and text field labels for 518 components 529 creating properties in actionscript 530 creating reading and tab order using actionscript 532 creating...

  • Page 656

    656 index adobe illustrator files exporting 503 importing 198 adobe photoshop files exporting 502 importing 194 adpcm compression, for sounds 322 advanced effect, for symbol instances 92 aicc communication overview 586 preparing compliant files for web hosting 588 tracking quiz results 583 tracking ...

  • Page 657

    Index 657 automating tasks 58 avi files, exporting 509 aviation industry cbt committee, tracking to a compliant lms 586 b background color 25 bandwidth profiler defined 66 settings 67 timeline graph 67 base attribute 495 behaviors bring forward 95 bring to front 95 controlling instances with 94 dupl...

  • Page 658

    658 index button symbols 79 buttons accessible descriptions for 520 accessible labels for 518 adding sounds to 315 creating 86 disabling and enabling 88 disjoint rollover 88 down state for 87 editing and testing 88 enabling 88 frame states for 86 hit state for 87 naming for accessibility 519 over st...

  • Page 659

    Index 659 compiled clip, in library panel 31 component inspector bindings tab 403 drag and drop interactions and 567 feedback options and 582 fill in the blank interactions and 569 hot object interactions and 571 hot spot interactions and 573 knowledge track options and 583 multiple choice interacti...

  • Page 660

    660 index distribute to layers command 253 distributing flash swf files 456 objects to layers 253 objects to top, bottom, left, right, or center 222 dithering colors, gif files 471, 474 document command 23 document, setting background color 24 dimensions 24 frame rate 23 properties for 23 ruler unit...

  • Page 661

    Index 661 pencil tool 136 pixels, snapping to 152 polygons and stars 138 precise lines and curves 138 punch command 135 reshaping lines and shapes 146 rounded rectangles 137 shapes, modifying 150 showing anchor points on shapes 146 snapping line end points 154 snapping objects 152 snapping to pixels...

  • Page 662

    662 index files closing, in projects 73 deleting, in projects 71 finding missing, in projects 73 importing 193 moving and opening, in projects 71 opening, with version control 75 saving, in projects 72 see also documents fill in the blank interaction asset names 580 configuring in the component insp...

  • Page 663

    Index 663 folders in library panel 33 renaming, in projects 73 working with projects 71 font symbol identifier string for 173 linkage option for 173 fonts choosing 167 creating font symbols 173 device 172 embedded and device 160 embedding 172 finding and replacing 50 mapping 180 optimizing 65 proper...

  • Page 664

    664 index graphic object, converting to a symbol 32 graphic symbols about 79 controlling with behaviors 94 graphics creating symbol instances 85 load behavior 95 setting animation options 93 grayscale images, in imported freehand files 197 group command 211 groups breaking apart 222 creating 211 edi...

  • Page 665

    Index 665 instance properties dialog box 91 instances, symbol behavior, changing 93 behaviors 94 breaking apart 222 color and transparency, changing 91 creating 85 defined 77 info panel 102 information, getting 102 naming 85 properties, changing 91 selecting 208 swapping 92 unlinking from symbol 101...

  • Page 666

    666 index creating permanent 36 included in flash 36 opening from other flash files 31 resolving conflicts between assets 108 sounds in 313 using shared 104 library command 31 library panel adding an item to a document 32 columns in 32 deleting items in 34 editing items in 34 finding unused items in...

  • Page 667

    Index 667 menu parameter publish settings 466 mime types configuring for 458 flash player 499 mobile devices, templates 601 modify onion markers button 267 morphing 261 motion guide command 257 motion path creating and hiding 257 linking layers to 258 orienting or snapping tweened elements to 257 un...

  • Page 668

    668 index erasing 149 flipping 221 grouping 211 hiding from screen readers 521 making accessible 517 matching size 222 modifying with envelope modifier 219 moving 212 pasting 213 resizing 219 restoring transformed 221 rotating 219 scaling 219 selecting 208 selecting with a selection marquee 209 sele...

  • Page 669

    Index 669 pointer 139 preferences 139 using 138 pencil tool drawing modes 136 drawing with 136 smoothing curves 154 straightening lines 154 photo slideshow template 597 pict files exporting 506 importing 194 pixel snapping 152 play attribute/parameter 492 play modes, graphic instances 93 play once o...

  • Page 670

    670 index publish command 459 publish preview command 498 publish profiles, for projects 72 publish settings file formats created 459 generating html 464 projectors 459 publishing about 25 projects 72 q quality attribute/parameter 493 quality option, for mp3 sound compression 324 quality parameter p...

  • Page 671

    Index 671 s salign parameter 495 salign parameter publish settings 467 sample rate for adpcm sound compression 323 for raw sound compression 324 save and compact command 58 save as command 26 save as template command 26 save command 26 saving documents 25 documents as templates 26 files, in projects...

  • Page 672

    672 index form screens 339 fully rendering content 352 instance name 358 instance name, viewing and changing 347 movie explorer and 357 moving 353 moving a child screen on the stage 348 multiple, selecting 352 naming 346 navigation and control, behaviors for 354 nested, adding 345 nested, viewing 34...

  • Page 673

    Index 673 shareable content object reference model. See scorm shared libraries adding sounds to 203, 316 font symbols 173 using assets 104 shared library assets during authoring, about 104 during runtime 104, 105 updating or replacing during authoring 107 show pen preview preference 139 show precise...

  • Page 674

    674 index stand-alone flash player 498 start dragging movieclip behavior 95 start option, for sound 315 statements, reordering 329 static images, exporting frames as 501 static text changing to dynamic text for accessibility 521 creating 162 defined 157 and screen reader reading order 532 still imag...

  • Page 675

    Index 675 t tab order about 525 in accessibility panel 526 in actionscript 532 default for accessibility 525 viewing 527 tabs, for multiple documents 25 tangent handles, adjusting 144 target objects, adding and removing 568 target paths about 39 absolute 39 expression 42 level names 40 relative 40 s...

  • Page 676

    676 index text fields creating and removing dynamically 184 naming for accessibility 520 rich text formatting in 178 setting properties dynamically 185 triggering scripts with events 188 text fonts choosing 167 device 160 embedded 160 outlines 160 properties 167, 168 selecting 167 selecting device 1...

  • Page 677

    Index 677 transparent windowless mode, and accessibility 514 true or false interaction asset names 581 configuring in the component inspector 576 tweened frames, dragging keyframes in 266 tweening about 248 along a path 257 motion 248, 253 motion paths for 257 shape 248, 261 symbol colors 253 u undo...

  • Page 678

    678 index 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...