MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Using Manual

Other manuals for DIRECTOR MX 2004-USING DIRECTOR: Using Manual, Using Manual, Using Manual, Using Manual, Using Manual

Summary of DIRECTOR MX 2004-USING DIRECTOR

  • Page 1

    Using flash.

  • Page 2

    Trademarks add life to the web, afterburner, aftershock, andromedia, allaire, animation powerpack, aria, attain, authorware, authorware star, backstage, bright tiger, clustercats, coldfusion, contribute, design in motion, director, dream templates, dreamweaver, drumbeat 2000, edje, ejipt, extreme 3d...

  • Page 3: Contents

    3 contents chapter 1: working with flash documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 creating or opening a document and setting properties. . . . . . . . . . . . . . . . . . . . . 12 using document tabs for multiple documents (windows only) . . . . . . . . . . . . . . . 14 s...

  • Page 4

    4 contents chapter 3: using symbols, instances, and library assets . . . . . . . . . . . . . . . . 53 types of symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 about controlling instances and symbols with actionscript. . . . . . . . . . ....

  • Page 5

    Contents 5 chapter 6: working with text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 about unicode text encoding in flash applications . . . . . . . . . . . . . . . . . . . . . . . 107 about font outlines and device fonts . . . . . . . . . . . . . . . . . . . . . . ....

  • Page 6

    6 contents tweening shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 using shape hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 creating frame-by-frame animations . . . . . . . . . ...

  • Page 7

    Contents 7 selecting and moving screens (flash professional only) . . . . . . . . . . . . . . . . . . . . 226 creating controls and transitions for screens with behaviors (flash professional only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 using find and re...

  • Page 8

    8 contents chapter 17: creating accessible content . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 worldwide accessibility standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 macromedia flash accessibility web page . . . . . . . . . . . . . . . . . . . ....

  • Page 9

    Contents 9 appendix b: xml to ui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 layout tag summary for xml to ui dialog boxes . . . . . . . . . . . . . . . . . . . . . . . . 435 control tag summary for xml to ui dialog boxes . . . . . . . . . . . . . . . . ...

  • Page 10

    10 contents.

  • Page 11: Chapter 1

    11 chapter 1 working with flash documents when you create and save macromedia flash mx 2004 and macromedia flash mx professional 2004 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 t...

  • Page 12

    12 chapter 1: working with flash documents using the undo, redo, and repeat menu commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 using the history panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 saving doc...

  • Page 13

    Creating or opening a document and setting properties 13 to open an existing document: 1. Select file > open. 2. In the open dialog box, navigate to the file or enter the path to the file in the go to text box. 3. Click open. To set properties for a new or existing document in the document propertie...

  • Page 14

    14 chapter 1: working with flash documents to change document properties with the property inspector: 1. Deselect all assets, then select the selection tool. 2. If the property inspector is not visible, select window > properties. 3. Click the size control to display the document properties dialog b...

  • Page 15

    Saving flash documents 15 to save a flash document: 1. Do one of the following: ■ to overwrite the current version on the disk, select file > save. ■ to save the document in a different location and/or with a different name, or to compress the document, select file > save as. 2. If you selected the ...

  • Page 16

    16 chapter 1: working with flash documents 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 17

    Using the library to manage media assets 17 behaviors are prewritten actionscript scripts that you add to an object to control that object. Behaviors let you add the power, control, and flexibility of actionscript coding to your document without having to create the actionscript code. You can use be...

  • Page 18

    18 chapter 1: working with flash documents you can create permanent libraries in your flash application that is available whenever you start flash. Flash also includes several sample libraries containing buttons, graphics, movie clips, and sounds that you can add to your flash documents. The sample ...

  • Page 19

    Using the library to manage media assets 19 to convert an object to a symbol in the library: • drag the item from the stage onto the current library panel. To use a library item from the current document in another document: • drag the item from the library or stage into the library or stage for ano...

  • Page 20

    20 chapter 1: working with flash documents to edit a library item: 1. Select the item in the library panel. 2. Select one of the following from the library options menu: ■ select edit to edit an item in flash. ■ select edit with and then select an external application to edit the item. Note: when st...

  • Page 21

    About actionscript 21 updating imported files in the library panel if you use an external editor to modify files that you have imported into flash, such as bitmaps or sound files, you can update the files in flash without reimporting them. You can also update symbols that you have imported from exte...

  • Page 22

    22 chapter 1: working with flash documents actionscript is based on the ecmascript specification (ecma-262), the international standard for the ecmascript programming language. Actionscript offers a subset of ecmascript’s functionality. For more information about ecmascript, see the ecma internation...

  • Page 23

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

  • Page 24

    24 chapter 1: working with flash documents the following example shows the hierarchy of a document named westcoast on level 0, which contains three movie clips: california, oregon, and washington. Each of these movie clips in turn contains two movie clips. _level0 westcoast california sanfrancisco b...

  • Page 25

    Using absolute and relative target paths 25 relative paths a relative path depends on the relationship between the controlling timeline and the target timeline. Relative paths can address targets only within their own level of flash player. For example, you can’t use a relative path in an action on ...

  • Page 26

    26 chapter 1: working with flash documents to specify a target path: • use the insert target path button (and dialog box) in the actions panel. • enter the target path manually. • create an expression that evaluates to a target path. You can use the built-in functions targetpath and eval . To assign...

  • Page 27

    Working with scenes 27 the following script assigns the value 1 to the variable i . It then uses the eval function to create a reference to a movie clip instance and assigns it to the variable x . The variable x is now a reference to a movie clip instance and can call the movieclip object methods. I...

  • Page 28

    28 chapter 1: working with flash documents to change the order of a scene in the document: • drag the scene name to a different location in the scene panel. 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...

  • Page 29

    Using the movie explorer 29 to select an item in the movie explorer: • click the item in the navigation tree. Shift-click to select more than one item. The full path for the selected item appears at the bottom of the movie explorer. Selecting a scene in the movie explorer shows the first frame of th...

  • Page 30

    30 chapter 1: working with flash documents using find and replace you can use the find and replace feature to find and replace a specified element in a flash document. You can search for a text string, a font, a color, a symbol, a sound file, a video file, or an imported bitmap file. You can replace...

  • Page 31

    Using find and replace 31 match case searches for text that exactly matches the case (uppercase and lowercase character formatting) of the specified text when finding and replacing. Regular expressions searches for text in regular expressions in actionscript. An expression is any statement that flas...

  • Page 32

    32 chapter 1: working with flash documents ■ to replace the specified font with a different font style, select font style under replace with and select a font style from the pop-up menu. When font style is deselected under replace with, the current style of the specified font remains unchanged. ■ to...

  • Page 33

    Using find and replace 33 ■ click the color picker button and select a color from the system color picker. ■ drag from the color control to make the eyedropper tool appear. Select any color on your screen. 5. Select the fills, strokes, or text option or any combination of those options to specify wh...

  • Page 34

    34 chapter 1: working with flash documents to find and replace a sound, video, or bitmap: 1. Select edit > find and replace. 2. Select sound, video, or bitmap from the for pop-up menu. 3. For name, enter a sound, video, or bitmap filename or select a name from the pop-up menu. 4. Under replace with,...

  • Page 35

    Using the history panel 35 using the history panel the history panel shows a list of the steps you’ve performed in the active document since you created or opened that document, up to a specified maximum number of steps. (the history panel doesn’t show steps you’ve performed in other documents.) the...

  • Page 36

    36 chapter 1: working with flash documents to undo multiple steps at once: • drag the slider to point to any step. • click to the left of a step along the path of the slider; the slider scrolls automatically to that step, undoing all subsequent steps as it scrolls. Note: scrolling to a step (and sel...

  • Page 37

    Automating tasks with the commands menu 37 to reuse steps from one document in another document: 1. In the document containing the steps you want to reuse, select the steps in the history panel. 2. In the history panel options menu, select copy steps. 3. Open the document into which you want to past...

  • Page 38

    38 chapter 1: working with flash documents 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 39

    About the links menu in flash player 39 to get more commands: 1. Make sure you are connected to the internet. 2. Select commands > get more commands. About customizing context menus in flash documents you can customize the standard context menu and the text-editing context menu that appears with fla...

  • Page 40

    40 chapter 1: 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 expo...

  • Page 41

    Testing document download performance 41 • avoid animating bitmap elements; use bitmap images as background or static elements. • for sound, use mp3, the smallest sound format, whenever possible. To optimize elements and lines: • group elements as much as possible. • use layers to separate elements ...

  • Page 42

    42 chapter 1: working with flash documents when external swf files, gif and xml files, and variables are streamed into a player by using actionscript calls such as loadmovie and geturl , the data flows at the rate set for streaming. The stream rate for the main swf file is reduced based on the reduc...

  • Page 43

    Printing from the flash authoring tool 43 6. If necessary, adjust the view of the graph by taking one of the following actions: ■ select view > streaming graph to show which frames cause pauses. This default view displays alternating light and dark gray blocks that represent each frame. The side of ...

  • Page 44

    44 chapter 1: working with flash documents to set printing options: 1. Select file > page setup (windows) or file > print margins (macintosh). 2. Set page margins. Select both center options to print the frame in the center of the page. 3. In the frames pop-up menu, select whether to print all frame...

  • Page 45: Chapter 2

    45 chapter 2 working with projects (flash professional only) in macromedia flash mx professional 2004, 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 vers...

  • Page 46

    46 chapter 2: 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 pr...

  • Page 47

    Creating and managing projects (flash professional only) 47 to add a file, do one of the following: • click the add files (+) button at the lower right corner of the flash project panel. Select one or more files and click add. • right-click (windows) or control-click (macintosh) in the document wind...

  • Page 48

    48 chapter 2: working with projects (flash professional only) to specify a publish profile for a fla file in a project: 1. Select the file in the flash project panel and do one of the following: ■ select settings from the project pop-up menu. ■ right-click (windows) or control-click (macintosh) and ...

  • Page 49

    Using version control with projects (flash professional only) 49 to find a missing file: 1. Select the filename in the flash project panel. 2. Do one of the following: ■ select find missing file from the project pop-up menu. ■ right-click (windows) or control-click (macintosh) and select find missin...

  • Page 50

    50 chapter 2: working with projects (flash professional only) 6. To specify a visual sourcesafe database, select sourcesafe database from the connection menu. Note: sourcesafe database support is available for windows only. You must have microsoft visual sourcesafe client version 6 installed. A in t...

  • Page 51

    Troubleshooting remote folder setup (flash professional only) 51 troubleshooting remote folder setup (flash professional only) a web server can be configured in a wide variety of ways. The following list provides information on some common issues you may encounter in setting up a remote folder for u...

  • Page 52

    52 chapter 2: working with projects (flash professional only).

  • Page 53: Chapter 3

    53 chapter 3 using symbols, instances, and library assets a symbol is a graphic, button, or movie clip that you create in macromedia flash mx 2004 or macromedia flash mx professional 2004. You create the symbol only once; you can then reuse it throughout your document or in other documents. A symbol...

  • Page 54

    54 chapter 3: using symbols, instances, and library assets if you import library assets that have the same name as assets already in the library, you can resolve naming conflicts without accidentally overwriting existing assets. See “resolving conflicts between library assets” on page 72 . For an in...

  • Page 55

    Creating symbols 55 • use font symbols to export a font and use it in other flash documents. See “creating font symbols” on page 116 . Flash provides built-in components, movie clips with defined parameters, that you can use to add user interface elements, such as buttons, check boxes, or scroll bar...

  • Page 56

    56 chapter 3: using symbols, instances, and library assets to create a new empty symbol: 1. Make sure that nothing is selected on the stage. Then do one of the following: ■ select modify > new symbol. ■ click the new symbol button at the lower left of the library panel. ■ select new symbol from the ...

  • Page 57

    Creating symbols 57 3. Deselect your selection and make sure nothing on the stage is selected. Select modify > new symbol. 4. In the create new symbol dialog box, name the symbol. For behavior, select movie clip, then click ok. Flash opens a new symbol for editing in symbol-editing mode. 5. On the t...

  • Page 58

    58 chapter 3: using symbols, instances, and library assets creating instances after you create a symbol, you can create instances of that symbol wherever you like throughout your document, including inside other symbols. When you modify the symbol, flash updates all instances of the symbol. Flash gi...

  • Page 59

    Creating buttons 59 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 60

    60 chapter 3: 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 eno...

  • Page 61

    Editing symbols 61 to test a button, do one of the following: • select control > enable simple buttons. Move the pointer over the enabled button to test it. • select the button in the library panel and click the play button in the library preview window. • select control > test scene or control > te...

  • Page 62

    62 chapter 3: using symbols, instances, and library assets to edit a symbol in a new window: 1. Select an instance of the symbol on the stage and right-click (windows) or control-click (macintosh), and select edit in new window from the context menu. 2. Edit the symbol as needed. 3. To change the re...

  • Page 63

    Changing instance properties 63 changing the color and transparency of an instance each instance of a symbol can have its own color effect. To set color and transparency options for instances, you use the property inspector. Settings in the property inspector also affect bitmaps placed within symbol...

  • Page 64

    64 chapter 3: using symbols, instances, and library assets swapping one instance for another you can assign a different symbol to an instance to display a different instance on the stage and preserve all the original instance properties, such as color effects or button actions. For example, suppose ...

  • Page 65

    Controlling instances with behaviors 65 to set the animation 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 sequences ...

  • Page 66

    66 chapter 3: 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 > development panels > behaviors), click the add (+) button and select the desired behavior from the m...

  • Page 67

    Getting information about instances on the stage 67 breaking apart instances to break the link between an instance and a symbol and make the instance into a collection of ungrouped shapes and lines, you “break apart” the instance. This is useful for changing the instance substantially without affect...

  • Page 68

    68 chapter 3: using symbols, instances, and library assets to get information about an instance on the stage: 1. Select the instance on the stage. 2. Display the property inspector or panel you want to use: ■ to display the property inspector, select window > properties. ■ to display the info panel,...

  • Page 69

    Using shared library assets 69 to copy a library asset by copying and pasting: 1. Select the asset on the stage in the source document. 2. Select edit > copy. 3. Make the destination document the active document. 4. Place the pointer on the stage and select edit > paste in center to paste the asset ...

  • Page 70

    70 chapter 3: using symbols, instances, and library assets second, the author of the destination document defines a shared asset in the destination document and enters an identifier string and url identical to those used for the shared asset in the source document. Alternatively, the destination doc...

  • Page 71

    Using shared library assets 71 to link a shared asset to a destination document by entering the identifier and url: 1. In the destination document, select window > library to display the library panel. 2. Do one of the following: ■ select a movie clip, button, or graphic symbol in the library panel ...

  • Page 72

    72 chapter 3: using symbols, instances, and library assets to update or replace a symbol: 1. With the document open, select a movie clip, button, or graphic symbol and select properties from the library options menu. 2. If the symbol properties dialog box is in basic mode, click advanced to display ...

  • Page 73

    Resolving conflicts between library assets 73 only identical library item types may be replaced with each other. That is, you cannot replace a sound named test with a bitmap named test. In such cases, the new items are added to the library with the word copy appended to the name. Note: replacing lib...

  • Page 74

    74 chapter 3: using symbols, instances, and library assets.

  • Page 75: Chapter 4

    75 chapter 4 working with color macromedia flash mx 2004 and macromedia flash mx professional 2004 provide a variety of ways to apply, create, and modify colors. Using the default palette or a palette you create, you can choose colors to apply to the stroke or fill of an object you are about to crea...

  • Page 76

    76 chapter 4: working with color transforming gradient and bitmap fills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 copying strokes and fills with the eyedropper tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 locking a gradient or...

  • Page 77

    Working with solid colors and gradient fills in the color mixer 77 to select a stroke color, style, and weight using the property inspector: 1. Select an object or objects on the stage (for symbols, first double-click to enter symbol-editing mode). 2. If the property inspector is not visible, select...

  • Page 78

    78 chapter 4: working with color 5. If you selected the fill icon in step 4, verify that solid is selected in the fill style pop-up menu in the center of the color mixer. 6. Click the arrow in the lower right corner to expand the color mixer. 7. Do one of the following: ■ click in the color space in...

  • Page 79

    Applying solid, gradient, and bitmap fills with the paint bucket tool 79 8. To reposition a pointer on the gradient, drag the pointer along the gradient definition bar. Drag a pointer down and off of the gradient definition bar to remove it. 9. To save the gradient, click the triangle in the upper r...

  • Page 80

    80 chapter 4: working with color transforming gradient and bitmap fills you can transform a gradient or bitmap fill by adjusting the size, direction, or center of the fill. To transform a gradient or bitmap fill, you use the fill transform tool. To adjust a gradient or bitmap fill with the fill tran...

  • Page 81

    Copying strokes and fills with the eyedropper tool 81 ■ to scale a linear gradient or a fill, drag the square handle at the center of the bounding box. ■ to change the radius of a circular gradient, drag the middle circular handle on the bounding circle. ■ to skew or slant a fill within a shape, dra...

  • Page 82

    82 chapter 4: working with color locking a gradient or bitmap to fill the stage you can lock a gradient or bitmap fill to make it appear that the fill extends over the entire stage and that the objects painted with the fill are masks revealing the underlying gradient or bitmap. For information on ap...

  • Page 83

    Modifying color palettes 83 duplicating and removing colors you can duplicate colors in the palette, delete individual colors, or clear all colors from the palette. To duplicate a color or delete a color: 1. If the color swatches panel is not visible, select window > design panels > color swatches. ...

  • Page 84

    84 chapter 4: working with color 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 import...

  • Page 85: Chapter 5

    85 chapter 5 drawing the drawing tools in macromedia flash mx 2004 and macromedia flash mx professional 2004 let you create and modify shapes for the artwork in your documents. For an interactive introduction to drawing in flash, select help > how do i > basic flash > draw in flash. Before you draw ...

  • Page 86

    86 chapter 5: drawing vector graphics vector graphics describe images using lines and curves, called vectors, that also include color and position properties. For example, the image of a leaf is described by points through which lines pass, creating the leaf ’s outline. The color of the leaf is dete...

  • Page 87

    Flash drawing and painting tools 87 flash drawing and painting tools flash provides various tools for drawing freeform or precise lines, shapes, and paths, and for painting filled objects. • to draw freeform lines and shapes as if drawing with a real pencil, you use the pencil tool. See “drawing wit...

  • Page 88

    88 chapter 5: drawing about overlapping shapes in flash when you use the pencil, line, oval, rectangle, or brush tool to draw a line across another line or painted shape, the overlapping lines are divided into segments at the intersection points. You can use the selection tool to select, move, and r...

  • Page 89

    Drawing straight lines, ovals, and rectangles 89 3. Select a drawing mode under options in the tools panel: ■ select straighten to draw straight lines and convert approximations of triangles, ovals, circles, rectangles, and squares into these common geometric shapes. ■ select smooth to draw smooth c...

  • Page 90

    90 chapter 5: 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...

  • Page 91

    Using the pen tool 91 to set pen tool preferences: 1. Select the pen tool, then select edit > preferences (windows) or flash > preferences (macintosh) and click the editing tab. 2. Under pen tool, set the following options: show pen preview previews line segments as you draw. Flash displays a previe...

  • Page 92

    92 chapter 5: drawing 6. To complete the path as an open or closed shape, do one of the following: ■ to complete an open path, double-click the last point, click the pen tool in the tools panel, or control-click (windows) or command-click (macintosh) anywhere away from the path. ■ to close a path, p...

  • Page 93

    Using the pen tool 93 5. Position the pointer where you want the curve segment to end, hold down the mouse button, and drag in the opposite direction to complete the segment. Shift-drag to constrain the segment to multiples of 45°. 6. To draw the next segment of a curve, position the pointer where y...

  • Page 94

    94 chapter 5: drawing to move an anchor point: • drag the point with the subselection tool. To nudge an anchor point or points: • select the point or points with the subselection tool and use the arrow keys to move the point or points. To convert an anchor point, do one of the following: • to conver...

  • Page 95

    Painting with the brush tool 95 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 ancho...

  • Page 96

    96 chapter 5: drawing the pressure modifier varies the width of brush strokes when you vary the pressure on the stylus. The tilt modifier varies the angle of brush strokes when you vary the angle of the stylus on the tablet. The tilt modifier measures the angle between the top (eraser) end of the st...

  • Page 97

    Reshaping lines and shape outlines 97 reshaping lines and shape outlines you can reshape lines and shape outlines created with the pencil, brush, line, oval, or rectangle tools by dragging with the selection tool, or by optimizing their curves. You can also use the subselection tool to display point...

  • Page 98

    98 chapter 5: drawing straightening and smoothing lines you can reshape lines and shape outlines by straightening or smoothing them. Note: you can adjust the degree of automatic smoothing and straightening by specifying preferences for drawing settings. See “specifying drawing settings” on page 103 ...

  • Page 99

    Erasing 99 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 f...

  • Page 100

    100 chapter 5: drawing erase selected fills erases only the currently selected fills and does not affect strokes, selected or not. (select the fills you want to erase before using the eraser tool in this mode.) erase inside erases only the fill on which you begin the eraser stroke. If you begin eras...

  • Page 101

    Snapping 101 snapping to automatically align elements with one another, you can use snapping. Flash provides three ways for you to align objects on the stage: • object snapping lets you snap objects directly to other objects along their edges. • pixel snapping lets you snap objects directly to indiv...

  • Page 102

    102 chapter 5: drawing to turn pixel snapping on or off: • select view > snapping > snap to pixels. If the magnification is set to 400% or higher, a pixel grid is displayed. A check mark is displayed next to the command when it is on. To turn pixel snapping on or off temporarily: • press the c key. ...

  • Page 103

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

  • Page 104

    104 chapter 5: drawing.

  • Page 105: Chapter 6

    105 chapter 6 working with text you can include text in your macromedia flash mx 2004 and macromedia flash mx professional 2004 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...

  • Page 106

    106 chapter 6: working with text you can break text apart and reshape its characters. For additional text-handling capabilities, you can manipulate text in freehand and import the freehand file into flash, or export the file from freehand as a swf file. See “breaking text apart” on page 120 . Flash ...

  • Page 107

    About font outlines and device fonts 107 about unicode text encoding in flash applications macromedia flash player 7 supports unicode text encoding for swf files in macromedia flash player 7 format. This support greatly enhances your ability to use multilingual text in swf files that you create with...

  • Page 108

    108 chapter 6: working with text when you use a movie clip to mask text set in a device font, the rectangular bounding box of the mask is used as the masking shape. That is, if you create a nonrectangular movie clip mask for device font text in the flash authoring environment, the mask that appears ...

  • Page 109

    Creating text 109 • for static vertical text with right-to-left orientation and a fixed height, a square handle appears at the lower left corner of the text block. • for static vertical text that has left-to-right orientation and extends, a round handle appears at the lower right corner of the text ...

  • Page 110

    110 chapter 6: working with text to create text: 1. Select the text tool. 2. Select window > properties. 3. In the property inspector, select a text type from the pop-up menu to specify the type of text field: dynamic text creates a field that displays dynamically updating text. Input text creates a...

  • Page 111

    Setting text attributes 111 if you want to use actionscript, 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. See “creating scrolling text” in using actions...

  • Page 112

    112 chapter 6: working with text when using small text in a flash document, keep in mind the following guidelines: • very small text (below 8 points) may not be displayed clearly, even with alias text selected. • sans serif text, such as helvetica or arial, appears clearer at small sizes than serif ...

  • Page 113

    Setting text attributes 113 setting character spacing, kerning, and character position character spacing inserts a uniform amount of space between characters. You use character spacing to adjust the spacing of selected characters or entire blocks of text. Kerning controls the spacing between pairs o...

  • Page 114

    114 chapter 6: working with text line spacing determines the distance between adjacent lines in a paragraph. For vertical text, line spacing adjusts the space between vertical columns. To set alignment, margins, indents, and line spacing for horizontal text: 1. Select the text tool. 2. To apply sett...

  • Page 115

    Setting text attributes 115 to make horizontal text selectable by a user: 1. Select the horizontal text that you want to make selectable by a user. 2. Select window > properties. 3. In the property inspector, select static text or dynamic text (input text is selectable by default). 4. Click the sele...

  • Page 116

    116 chapter 6: working with text ■ click the render text as html button to preserve rich text formatting, such as fonts and hyperlinks, with the appropriate html tags. See “preserving rich text formatting” on page 121 . ■ click the show border button to display a black border and white background fo...

  • Page 117

    Checking spelling 117 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 118

    118 chapter 6: working with text • ignore the identified word or all occurrences of the word. • add the identified word to your personal dictionary. • delete the identified word. Using spelling setup you use the spelling setup dialog box to specify options for the check spelling feature. Before you ...

  • Page 119

    Using timeline effects with text 119 to use the check spelling feature: 1. Select text > check spelling to view the check spelling dialog box. The text box in the upper left corner identifies words not found in the selected dictionary or dictionaries, and also identifies the type of element where th...

  • Page 120

    120 chapter 6: working with text breaking text apart you can break apart text to place each character in a separate text block. After you break text apart, you can quickly distribute the text blocks to separate layers and animate each block separately. For information on distributing objects to laye...

  • Page 121

    Preserving rich text formatting 121 preserving rich text formatting flash lets you preserve rich text formatting in input and dynamic text fields. If you select the render text as html formatting option in the property inspector or set the html property of the textfield object to true , flash preser...

  • Page 122

    122 chapter 6: 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 ...

  • Page 123

    Substituting missing fonts 123 to specify font substitution: 1. Specify a font substitution preference. When the missing fonts alert appears, do one of the following: ■ click select substitute fonts to select substitute fonts from fonts installed on your system and proceed to step 2. ■ click use def...

  • Page 124

    124 chapter 6: working with text controlling text with actionscript a dynamic or input text field is an instance of the actionscript textfield object. When you create a text field, you can assign it an instance name in the property inspector. You can use the instance name in actionscript statements ...

  • Page 125

    Controlling text with actionscript 125 italic = false underline = false url = "" target = "" align = "left" leftmargin = 0 rightmargin = 0 indent = 0 leading = 0 bullet = false tabstops = [] (empty array) to create a dynamic text field: 1. Select a frame, button, or movie clip that will receive the ...

  • Page 126

    126 chapter 6: working with text setting text field properties dynamically to use actionscript to set the properties of a text field, you must assign the text field an instance name. If you create the text field on the stage with the text tool, you can assign the instance name in the property inspec...

  • Page 127

    Controlling text with actionscript 127 each character in a text field may individually be assigned a textformat object. The textformat object of the first character of a paragraph is examined to perform paragraph formatting for the entire paragraph. To format text dynamically: 1. Select window > dev...

  • Page 128

    128 chapter 6: working with text you can capture the following text field events: onchanged and onscroller . To use a text field event to trigger a script: 1. Assign an instance name to the text field. Do one of the following: ■ use the text tool to create a text field on the stage. Assign the text ...

  • Page 129

    Creating scrolling text 129 5. Replace instancename with the instance name of the text field you want to scroll. 6. Increment the scroll property by 1 to scroll the text up. The code should look like this: instname.Scroll += 1; 7. Select the down button on the stage. 8. Repeat steps 4 and 5. 9. Decr...

  • Page 130

    130 chapter 6: working with text.

  • Page 131: Chapter 7

    131 chapter 7 using imported artwork macromedia flash mx 2004 and macromedia flash mx professional 2004 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 ad...

  • Page 132

    132 chapter 7: using imported artwork • when you import png images from fireworks, you can import files as editable objects that you can modify in flash, or as flattened files that you can edit and update in fireworks. • you can select options for preserving images, text, and guides. See “importing ...

  • Page 133

    Placing artwork into flash 133 5. If the name of the file you are importing ends with a number, and there are additional sequentially numbered files in the same folder, select whether to import the sequence of files. ■ click yes to import all the sequential files. ■ click no to import only the speci...

  • Page 134

    134 chapter 7: using imported artwork the following bitmap file formats can be imported into flash only if quicktime 4 or later is installed: 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 flatte...

  • Page 135

    Placing artwork into flash 135 6. For objects, select one of the following: rasterize if necessary to maintain appearance preserves fireworks fills, strokes, and effects in flash. Keep all paths editable keeps all objects as editable vector paths. Some fireworks fills, strokes, and effects are lost ...

  • Page 136

    136 chapter 7: using imported artwork to import a freehand file: 1. Select file > import to stage or file > import to library. 2. In the import dialog box, select freehand from the files of type (windows) or show (macintosh) pop-up menu. 3. Navigate to a freehand file and select it. 4. Click open. 5...

  • Page 137

    Placing artwork into flash 137 • select which pages to import. • include invisible layers. • maintain text blocks. • rasterize everything. Choosing this option flattens layers and rasterizes text, and disables options for converting layers or maintaining text blocks. To import an adobe illustrator, ...

  • Page 138

    138 chapter 7: using imported artwork you can import two-dimensional dxf files into flash. Flash does not support three-dimensional dxf files. Although flash doesn’t support scaling in a dxf file, all imported dxf files produce 12-inch x 12-inch files that you can scale using the modify > transform ...

  • Page 139

    Working with imported bitmaps 139 to replace an instance of a bitmap with an instance of another bitmap: 1. Select a bitmap instance on the stage. 2. Select window > properties if the property inspector is not visible. 3. In the property inspector, click swap. 4. In the swap bitmap dialog box, selec...

  • Page 140

    140 chapter 7: using imported artwork applying a bitmap fill you can apply a bitmap as a fill to a graphic object using the color mixer. Applying a bitmap as a fill tiles the bitmap to fill the object. The fill transform tool allows you to scale, rotate, or skew an image and its bitmap fill. See “tr...

  • Page 141

    Working with imported bitmaps 141 5. Save the file in the image-editing application. The file is automatically updated in flash. 6. Return to flash to continue editing the document. Breaking apart a bitmap breaking apart a bitmap separates the pixels in the image into discrete areas that can be sele...

  • Page 142

    142 chapter 7: 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...

  • Page 143: Chapter 8

    143 chapter 8 working with graphic objects in macromedia flash mx 2004 and macromedia flash mx professional 2004, 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 t...

  • Page 144

    144 chapter 8: 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...

  • Page 145

    Selecting objects 145 modifying selections you can add to selections, select or deselect everything on every layer in a scene, select everything between keyframes, or lock and unlock selected symbols or groups. To add to a selection: • hold down the shift key while making additional selections. Note...

  • Page 146

    146 chapter 8: working with graphic objects to select objects by drawing both freehand and straight-edged selection areas: 1. Select the lasso tool and deselect the polygon mode modifier. 2. To draw a freehand segment, drag on the stage. 3. To draw a straight-edged segment, alt-click (windows) or op...

  • Page 147

    Moving, copying, and deleting objects 147 to edit a group or an object within a group: 1. With the group selected, select edit > edit selected, or double-click the group with the selection tool. Everything on the page that is not part of the group is dimmed, indicating it is inaccessible. 2. Edit an...

  • Page 148

    148 chapter 8: working with graphic objects to move objects using the info panel: 1. Select an object or multiple objects. 2. If the info panel is not visible, select window > design panels > info. 3. Enter x and y values for the location of the upper left corner of the selection. The units are rela...

  • Page 149

    Stacking objects 149 3. Enter scale, rotation, or skew values. See “scaling objects” on page 153 , “rotating objects” on page 153 , and “skewing objects” on page 154 . 4. Click the create copy button in the transform panel (the left button in the lower right corner of the panel). Deleting objects de...

  • Page 150

    150 chapter 8: working with graphic objects transforming objects you can transform graphic objects, as well as groups, text blocks, and instances, by using the free transform tool or the options in the modify > transform submenu. Depending on the type of element you select, you can freely transform,...

  • Page 151

    Transforming objects 151 when the center square is selected, the x and y values to the right of the coordinate grid in the info panel display the x and y coordinates of the transformation point. In addition, the x and y values for the transformation point are displayed in the property inspector for ...

  • Page 152

    152 chapter 8: working with graphic objects ■ to skew the selection, position the pointer on the outline between the transformation handles and drag. ■ to distort shapes, press control (windows) or command (macintosh) and drag a corner handle or a side handle. Shift-control-drag (windows) or shift-c...

  • Page 153

    Transforming objects 153 to modify a shape with the envelope modifier: 1. Select a shape on the stage. Note: the envelope modifier cannot modify symbols, bitmaps, video objects, sounds, gradients, object groups, or text. If a multiple selection contains any of these, only the shape objects are disto...

  • Page 154

    154 chapter 8: working with graphic objects to rotate and skew objects by dragging: 1. Select the object or objects on the stage. 2. Select modify > transform > rotate and skew. 3. Do one of the following: ■ drag a corner handle to rotate the object. ■ drag a center handle to skew the object. 4. To ...

  • Page 155

    Breaking apart groups and objects 155 to restore a transformed object to its original state: 1. Select the transformed object. 2. Select modify > transform > remove transform. To reset a transformation performed in the transform panel: • with the transformed object still selected, click the reset bu...

  • Page 156

    156 chapter 8: working with graphic objects • it places each character into a separate text block when applied to text blocks. • it converts characters to outlines when applied to a single text character. See “breaking text apart” on page 120 . The break apart command should not be confused with the...

  • Page 157: Chapter 9

    157 chapter 9 creating motion macromedia flash mx 2004 and macromedia flash mx professional 2004 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, the...

  • Page 158

    158 chapter 9: creating motion tweening shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 using shape hints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 159

    Using timeline effects 159 timeline effect settings each timeline effect manipulates a graphic or symbol in a specific way and allows you to change individual parameters for a desired effect. In the preview window, you can quickly see the changes made when you alter settings. Motion effect name and ...

  • Page 160

    160 chapter 9: creating motion expand expands, contracts, or expands and contracts objects over time. This effect works best with two or more objects grouped together or combined in a movie clip or graphic symbol. Objects containing text or letters work well with this effect. • expand duration, in f...

  • Page 161

    Tweened animation 161 editing a timeline effect you can 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...

  • Page 162

    162 chapter 9: creating motion frame-by-frame animation frame-by-frame animation changes the contents of the stage in every frame and is best suited to complex animation in which an image changes in every frame instead of simply moving across the stage. Frame-by-frame animation increases file size m...

  • Page 163

    Frame rates 163 representations of animations in the timeline flash distinguishes tweened animation from frame-by-frame animation in the timeline as follows: • motion tweens are indicated by a black dot at the beginning keyframe; intermediate tweened frames have a black arrow with a light blue backg...

  • Page 164

    164 chapter 9: creating motion extending still images when you create a background for animation, it’s often necessary that a still image remain the same for several frames. Adding a span of new frames (not keyframes) to a layer extends the contents of the last keyframe in all the new frames. To ext...

  • Page 165

    Tweening instances, groups, and type 165 flash inserts new layers below any selected layers in the timeline. The new layers are arranged top to bottom, in the order in which the selected elements were originally created. For broken-apart text, the layers are arranged in the order of the characters, ...

  • Page 166

    166 chapter 9: 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: ■ c...

  • Page 167

    Tweening instances, groups, and type 167 10. Select the sync option in the property inspector to synchronize the animation of graphic symbol instances with the main timeline. Note: modify > timeline > synchronize symbols and the sync option both recalculate the number of frames in a tween to match t...

  • Page 168

    168 chapter 9: creating motion 8. Select synchronize to ensure that the instance loops properly in the main document. Use the synchronize command if the number of frames in the animation sequence inside the symbol is not an even multiple of the number of frames the graphic instance occupies in the d...

  • Page 169

    Tweening shapes 169 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 170

    170 chapter 9: creating motion 6. Drag the arrow next to the easing value or enter a value to adjust the rate of change between tweened frames: ■ to begin the shape tween gradually and accelerate the tween toward the end of the animation, drag the slider down or enter a negative value between -1 and...

  • Page 171

    Creating frame-by-frame animations 171 to use shape hints: 1. Select the first keyframe in a shape-tweened sequence. 2. Select modify > shape > add shape hint. The beginning shape hint appears as a red circle with the letter a somewhere on the shape. 3. Move the shape hint to a point that you want t...

  • Page 172

    172 chapter 9: creating motion 6. To complete your frame-by-frame animation sequence, repeat steps 4 and 5 until you’ve built the motion you want. 7. To test the animation sequence, select control > play or click the play button on the controller. Editing animation after you create a frame or a keyf...

  • Page 173

    Editing animation 173 • to change the length of a tweened sequence, drag the beginning or ending keyframe left or right. To change the length of a frame-by-frame sequence, see “creating frame-by-frame animations” on page 171 . • to add a library item to the current keyframe, drag the item from the l...

  • Page 174

    174 chapter 9: creating motion moving an entire animation if you need to move an entire animation on the stage, you must move the graphics in all frames and layers at once to avoid realigning everything. To move the entire animation to another location on the stage: 1. Unlock all layers. To move eve...

  • Page 175

    Using mask layers 175 4. Right-click (windows) or control-click (macintosh) the mask layer’s name in the timeline, and select mask from the context menu. The layer is converted to a mask layer, indicated by a mask layer icon. The layer immediately below it is linked to the mask layer, and its conten...

  • Page 176

    176 chapter 9: creating motion.

  • Page 177: Chapter 10

    177 chapter 10 working with video macromedia flash mx 2004 and macromedia flash mx professional 2004 provide several ways for you to include video in your flash documents: • you can import video clips into flash as embedded files in quicktime video (mov), audio video interleaved file (avi), motion p...

  • Page 178

    178 chapter 10: working with video • if you are comfortable with actionscript, you can write custom actionscript to control video playback. You can play or stop a video, jump to a frame, and control video in other ways. You can also display a live video stream from a camera. For more information, se...

  • Page 179

    About the sorenson spark codec 179 by default, flash imports and exports video using the sorenson spark codec. A codec is a compression/decompression algorithm that controls how multimedia files are compressed and decompressed during import and export. For information on the sorenson spark codec, se...

  • Page 180

    180 chapter 10: working with video tips for creating flash video with sorenson spark how you compress your video is largely determined by the content of the video. A video clip of a talking head with little action and only short bursts of moderate motion compresses differently than footage of a socc...

  • Page 181

    Using the video import wizard 181 use clean video the higher the quality of the original, the better the final result. Although frame rates and sizes of internet video are usually smaller than those of television, computer monitors have much better color fidelity, saturation, sharpness, and resoluti...

  • Page 182

    182 chapter 10: working with video you can export an embedded video as a flv file, which retains the compression settings applied when the flv file was created. For more information, see “macromedia flash video (flv)” on page 349 . For lessons on working with video, see help > how do i > quick tasks...

  • Page 183

    Using the video import wizard 183 to edit an embedded video clip: 1. Import an embedded 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 ba...

  • Page 184

    184 chapter 10: working with video selecting compression profiles in the video import wizard the video import wizard provides several options for compressing a video clip during the import process. In the encoding panel, you can enter a value for bandwidth or quality, control the frequency of keyfra...

  • Page 185

    Using the video import wizard 185 3. Drag the slider or enter a value for keyframe interval to control the frequency of keyframes (frames with complete data) in the video clip. For example, with a keyframe interval of 30, flash stores a complete frame every 30 frames. For frames between intervals, f...

  • Page 186

    186 chapter 10: working with video track options let you select the type of object of the imported video: a video object on the current timeline, a movie clip on the first frame of the flash document, or a graphic symbol on the current timeline. Audio options let you import an audio track as a separ...

  • Page 187

    Importing macromedia flash video (flv) files 187 4. Under track options, select an option for import into to specify the type of object for the imported video: current timeline imports the video as a video object in the current timeline in the flash document. If there are not enough frames in the cu...

  • Page 188

    188 chapter 10: working with video to import a video clip in flv format, do one of the following: • select file > import or file > import to library. • select any existing video clip in the library panel, and select properties from the library options menu. In the embedded video properties dialog bo...

  • Page 189

    About playing back external flv files dynamically 189 setting the directory path of a linked quicktime video you can set the directory path of a linked quicktime video clip in the library for the current flash document. To set the directory path of a linked quicktime video clip: 1. Select window > l...

  • Page 190

    190 chapter 10: working with video for more information on playing back flv files, see “playing back external flv files dynamically” in using actionscript in flash. Changing the properties of a video clip you can use the property inspector to change properties for an instance of an embedded or linke...

  • Page 191

    Controlling video playback using behaviors 191 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 re...

  • Page 192

    192 chapter 10: working with video for lessons on working with video, select help > how do i > quick tasks > create a document or import and edit video. To add and configure a behavior: 1. Select the movie clip that will trigger the behavior. 2. In the behaviors panel (window > development panels > ...

  • Page 193

    Exporting flv files from video-editing applications (flash professional only) 193 exporting flv files from video-editing applications significantly streamlines the workflow in using flv files in your flash documents. With the flv export plug-in, you can select encoding options for video and audio co...

  • Page 194

    194 chapter 10: working with video to export an flv file from a supported application: 1. With the video open in the video-editing application, select file > export > quicktime. 2. In the export dialog box, under export, select macromedia flash video (flv), and click options. 3. In the flash video (...

  • Page 195

    Exporting flv files from video-editing applications (flash professional only) 195 5. For limit data rate to, do one of the following: ■ select a preset quality setting (normal, better, or best) to automatically select a limit data rate value. This value is determined by the output flv file’s resolut...

  • Page 196

    196 chapter 10: working with video playing flv video clips with media components (flash professional only) with flash mx professional 2004 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...

  • Page 197

    Playing flv video clips with media components (flash professional only) 197 fps sets the number of frames per second for video playback. When milliseconds is selected, the frames per second control is disabled. Url sets the path and filename or url for the media. Automatically play sets the media to...

  • Page 198

    198 chapter 10: working with video 3. Open the component inspector set the following parameters: activeplaycontrol sets the playbar in play or pause when the swf file opens. Use this parameter with automatically play in the mediadisplay component. Backgroundstyle indicates whether the background of ...

  • Page 199

    Playing flv video clips with media components (flash professional only) 199 defining cue points (flash professional only) a cue point triggers an action when the playhead position equals the value entered in the position fields. Each cue point consists of a name and the time at which it occurs. By d...

  • Page 200

    200 chapter 10: working with video to add a slide cuepoint navigation behavior: 1. Create a slide presentation and name each screen. For more information, see chapter 12, “working with screens (flash professional only),” on page 215 . 2. Select the mediadisplay or mediaplayback component that will t...

  • Page 201: Chapter 11

    201 chapter 11 working with sound macromedia flash mx 2004 and macromedia flash mx professional 2004 offer several ways to use sounds. 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 the...

  • Page 202

    202 chapter 11: working with sound using the sound-editing controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 controlling sound playback using behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 starting and st...

  • Page 203

    Adding sounds to a document 203 note: sounds recorded in formats that are not multiples of 11 khz (such as 8, 32, or 96 khz) are resampled when imported into flash. If you want to add effects to sounds in flash, it’s best to import 16-bit sounds. If you have limited ram, keep your sound clips short ...

  • Page 204

    204 chapter 11: working with sound fade out gradually decreases the volume of a sound over its duration. Custom lets you create custom in and out points of sound using the edit envelope. For more information, see “using the sound-editing controls” on page 206 . 8. Select a synchronization option fro...

  • Page 205

    About accessing id3 properties in mp3 files with flash player 205 4. In the sound layer, create a regular or blank keyframe to correspond with the button state to which you want to add a sound. For example, to add a sound that plays when you click the button, create a keyframe in the frame labeled d...

  • Page 206

    206 chapter 11: working with sound for more information on using the id3 properties, see sound.Id3 in flash actionscript language reference. Using the sound-editing controls to define the starting point of a sound or to control the volume of the sound as it plays, you use the sound-editing controls ...

  • Page 207

    Controlling sound playback using behaviors 207 to load a sound to a file using a behavior: 1. Select the object, such as a button, that you want to use to trigger the behavior. 2. In the behaviors panel (window > development panels > behaviors), click the add (+) button and select sound > load sound...

  • Page 208

    208 chapter 11: 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 “addin...

  • Page 209

    Compressing sounds for export 209 compressing sounds for export you can select compression options for individual event sounds and export the sounds with those settings. You can also select compression options for individual stream sounds. However, all stream sounds in a document are exported as a s...

  • Page 210

    210 chapter 11: working with sound 4. Set export settings. 5. Click test to play the sound once. Click stop if you want to stop testing the sound before it finishes playing. 6. Adjust export settings if necessary until the desired sound quality is achieved. 7. Click ok. The default compression optio...

  • Page 211

    Compressing sounds for export 211 to use mp3 compression: 1. In the sound properties dialog box, select mp3 from the compression menu. 2. Deselect use imported mp3 quality (the default setting). 3. For bit rate, select an option to determine the bits per second in the exported sound file. Flash supp...

  • Page 212

    212 chapter 11: working with sound using the speech compression option the speech compression option exports sounds using a compression specially adapted to speech. To use speech compression: 1. In the sound properties dialog box, select speech from the compression menu. 2. For sample rate, select a...

  • Page 213

    Using sounds in flash documents for mobile devices (flash professional only) 213 using sounds in flash documents for mobile devices (flash professional only) with flash mx professional 2004, you can include event sounds when authoring documents for playback on mobile devices. The general process and...

  • Page 214

    214 chapter 11: working with sound 7. Select export device sounds. Flash lite is automatically selected from the version pop-up menu. Click ok. The swf file now contains the linked mobile device sound. 8. Select control > test movie to test your flash application. 9. Select control > disable keyboar...

  • Page 215: Chapter 12

    215 chapter 12 working with screens (flash professional only) in macromedia flash mx professional 2004, 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 app...

  • Page 216

    216 chapter 12: working with screens (flash professional only) this chapter contains the following sections: understanding screen-based documents and the screen authoring environment (flash professional only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 217

    Understanding screen-based documents and the screen authoring environment (flash professional only) 217 • “about adding media content to screens (flash professional only)” on page 226 • “selecting and moving screens (flash professional only)” on page 226 • “creating controls and transitions for scre...

  • Page 218

    218 chapter 12: working with screens (flash professional only) you can add multiple screens to a document, and you can nest screens within other screens, in as many levels as you want. A screen that is inside another screen is the child of that screen. A screen that contains another screen is the pa...

  • Page 219

    Using the screen outline pane (flash professional only) 219 you can set parameters for slide or form screens in the property inspector. For more information, see “setting parameters for a screen (flash professional only)” on page 225 . You can also use actionscript to control screens. For more infor...

  • Page 220

    220 chapter 12: working with screens (flash professional only) about undoing and redoing commands with screens (flash professional only) you can use the edit > undo and edit > redo menu commands to undo and redo the following actions performed on screens: adding, cutting, copying, pasting, deleting,...

  • Page 221

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

  • Page 222

    222 chapter 12: working with screens (flash professional only) to add a screen of a specified type at the current screen level: 1. Select a screen in the screen outline pane. 2. Select insert screen type from the context menu and select a screen type. To add a nested screen of the default type: 1. S...

  • Page 223

    Setting properties and parameters for a screen (flash professional only) 223 to rename a screen: • double-click the screen name in the screen outline pane and enter a new name. Setting properties and parameters for a screen (flash professional only) you use the property inspector to set properties a...

  • Page 224

    224 chapter 12: working with screens (flash professional only) specifying the actionscript class and registration point of a screen (flash professional only) you can specify the actionscript class of the screen and its registration point on the properties tab of the property inspector: • the actions...

  • Page 225

    Setting properties and parameters for a screen (flash professional only) 225 setting parameters for a screen (flash professional only) on the parameters tab of the property inspector, you can set parameters to control how the screen appears and behaves during playback. Different parameters are avail...

  • Page 226

    226 chapter 12: working with screens (flash professional only) • the parameter contentpath is an absolute or relative url indicating the file to load when the loader.Load() method is called. A relative path must point to the swf file loading the content. The url must be in the same subdomain as the ...

  • Page 227

    Selecting and moving screens (flash professional only) 227 • select view > go to and select the screen name from the submenu, or select first, previous, next, or last to navigate through the screens. • click the edit screen button at the right side of the edit bar and select the screen name from the...

  • Page 228

    228 chapter 12: working with screens (flash professional only) to drag a screen in the screen outline pane: • using the mouse, drag the screen to any other position in the screen outline pane. Release the mouse button when the screen is in the desired position. To nest a screen within another screen...

  • Page 229

    Creating controls and transitions for screens with behaviors (flash professional only) 229 4. If the behavior requires that you select a target screen, the select screen dialog box appears. Select the target screen in the tree control. Click relative to use a relative target path, or absolute to use...

  • Page 230

    230 chapter 12: working with screens (flash professional only) 5. For direction, select in to play the transition as the screen appears in the document, and out to play the transition as the screen disappears from the document. 6. For duration, enter a time in seconds. 7. For easing, select an optio...

  • Page 231

    About using actionscript with screens (flash professional only) 231 about using timelines with screens (flash professional only) each screen has its own timeline. The timeline is collapsed by default. You must expand it to work with frames or layers. You cannot view or modify the main timeline of a ...

  • Page 232

    232 chapter 12: working with screens (flash professional only) • the class name identifies the actionscript class to which the screen is assigned. By default, a slide screen is assigned to the mx.Screens.Slide class, and a form screen is assigned to the mx.Screens.Form class. You can assign the scre...

  • Page 233

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

  • Page 234

    234 chapter 12: working with screens (flash professional only).

  • Page 235: Chapter 13

    235 chapter 13 creating multilanguage text as more applications are distributed to worldwide audiences, it is becoming common to author applications that can appear in multiple languages. Macromedia flash mx 2004 and macromedia flash mx professional 2004 provide several new features that greatly enh...

  • Page 236

    236 chapter 13: creating multilanguage text for unicode-encoded text to appear correctly, users must have access to fonts containing the glyphs (characters) used in that text. For more information, see “using external text or xml files that are not unicode encoded” on page 251 . This chapter contain...

  • Page 237

    Fonts for unicode-encoded text 237 text encoding in flash player 7 by default, flash player 7 assumes that all text it encounters is unicode encoded. If your document loads external text or xml files, the text in these files should be utf-8 encoded. You can create these files using the strings panel...

  • Page 238

    238 chapter 13: creating multilanguage text using embedded fonts you can embed fonts for dynamic or input text fields. However, some fonts, particularly those used for asian languages, can add significantly to the swf file size when embedded. With flash mx 2004 and flash mx professional 2004, you ca...

  • Page 239

    Fonts for unicode-encoded text 239 xml font embedding table the list of selected fonts is stored and maintained as an external xml file and resides in the user configuration folder. It is named unicode_table.Xml and contains the one-to-many relationship between a particular language and all the nece...

  • Page 240

    240 chapter 13: creating multilanguage text authoring multilanguage text with the strings panel the new strings panel provides a simplified workflow for authoring multilanguage text. The general workflow steps are described in the following list: • author a fla file in one language. Any text that yo...

  • Page 241

    Authoring multilanguage text with the strings panel 241 • after you select a language, a column for the language is added to the strings panel. When you save, test, or publish the application, a folder with an xml file is created for each language. For more information, see “selecting languages for ...

  • Page 242

    242 chapter 13: creating multilanguage text 6. If you want to load an xml file for the languages from a different url at runtime, type the url in the url text box. Note: the xml file generated by flash is stored in the folder indicated by the swf publish path. For more information, see “publishing f...

  • Page 243

    Authoring multilanguage text with the strings panel 243 to add a string id to the strings panel without assigning it to a text field: 1. Select window > other panels > strings to open the strings panel. 2. Type in a new string id and new string in the strings panel, and click the apply button. Note:...

  • Page 244

    244 chapter 13: creating multilanguage text publishing and deploying multilanguage text when you save, publish, or test the fla file, a folder with an xml file is created for each available language you selected in the strings panel. The default location for the xml folders and files is the same fol...

  • Page 245

    Authoring multilanguage text with the strings panel 245 4. If you want to enable automatic language detection, make sure that insert actionscript for automatic language detection is selected. 5. Click ok. Xml file format exported xml is in utf-8 format and follows the xml localization interchange fi...

  • Page 246

    246 chapter 13: creating multilanguage text french version sample /p> "http://www.Oasis-open.Org/committees/xliff/documents/xliff.Dtd" > language="en"> bienvenue sur notre site web! Voudriez-vous être sur notre liste de diffusion? A bientôt! Language="en"> bienvenue sur notre site web! Voudriez-vous...

  • Page 247

    Authoring multilanguage text with the strings panel 247 4. When you are finished, save, publish, or test the file. All xml files for all languages are overwritten with the information in the strings panel. Note: if you want to preserve the translation in an xml file, save it in a different folder. T...

  • Page 248

    248 chapter 13: creating multilanguage text creating documents with multilanguage text without using the strings panel you can create documents with multilanguage text without using the strings panel. Using the xmlconnector component to connect to external xml files you can use the xmlconnector comp...

  • Page 249

    Creating documents with multilanguage text without using the strings panel 249 you should save the external file in utf-8 (recommended), utf-16be, or utf-16le format, using an application that supports the format. If you are using utf-16be or utf-16le format, the file must begin with a bom to identi...

  • Page 250

    250 chapter 13: creating multilanguage text you must include the following header as the first line of the file, to identify the file as unicode to the flash authoring tool: //!-- utf8 note: be sure to include a space after the second dash (-). By default, the flash authoring application assumes tha...

  • Page 251

    Using external text or xml files that are not unicode encoded 251 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 252

    252 chapter 13: creating multilanguage text.

  • Page 253: Chapter 14

    253 chapter 14 data integration (flash professional only) macromedia flash mx professional 2004 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...

  • Page 254

    254 chapter 14: data integration (flash professional only) when you integrate external data into a flash application, you connect to the external data, select different elements of the data schema that you need for your application, and bind them to component fields within your application. You mana...

  • Page 255

    Additional resources 255 for more information, see the following topics in this chapter: additional resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 creating a simple application . . . . . . . . . . . . . . . . . . . . . . ....

  • Page 256

    256 chapter 14: data integration (flash professional only) 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 a...

  • Page 257

    Workflows for using the data components 257 8. Next, populate the data grid with the xml data by binding the xml data—through the dataset component— to the data grid. Select the dataset component and click the bindings tab. You see the binding to the xmlconn instance that you just added. Now, add tw...

  • Page 258

    258 chapter 14: data integration (flash professional only) 3. Set up the connector component: ■ set component parameters. ■ set component properties on the schema tab. 4. Bind the connector component to dataset component. 5. Set up the dataset component: ■ set component parameters. ■ set component p...

  • Page 259

    Data binding (flash professional only) 259 data binding (flash professional only) data binding lets you map the properties of one component to another component. A binding is simply a statement that says “when property x of component a changes, copy the new value to property y of component b.” for r...

  • Page 260

    260 chapter 14: data integration (flash professional only) 8. Select control > test movie. Click the up and down buttons on component stepper1_nm . Each time you click the buttons on stepper1_nm , the value property of stepper1_nm is copied to the value property of stepper2_nm . Each time you click ...

  • Page 261

    Data binding (flash professional only) 261 the following illustration shows the schema tab for the xmlconnector component used in “creating a simple application” on page 256 . The top pane shows the bindable properties for the xmlconn instance, with the food:array property selected, and the bottom p...

  • Page 262

    262 chapter 14: data integration (flash professional only) there are several ways to define the schema for a component. Here are the most common ways: • for an xmlconnector component, you can import an xml sample file to define the schema. See “connecting to xml data with the xmlconnector component ...

  • Page 263

    Data binding (flash professional only) 263 8. In the bound to dialog box, select the checkbox component under component path, and click ok. 9. Select the checkbox component on the stage, and click the parameters tab in the component inspector. 10. Select control > test movie. To test the functionali...

  • Page 264

    264 chapter 14: data integration (flash professional only) 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...

  • Page 265

    Data binding (flash professional only) 265 data type and formatter when you want to set data into a component, data binding first needs to convert the data to an actionscript data type, which is a form that the component can read; this conversion is automatic, depending on the data type setting. If ...

  • Page 266

    266 chapter 14: data integration (flash professional only) the following illustration shows the bindings tab. The top pane lists the properties exposed for binding, represented by their schema location, of the component that’s selected on the stage and contains add binding (+) and remove binding (-)...

  • Page 267

    Data binding (flash professional only) 267 adding a binding to add a binding, click the add binding (+) button on the bindings tab. The add binding dialog box appears. This dialog box shows all the schema items (properties) for the selected component. You use this dialog box to select which property...

  • Page 268

    268 chapter 14: data integration (flash professional only) configuring bindings when a property is selected on the bindings tab, you can further define it using the options located in the bottom pane of the bindings tab. You can specify information such as direction and bound to, which you’ll common...

  • Page 269

    Data binding (flash professional only) 269 defining what to bind to when you expose a component property for binding, you need to define what to bind the property to. The bound to dialog box appears when you click bound to in the binding attributes pane of the bindings tab. The bound to dialog box i...

  • Page 270

    270 chapter 14: data integration (flash professional only) to use a dynamic value for the bound to property: 1. Select a component in the component path pane. 2. Do one of the following actions to select a schema item for the data: ■ select a schema item using the schema tree located within the sche...

  • Page 271

    Data binding (flash professional only) 271 3. Select the xmlconn instance, click the bindings tab, click the + symbol, and select the description:string property, which is in the food array. Notice that on the bindings tab, the attribute index for ‘food’ is dynamically added, as shown in the followi...

  • Page 272

    272 chapter 14: data integration (flash professional only) 6. Next, set the datagrid index default value to 0 to make it available for data binding: select the menu_dg instance, click the schema tab, select selectedindex:number , and in the default value field in the lower pane, type 0 . 7. Save and...

  • Page 273

    Data binding (flash professional only) 273 when you run an application that turns the trace on, a detailed log of data binding and web services events and actions appears in the output window. The following image shows the log for the application created in “creating a simple application” on page 25...

  • Page 274

    274 chapter 14: 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 sever...

  • Page 275

    Data connectivity (flash professional only) 275 to use the webserviceconnector component, you need to load the web service’s schema into the webserviceconnector component. A web service’s schema is defined by a web service description language (wsdl) file. The wsdl file, which is accessible through ...

  • Page 276

    276 chapter 14: data integration (flash professional only) 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 states that the service expects one string parameter, product , when ...

  • Page 277

    Data connectivity (flash professional only) 277 to add, edit the name of, or remove a web service: 1. Click define web services (the planet icon at the top of the panel). 2. To add a service, click add web service, and enter the url of the web service. Double-click an existing web service to edit it...

  • Page 278

    278 chapter 14: data integration (flash professional only) 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 y...

  • Page 279

    Data connectivity (flash professional only) 279 a typical workflow for an application that works with data would include binding an array from the xmlconnector component to the dataset component’s dataprovider property. Or, you can directly bind ui components to fields within certain records of the ...

  • Page 280

    280 chapter 14: data integration (flash professional only) many of the soap-based applications that you build will use private web services hosted on your server. After you determine the best way to implement and expose your own web services, it is easy to make public web services available to your ...

  • Page 281

    Data management (flash professional only) 281 managing data with the dataset component (flash professional only) the data structure that is fundamental to data-driven applications is a table with rows and columns, or fields. To expose the fields of the current row in the table, you must define prope...

  • Page 282

    282 chapter 14: data integration (flash professional only) the dataset component uses functionality in the databinding classes. If you intend to work with the dataset component in actionscript only, without using the binding and schema tabs in the component inspector to set properties, you must impo...

  • Page 283

    Data management (flash professional only) 283 mydataset.Items = recdata; } 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 res...

  • Page 284

    284 chapter 14: 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 import...

  • Page 285

    Data management (flash professional only) 285 //assigns recdata to the items property of the “mydataset” dataset component instance mydataset.Items = recdata; //adds schema types for the expected fields var i:mx.Data.Types.Str; var j:mx.Data.Types.Num; //makes the first item the current item mydatas...

  • Page 286

    286 chapter 14: data integration (flash professional only) 7. Select the datagrid component, and click the bindings tab of the component inspector. 8. Click the add binding (+) button to add a new binding. Select dataprovider:array . 9. Click bound to, select the dataset component, and select its da...

  • Page 287

    Data resolution (flash professional only) 287 resolver components do not send any data from a swf to server-side scripts or external data sources. You need to set up this kind of data transfer. Here are the most common ways to send data outside a swf: • bind the resolver’s processed data to a connec...

  • Page 288

    288 chapter 14: data integration (flash professional only) note: the information contained within the xml update packet is affected in part by the component parameter values that are assigned by the developer. For information on the xupdateresolver component parameters, see “using the xupdateresolve...

  • Page 289

    Advanced topics in data integration 289 for a typical workflow and information on the methods, properties, and events of the rdbmsresolver class, see “using the rdbmsresolver component (flash professional only)” and “rdbmsresolver class (flash professional only)” in using components. In addition to ...

  • Page 290

    290 chapter 14: data integration (flash professional only) the schema of a component shows what properties and fields are available for data binding. For each property or field, there are settings that control validation, formatting, type conversion, and other features that affect how data binding a...

  • Page 291

    Advanced topics in data integration 291 • validation options: validation options are additional settings that affect the validation rules for this field. The settings are presented in the validation options dialog box, which appears when you select this item. These settings vary according to data ty...

  • Page 292

    292 chapter 14: 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 th...

  • Page 293

    Advanced topics in data integration 293 @billable: string @hours : integer @id : integer @rate : integer suppose you want to treat the row node as a record within a grid, and you want the @billable attribute to be treated as a boolean value and show a true or false value in the grid instead of on or...

  • Page 294

    294 chapter 14: data integration (flash professional only) schema kinds a kind determines how a schema item for your component should be accessed at runtime. The following kinds come with flash mx professional 2004: none the default kind. This kind is identical to the data kind. Data the schema item...

  • Page 295

    Advanced topics in data integration 295 to do this, you set the field’s data type to boolean, which tells the data binding mechanism to expect boolean values in that field; and you set the field’s encoder to boolean, which performs the translation between the underlying string value and the boolean ...

  • Page 296

    296 chapter 14: data integration (flash professional only) in the following example, the row node represents a record within the xml file. The value of the id attribute is what makes the row unique. The xpath to uniquely identify the row node is shown in the following example: datapacket/row[@id=’xx...

  • Page 297

    Advanced topics in data integration 297 you can create custom encoders. The number of encoders allowed is unlimited. Encoders are defined by xml files found in the flash mx professional 2004 configuration/encoders folder. The definition includes the following metadata: • an actionscript class that w...

  • Page 298

    298 chapter 14: data integration (flash professional only) the fieldnamen are the names of the fields in the new array or records. The definitionn is one of the following: • the name of a field in the original record • a string, enclosed in single quotes ('), that contains a mix of text and tags. A ...

  • Page 299

    Advanced topics in data integration 299 custom lets you add a custom class to check for this special kind of validation. Your code should call the validate function when the field is assigned a new value, inspect the value, and determine whether it’s valid. If it is, the function should simply retur...

  • Page 300

    300 chapter 14: data integration (flash professional only) when to edit schema item settings you can edit anything within the schema attributes pane, even schemas that come from an external source, such a web service wsdl file. You can always change any value for any field of any schema, with the fo...

  • Page 301

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

  • Page 302

    302 chapter 14: data integration (flash professional only) the solution is to create a new schema field under the object within the bird array. The new schema field is named id . Every schema field has a property called path that accepts an xpath statement that points to the data in your xml file. I...

  • Page 303

    Advanced topics in data integration 303 • predicate syntax to further specify nodes to be selected: /b[c] (child node syntax; selects all b nodes that have a c node as a child) /b[@id] (attribute existence syntax; selects all b nodes that have an attribute named id ) /b[@id="a1"] (attribute value sy...

  • Page 304

    304 chapter 14: data integration (flash professional only) after the server finishes with the update packet, either successfully or unsuccessfully, it should send back to your flash application a results packet containing errors or additional xml updates resulting from the update operation. If there...

  • Page 305

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

    306 chapter 14: data integration (flash professional only) the following table describes how the key attributes value is determined. If a field is defined as a key field, using the rdbmsresolver component’s fieldinfo parameter, it will always appear in the update packet with key="true" . Otherwise, ...

  • Page 307

    Advanced topics in data integration 307 • the optional msg attribute contains a message string that describes the problem that occurred when attempting the operation • zero, one, or more field child nodes give field-level specific information. Each field node, at a minimum, should have a name attrib...

  • Page 308

    308 chapter 14: data integration (flash professional only) 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;...

  • Page 309: Chapter 15

    309 chapter 15 publishing when you’re ready to deliver macromedia flash mx 2004 and macromedia flash mx professional 2004 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 browse...

  • Page 310

    310 chapter 15: publishing this chapter contains the following sections: playing your flash swf files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 about publishing secure flash documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 311

    Publishing flash documents 311 about exact domain matching for sharing data between flash documents flash player 7 enforces a stricter security model than previous versions of flash player. There were two primary changes in the security model between flash player 6 and 7: exact domain matching flash...

  • Page 312

    312 chapter 15: 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...

  • Page 313

    Publishing flash documents 313 to set publish options 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. Not...

  • Page 314

    314 chapter 15: publishing optimize for flash player 6 r65 if you selected flash player 6 in the version pop-up menu, you can select this option to target a release of flash player 6. The updated version uses actionscript register allocation to improve performance. Users must have the same release o...

  • Page 315

    Publishing flash documents 315 to modify the document-level classpath: 1. Select file > publish settings to open the publish settings dialog box. 2. Click the flash tab. 3. Verify that actionscript 2.0 is selected in the actionscript version pop-up menu and click settings. 4. In the actionscript set...

  • Page 316

    316 chapter 15: publishing 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 button....

  • Page 317

    Publishing flash documents 317 7. Select quality options to determine the trade-off between processing time and appearance, as described in the following list. This option sets the quality parameter’s value in the object and embed tags. Low favors playback speed over appearance and does not use anti...

  • Page 318

    318 chapter 15: publishing 10. Select a scale option to place the flash content within specified boundaries, if you’ve changed the document’s original width and height. The scale option sets the scale parameter in the object and embed tags. Default (show all) shows the entire document in the specifi...

  • Page 319

    Publishing flash documents 319 to enable flash player detection: 1. Select detect flash version on the html tab of the publish settings dialog box. For general information, see “specifying publish settings that create html documents with embedded flash content” on page 315 . Note: the option is avai...

  • Page 320

    320 chapter 15: publishing to publish a gif file with your flash 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 button. Note: ...

  • Page 321

    Publishing flash documents 321 7. Select one of the following transparent options to determine the transparency of the application’s background and the way alpha settings are converted to gif: opaque makes the background a solid color. Transparent makes the background transparent. Alpha sets partial...

  • Page 322

    322 chapter 15: publishing specifying publish settings for jpeg files the jpeg format lets you save an image as a highly compressed, 24-bit bitmap. Generally, gif format is better for exporting line art, and jpeg format is better for images with continuous tones, such as photographs, gradients, or e...

  • Page 323

    Publishing flash documents 323 to publish a png file with 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 button...

  • Page 324

    324 chapter 15: publishing 6. If you selected 8-bit for bit depth in step 4, select a dither option to specify how pixels of available colors are mixed to simulate colors not available in the current palette. Dithering can improve color quality, but it increases file size. Select from the following ...

  • Page 325

    Publishing flash documents 325 path computes a simple linear function of the three neighboring pixels (left, above, upper left), and then selects the neighboring pixel closest to the computed value as a predictor. Adaptive analyzes the colors in the image and creates a unique color table for the sel...

  • Page 326

    326 chapter 15: publishing 4. For dimensions, enter a width and height in pixels for the exported quicktime video, or select match movie to make the quicktime video the same size as the flash swf file and keep its aspect ratio. 5. Select one of the following alpha options to control the transparency...

  • Page 327

    Using publish profiles 327 about publishing flash lite documents macromedia flash lite lets flash designers, developers, and content providers quickly create engaging content for mobile phones using the actionscript scripting language, drawing tools, and templates. For detailed information on author...

  • Page 328

    328 chapter 15: publishing duplicating a publish profile if you’ve modified publish settings for a publish profile and you want to save the modifications, you can create a duplicate profile. To duplicate a publish profile: 1. From the current profile pop-up menu in the publish settings dialog box (f...

  • Page 329

    About html publishing templates 329 deleting a publish profile when you no longer need a publish profile, you can delete it from the document. To delete a publish profile: 1. In the publish settings dialog box (file > publish settings), select the publish profile that you want to delete in the curre...

  • Page 330

    330 chapter 15: 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...

  • Page 331

    Customizing html publishing templates 331 using html template variables the following table lists the template variables that flash recognizes. For a definition of all the tags with which these variables work, see “editing flash html settings” on page 334 . Attribute/parameter template variable temp...

  • Page 332

    332 chapter 15: 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...

  • Page 333

    Customizing html publishing templates 333 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 ...

  • Page 334

    334 chapter 15: 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...

  • Page 335

    Editing flash html settings 335 note: if you use both the object and the embed tags, use identical values for each attribute or parameter to ensure consistent playback across browsers. The parameter swflash.Cab#version=7,0,0,0 is optional, and you can omit it if you don’t want to check for the versi...

  • Page 336

    336 chapter 15: publishing classid attribute value clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 description identifies the activex control for the browser. The value must be entered exactly as shown. Applies to the object tag only. Width attribute value n or n% template variable: $wi description speci...

  • Page 340

    340 chapter 15: publishing description (optional) specifies where a scaled flash swf file is positioned within the area defined by the width and height settings. For more information about these conditions, see “scale attribute/ parameter” on page 339 . L, r, t, and b align the application along the...

  • Page 341

    Editing flash html settings 341 description (optional) lets you use the transparent flash content, absolute positioning, and layering capabilities available in internet explorer 4.0. This attribute/parameter works only in windows with the flash player activex control. Window plays the application in...

  • Page 342

    342 chapter 15: publishing true (or omitted) sets the activex control will perform seamless tabbing: after users tab through the flash application, the next tab keypress will move the focus out of the flash application and into the surrounding html content or to the browser status bar if there is no...

  • Page 343

    About configuring a web server for flash 343 about configuring a web server for flash when your files are accessed from a web server, the server must properly identify them as flash content to display them. If the mime type is missing or not properly delivered by the server, the browser can show err...

  • Page 344

    344 chapter 15: publishing.

  • Page 345: Chapter 16

    345 chapter 16 exporting the export movie command in macromedia flash mx 2004 and macromedia flash mx professional 2004 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 s...

  • Page 346

    346 chapter 16: exporting remember the following considerations: • when you export a flash image as a vector-graphic file (in adobe illustrator format), you preserve its vector information. You can edit these files in other vector-based drawing programs, but you can’t import these images into most p...

  • Page 347

    About export file formats 347 adobe illustrator the adobe illustrator format is ideal for exchanging drawings between flash and other drawing applications such as macromedia freehand. This format supports accurate conversion of curve, line style, and fill information. Flash supports importing and ex...

  • Page 348

    348 chapter 16: exporting animation is available for the animated gif export format only and lets you enter the number of repetitions, where 0 repeats endlessly. Bitmap (bmp) the bitmap (bmp) format lets you create bitmap images for use in other applications. The bitmap export options dialog box has...

  • Page 349

    About export file formats 349 flash document (swf) you can export the entire document as a flash swf file, to place the flash content in another application, such as dreamweaver. You can select the same options for exporting a document as you can for publishing the document. See “publishing flash do...

  • Page 350

    350 chapter 16: exporting 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 appeara...

  • Page 351

    About export file formats 351 these export options are identical to quicktime publish options. See “specifying publish settings for quicktime videos” on page 325 . Quicktime video (macintosh) the quicktime video format converts the flash document into a sequence of bitmaps embedded in the file’s vid...

  • Page 352

    352 chapter 16: exporting video format selects a color depth. Some applications do not yet support the windows 32-bit image format. If you have problems using this format, use the older 24-bit format. Compress video displays a dialog box for selecting standard avi compression options. Smooth applies...

  • Page 353

    Updating flash content for dreamweaver ultradev 353 5. Update the flash document (fla) as needed in flash. 6. To save the flash document (fla) and re-export the flash content to dreamweaver, do one of the following: ■ to update the file and close flash, click the done button above the upper left cor...

  • Page 354

    354 chapter 16: exporting.

  • Page 355: Chapter 17

    355 chapter 17 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 mx 2004 and macromedia flash mx professional 2004. As you design accessible flash applications, ...

  • Page 356

    356 chapter 17: 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 373 . • ensure that color is not the only means of conveying inf...

  • Page 357

    Understanding screen reader technology 357 for additional information about section 508, see the following websites: • the us government-sponsored website at www.Section508.Gov • the macromedia accessibility site at www.Macromedia.Com/macromedia/accessibility/ macromedia flash accessibility web page...

  • Page 358

    358 chapter 17: creating accessible content the windows activex (internet explorer plug-in) version of flash player 6 supports msaa, but the windows netscape and windows stand-alone players do not. Caution: msaa is currently not supported in the opaque windowless and transparent windowless modes. (t...

  • Page 359

    Using flash to enter accessibility information for screen readers 359 input text text is transferred to the screen reader. No names are transferred, except where labeling relationships are found, and no descriptions or keyboard shortcut strings are transferred. Buttons the state of the button is tra...

  • Page 360

    360 chapter 17: creating accessible content all objects in flash documents must have instance names for you to apply accessibility options to them. You create instance names for objects in the property inspector. The instance name is used to refer to the object in actionscript. To open the accessibi...

  • Page 361

    Using flash to enter accessibility information for screen readers 361 for more information, see the macromedia flash accessibility web page at www.Macromedia.Com/software/flash/productinfo/accessibility/ . Selecting names for buttons, text fields, and entire flash applications you can use the access...

  • Page 362

    362 chapter 17: creating accessible content for example, in the following figure, the text that describes the button appears outside and to the right of the button. In this location, flash player does not detect the text, and it is not read by the screen reader. To rectify this, open the accessibili...

  • Page 363

    Using flash to enter accessibility information for screen readers 363 3. Enter information for the selected object as needed: dynamic text enter a name for the text object in the name text box and an optional description of the text in the description text box. (to provide a description for static t...

  • Page 364

    364 chapter 17: creating accessible content hiding an object from the screen reader you can hide an object from the screen reader simply by turning off accessibility for the object. You should only hide objects that are repetitive or convey no content. When an object is hidden, the screen reader ign...

  • Page 365

    Using flash to enter accessibility information for screen readers 365 3. In the shortcut field, type the name of the keyboard shortcut, using the following conventions: ■ spell out key names, such as control or alt. ■ use capital letters for alphabetic characters. ■ use a plus sign (+) between key n...

  • Page 366

    366 chapter 17: creating accessible content 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 screen readers...

  • Page 367

    Creating a tab order index for keyboard navigation in the accessibility panel (flash professional only) 367 creating a tab order index for keyboard navigation in the accessibility panel (flash professional only) you can create a tab order index in the accessibility panel for keyboard navigation. You...

  • Page 368

    368 chapter 17: creating accessible content to view a tab order: • select view > show tab order. Tab index numbers for individual objects appear in the upper left corner of the object. Note: tab order created with actionscript code, rather than the accessibility panel, does not appear when you enabl...

  • Page 369

    Creating accessibility with actionscript 369 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 h...

  • Page 370

    370 chapter 17: creating accessible content for properties that apply to a specific object, you can use the syntax instancename._accprops . The value of _accprops is an object that can include any of the following properties: note: inverse logic means that a value of true in actionscript corresponds...

  • Page 371

    Creating accessibility with actionscript 371 implementing screen reader detection with the accessibility.Isactive() method to create flash content that behaves in a specific way if a screen reader is active, you can use the actionscript method accessibility.Isactive() , which returns a value of true...

  • Page 372

    372 chapter 17: creating accessible content because static text cannot be assigned an instance name, it cannot be included in the list of the tabindex property values. As a result, a single instance of static text anywhere in the swf file causes the reading order to revert to the default. To specify...

  • Page 373

    Testing accessible content 373 testing accessible content when you test your accessible flash applications, follow these recommendations: • if you are designing your document to work with screen readers, download several screen readers and test your application by playing it in a browser with the sc...

  • Page 374

    374 chapter 17: creating accessible content.

  • Page 375: Chapter 18

    375 chapter 18 printing from swf files you can add printing functionality to your macromedia flash mx 2004 and macromedia flash mx professional 2004 document that lets users print from flash player. You can use the actionscript printjob class, or you can use the print() or printasbitmap() actionscri...

  • Page 376

    376 chapter 18: printing from swf files printing from the flash player context menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 publishing a document with printable frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 controlling print...

  • Page 377

    Building a print job 377 because you are spooling a print job to the user’s operating system between your calls to printjob.Start() and printjob.Send() , and because the printjob functions might temporarily affect the flash player internal view of onscreen flash content, you should implement print-s...

  • Page 378

    378 chapter 18: printing from swf files 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 t...

  • Page 379

    Starting a print job 379 each call to add a new page is unique, which lets you modify parameters without affecting previously set parameters. For example, you can specify that one page print as a bitmap image and another page print as a vector graphic. You can add as many new pages to your print job...

  • Page 380

    380 chapter 18: printing from swf files about scaling a print job using the printjob class prints flash content, by default, without scaling it. For example, an object that is 144 pixels wide on screen will print as 144 points, or 2 inches wide (one point equals one pixel. In the authoring tool, 72 ...

  • Page 381

    Printing frames independent of the printjob class 381 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 382

    382 chapter 18: printing from swf files to control what users can print, remember the following items as you set up documents and movie clips for printing: • adjust the page layout in any frames that you designate as printable to match the desired printed output. Using flash player, you can print al...

  • Page 383

    Printing frames independent of the printjob class 383 you use the label #b to designate a frame to be used to designate the print area. The label #b must be on the same layer as a frame labeled #p. For more information about print() function parameters, see print() in flash actionscript language ref...

  • Page 384

    384 chapter 18: printing from swf files changing the printed background color with flash player, you can print the background color set in the document properties dialog box. You can change the background color for only the frames to be printed by placing a colored object on the lowest layer of the ...

  • Page 385

    Publishing a document with printable frames 385 for more information on publishing options, see “publishing flash documents” on page 311 . Printing from the flash player context menu you can use the print command in the flash player context menu to print frames from any flash swf file. The context m...

  • Page 386

    386 chapter 18: printing from swf files.

  • Page 387: Chapter 19

    387 chapter 19 creating e-learning content macromedia flash mx 2004 and macromedia flash mx professional 2004 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 br...

  • Page 388

    388 chapter 19: creating e-learning content setting control button labels for a learning interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 tracking to aicc- or scorm-compliant learning management systems . . . . . . . . . . . . . . . 414 extending learning interaction scrip...

  • Page 389

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

    390 chapter 19: 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 a...

  • Page 391

    Including a flash learning interaction in a document 391 2. Do one of the following to open the component inspector: ■ select window > development panels > component inspector. ■ in the property inspector, click launch component inspector. Note: if the text in the component inspector is too small to...

  • Page 392

    392 chapter 19: creating e-learning content 6. In the activity id and activity name text boxes, enter the activity id and activity name of your lms, if you are using one. If you are not using an lms, you can either accept or delete the default entries. 7. Select show results page if you want to pres...

  • Page 393

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

  • Page 394

    394 chapter 19: creating e-learning content 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 interaction in...

  • Page 395

    Including a flash learning interaction in a document 395 9. (optional) click the assets button, and change the assets for the learning interaction. See “adding, naming, and registering assets” on page 407 . Adding learning interactions to a quiz template when you use a quiz template, you add learnin...

  • Page 396

    396 chapter 19: creating e-learning content adding learning interactions to a document that doesn’t use a quiz template if you are adding learning interactions to a flash document that does not use a quiz template, you can place stand-alone learning interactions on the timeline in a single frame, se...

  • Page 397

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

    398 chapter 19: creating e-learning content testing to see if a movie clip is broken apart it is a good idea to check whether a learning interaction is broken apart or still grouped within the movie clip container. To verify whether a learning interaction is broken apart: • select a text field or an...

  • Page 399

    Changing the appearance of a learning interaction 399 changing buttons, check boxes, and radio buttons the learning interactions use the flash user interface (ui) button, checkbox, radiobutton and textinput components. You must use these ui components within the learning interaction movie clips. The...

  • Page 400

    400 chapter 19: creating e-learning content 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,...

  • Page 401

    Configuring learning interactions 401 4. In the matches target name column, list the matching target instance name for that drag object. Each target must have a unique name. If you add a new target on the stage, make sure to enter its name here. If you enter a drag instance name in the drag object n...

  • Page 402

    402 chapter 19: creating e-learning content configuring a fill in the blank interaction the fill in the blank interaction uses a question text field, a user entry text field, a control button, and a feedback text field. To set up a fill in the blank interaction: 1. If you are not using a quiz templa...

  • Page 403

    Configuring learning interactions 403 5. Specify whether the matching response must be an exact match. If you select exact match, a correct response matches only if the user enters the text exactly as it appears in your response. With exact matchdeselected, an answer is considered correct if it cont...

  • Page 404

    404 chapter 19: 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 interact...

  • Page 405

    Configuring learning interactions 405 to configure a hot spot 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 hot spot interaction (frame 5, if you have n...

  • Page 406

    406 chapter 19: creating e-learning content configuring a multiple choice interaction in a multiple choice interaction, the user responds to a question with multiple answers; either one answer or several answers can be correct. To configure a multiple choice interaction: 1. If you are not using a qu...

  • Page 407

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

  • Page 408

    408 chapter 19: creating e-learning content • text fields can share the same instance names across multiple interactions. After you name the assets on the stage, it’s important to register those names in the component inspector for the learning interaction so that the scripts can control the assets....

  • Page 409

    Adding, naming, and registering assets 409 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 410

    410 chapter 19: creating e-learning content fill in the blank learning interaction asset names hot object learning interaction asset names hot spot learning interaction asset names reset button resets drag objects flash ui button component template_resetbutton 1-8 drag objects drag object distractor...

  • Page 411

    Setting feedback options for a learning interaction 411 multiple choice learning interaction asset names true or false learning interaction asset names setting feedback options for a learning interaction feedback options control the text that the user sees before and while responding to an interacti...

  • Page 412

    412 chapter 19: creating e-learning content setting knowledge track options for a learning interaction knowledge track is an automatic data-tracking feature that lets you transmit student performance data to a lms, such as lotus learningspace, or to other back-end tracking systems. Knowledge track w...

  • Page 413

    Setting navigation options for a learning interaction 413 5. Specify the weighting value for the interaction. The quiz templates use this parameter to calculate the score in the results page. The default value is 1. Weighting indicates the relative importance of a question. You can enter any numeric...

  • Page 414

    414 chapter 19: creating e-learning content setting control button labels for a learning interaction all six types of interactions use an instance of the same control buttons: check answer, submit, next question, and reset. The only exception to this is the true/false interaction, which does not use...

  • Page 415

    Tracking to aicc- or scorm-compliant learning management systems 415 overview of the communication for aicc- and scorm-compliant content the following overview shows what a student experiences when completing a quiz, along with hidden steps that are not exposed to the student. Aicc communication ove...

  • Page 416

    416 chapter 19: 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...

  • Page 417

    Extending learning interaction scripts 417 10. Start the lms system (or create the aicc course descriptor files) that references the frameset.Htm file. Preparing a scorm-compliant learning interaction for web hosting to send tracking data to a scorm-compliant lms, you must enable tracking for the qu...

  • Page 418

    418 chapter 19: creating e-learning content • when the timeline moves to the third interaction, that interaction’s component creates an instance of ltoolbox global class in index2 of the sessionarray. It continues with index3, index4, and so on, until all interactions are in an index. • at the end o...

  • Page 419

    Extending learning interaction scripts 419 all the methods and properties of the ltoolbox global class are available within each sessionarray index. 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...

  • Page 420

    420 chapter 19: creating e-learning content.

  • Page 421: Appendix A

    421 appendix a using samples and templates macromedia flash mx 2004 and macromedia flash mx professional 2004 come with several samples and templates to help you get started. This appendix contains information on how to use samples and how to use templates. Using samples one of the quickest ways to ...

  • Page 422

    422 appendix a: using samples and templates building a photo scrapbook this sample shows how to build an interactive photo scrapbook easily using behaviors instead of scripting. Behaviors provide an easy way to add interactivity to flash content without having to write actionscript. In this example,...

  • Page 423

    Using samples 423 building custom panels with the extensibility api this sample covers how to design and build a panel to control the functions of flash. The trace bitmap panel was built using the extensibility api available in flash. The extensibility api is a series of javascript methods and prope...

  • Page 424

    424 appendix a: using samples and templates using templates flash is equipped with several templates to help streamline your work. See the following sections for information about how to use each template: • “using advertising templates ” on page 424 • “using video templates (flash professional only...

  • Page 425

    Using templates 425 browser compatibility and requirements with advertising templates you should work with webmasters and network administrators to create detailed testing plans that include tasks relevant to your specific users. These plans should be publicly available and updated regularly. Also, ...

  • Page 426

    426 appendix a: using samples and templates the data property of the radio buttons is set to a string that is appended to a base string to properly form the correct url. For example, if the user selects high bandwidth and the base string is cartoon, the file that is loaded is cartoon_hi.Flv. To chan...

  • Page 427

    Using templates 427 adding content to the video templates (flash professional only) adding content to the video templates is as easy as adding new slides to the presentation and creating graphics and text, importing media, and adding animation. There are a few slides with some content to help get yo...

  • Page 428

    428 appendix a: using samples and 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 s...

  • Page 429

    Using templates 429 you can also print each slide in your presentation by clicking the print icon. If you know that you won’t print your slides, you can delete the icon from the layout. Customizing your slide presentation if you want to change the colors in the template, select modify > movie, and c...

  • Page 430

    430 appendix a: using samples and templates adding transitions to the screen presentation templates (flash professional only) after you’ve customized the content of your presentation, you can add animated transitions that help illustrate your points. Use the behaviors panel to add transitions to you...

  • Page 431

    Using templates 431 using form application templates (flash professional only) flash mx professional 2004 provides two templates you can use to create form-based applications: • “query-error-response template (flash professional only)” on page 431 • “windowed application template (flash professional...

  • Page 432

    432 appendix a: using samples and templates 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 compone...

  • Page 433

    Using templates 433 to modify window content: 1. Select any form in the outline and replace the contents with components of your choice. You can even add data connectors to populate your components with remote data. For more information about data connectors, see chapter 1, “about components” in usi...

  • Page 434

    434 appendix a: using samples and templates.

  • Page 435: Appendix B

    435 appendix b xml to ui macromedia flash mx 2004 and macromedia flash mx professional 2004 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 ...

  • Page 436

    436 appendix b: xml to ui control tag summary for xml to ui dialog boxes the following xml tags are used to create controls: availability flash mx 2004. Usage ... Child tags ... Creates a transparent fill space used to arrange controls. Creates a container for items laid out vertically. Tag descript...

  • Page 437

    437 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 flash mx 2004. Usage ... Child tags ... Attributes none. Child tag...

  • Page 438

    438 appendix b: xml to ui availability flash mx 2004. Usage id = "myid" title="yourtitle" buttons="accept[, cancel]"> ... Child tags ... Id = "myid" title="yourtitle" buttons="accept[, cancel]"> ... Child tags ... Attributes id string; represents a unique identification string that is used by the ex...

  • Page 439

    439 child tags , parent tag description layout tag; creates a container for tabular layout using and tags. 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...

  • Page 440

    440 appendix b: xml to ui parent tag , , 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 th...

  • Page 441

    441 ... 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. Example the following example uses the tag to help define a dialog box. To see how this dialog b...

  • Page 442

    442 appendix b: xml to ui ... Attributes none. Child tags parent tag 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 w...

  • Page 443

    443 child tags none. Parent tag , 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 ...

  • Page 444

    444 appendix b: xml to ui /> the modified tags produce the following dialog box: availability flash mx 2004. Usage attributes none. Child tags none. Parent tag , , , description layout tag; creates a transparent fill space used to arrange controls. Example the following example uses the javascript a...

  • Page 445

    445 // create an xml to ui dialog box using the xml definition in the // trace selections.Xml file var traceselectionsdlg = fl.Getdocumentdom().Xmlpanel( fl.Configuri + "commands/trace selections.Xml" ); if (traceselectionsdlg.Dismiss == "accept") { fl.Trace("checkbox 1: " + traceselectionsdlg.Check...

  • Page 446

    446 appendix b: xml to ui adding the tag to the second row of check boxes pushes checkbox4 and checkbox5 to the right: 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 verticall...

  • Page 447

    447 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 container tags are used to define the layout: availability flash mx 2004. Usage id=”myid” label=”mylabel” ta...

  • Page 448

    448 appendix b: xml to ui tabindex number; an integer used to set the control’s position in the tab order (available only on windows). Accesskey string; a character to be used for the keyboard shortcut for this control (available only on windows). Oncommand a javascript command that executes when th...

  • Page 451

    451 parent tag , , , description control tag; creates a file chooser control (this is not part of the xul standard). This control provides users with access to the operating system’s file selection dialog box. Example the following example uses the javascript api to create a new command that appears...

  • Page 452

    452 appendix b: xml to ui availability flash mx 2004. Usage id="myid" color="mycolor"/> 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. Color number; hex number representing a color us...

  • Page 453

    453 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 454

    454 appendix b: xml to ui child tags parent tag , , , 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 ex...

  • Page 455

    455 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 456

    456 appendix b: xml to ui parent tag , , , description control tag; creates a listbox control to contain tags. Example the following example modifies the skew command example from so that it uses a control instead of a control for the edge parameter to the javascript skewselection() method. The exam...

  • Page 457

    457 // call skewselection() to carry out the resizing command. If (inputisvalid ) { fl.Getdocumentdom().Skewselection(xskew, yskew, edge); } } 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: the skewlist command...

  • Page 458

    458 appendix b: xml to ui 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 tag...

  • Page 459

    459 tabindex number; an integer used to set the control’s position in the tab order (available only on windows). Child tags 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...

  • Page 460

    460 appendix b: xml to ui 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 ...

  • Page 461

    461 attributes none. Child tags parent tag 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 exampl...

  • Page 462

    462 appendix b: xml to ui 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 a...

  • Page 463

    463 tabindex number; an integer that represents the control’s position in the tab order (available only on windows). Minvalue number; an integer that represents the minimum value. Maxvalue number; an integer that represents the maximum value. Child tags none. Parent tag , , , description control tag...

  • Page 464

    isnan(yskew)) { inputisvalid = false; } // call skewselection() to carry out the resizing command. If (inputisvalid ) { fl.Getdocumentdom().Skewselection(xskew, yskew, edge); } } second, create a file named skew.Xml and place it in ...

  • Page 465

    465 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 from the commands menu, the dialog box defined by skew.Xml appears, as shown in the following figure: category flash mx 2004. Usage id="myid"/> ...

  • Page 467

    467 accesskey string; a character to be used for the keyboard shortcut for this control (available only on windows). Child tags none. Parent tag description control tag; creates a single radio button control. This tag must be used within a tag. Example the following example defines a group of contro...

  • Page 468

    468 appendix b: xml to ui description control tag; creates a control that lists all instances of a class and lets the user select an instance. Example the following example is excepted from the load graphic behavior definition file. The tags define a targetlist control that lets users select a movie...

  • Page 469

    469 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. Literal boolean value; if true, the value that is returned from this control is enclosed by quotation marks (""). If false , which i...

  • Page 470

    isnan(yscale)) { inputisvalid = false; } // call scales...

  • Page 471: Index

    471 index a absolute target path 24 accessibility animation and 368 automatic labeling 361 automatic labels for buttons and input text fields 366 button and text field labels for 361 components 369 creating properties in actionscript 369 creating reading and tab order using actionscript 371 creating...

  • Page 472

    472 index aligning objects 155 text blocks 113 text characters 113 alignment, html (publish setting) 317 alpha effect instance property 63 partial transparency 321 ancestor screen, defined 218 anchor points adding 94 adjusting 94 converting between corner and curve 94 deleting 94 dragging 94, 95 mov...

  • Page 473

    Index 473 load external movie clip 65 load graphic 65 screen navigation and control 228 screen transitions 229 send backward 66 send to back 66 start dragging movieclip 66 stop dragging movieclip 66 video, adding and configuring 192 video, controlling video playback 191 bgcolor attribute/parameter 3...

  • Page 474

    474 index color palette adaptive 321 default 83 importing and exporting 83 modifying 82 saving current as default 83 web-safe 83 color picker, opening 76 color swatches panel add colors option 84 clear colors option 83 loading default palette 83 modifying color palettes and 82 replace colors option ...

  • Page 475

    Index 475 create copy button, in transform panel 148 createtextfield method 125 creating new document 12 passwords for debugging files 314 cumulative tracking data, accessing in learning interactions 417 curves adjusting points and tangent handles 95 adjusting segments 94 dragging tangent handles on...

  • Page 476

    476 index saving as template 15 saving flash 14 saving in flash mx format 15 saving when quitting 15 screen hierarchy 217 size report, generating 43 slide presentation 217 speeding up display 40 stage size, setting 13 tabs for multiple documents 14 template, creating from 13 template, saving as 15 t...

  • Page 477

    Index 477 dynamic text creating 108 defined 105 html formatting for 121 html option 116 rich text formatting for 121 setting options 115 dynamic text fields accessible descriptions for 363 naming in a learning interaction 408 e easing option for motion tweening 166, 167 for shape tweening 170 edit e...

  • Page 478

    478 index locked gradient or bitmap, with 82 paint bucket tool, applying with 79 selecting default color 76 softening edges 100 swapping color with stroke color 76 text, for 112 transparent, applying 76 find and replace overview 30 screens 230 finding and replacing bitmaps 33 colors 32 fonts 31 soun...

  • Page 479

    Index 479 animation, in timeline 163 bandwidth profiler, testing performance with 42 converting keyframes into 172 copying and pasting 172 copying by dragging 172 displaying as onion skin outlines 173 dragging in timeline 172 editing in an animation 172 editing multiple 173 exporting as static image...

  • Page 480

    480 index publish settings 315 publishing templates 329 tag reference 334 templates 330 html alignment publish setting 317 hyperlinks, viewing in flash player 39 i identifiers, assigning to sounds 205 images exporting 345 importing 131, 132 import command 132 import for runtime sharing option 71 imp...

  • Page 481

    Index 481 images, extending 164 inserting 172 motion tweening 168 removing 172 selecting everything between two 145 shape tweening 169 sorenson spark codec, for 179 sounds, associating with 208 tweened frame sequences, dragging in 173 tweening 161 kinds creating custom 294 knowledge track options, s...

  • Page 482

    482 index spacing 113 straightening 98 link option, for text 120 linkage option for font symbol 116 for sounds 205 linking text blocks 120 load default colors option 83 load external movie clip behavior 65 load graphic behavior 65 load order option 313 loaded documents, controlling 25 loadmovie acti...

  • Page 483

    Index 483 movie explorer about 28 context menu 29 displaying symbol definition 68 filtering displayed items in 28 find text box 28 instance information 67 instances in 67 options menu 29 for screens 230 selecting items in 29 movie parameter 335 moving entire animation 174 objects 147 mp3 compression...

  • Page 484

    484 index optimizing curves 99 documents 40 gif colors 320 png colors 323 orient to path option, for motion tweening 166, 167 outlines command 40 oval tool 89 over state (for buttons) 59 overlaychildren parameter 225 override sound settings option 314 p page setup command (windows only) 44 paint buc...

  • Page 485

    Index 485 printers, supported 376 printing from authoring environment 43 fla files 43 flash player context menu 385 printjob addpage method 378 object and class 375 orientation property 378 pageheight property 378 pagewidth property 378 paperheight property 378 paperwidth property 378 send method 38...

  • Page 486

    486 index recognize lines preference 103 recognize shapes preference 103 rectangle tool about 89 round rectangle modifier 89 redo command 34 redoing steps with the history panel 35 registering images from frame to frame 173 registration point changing 61 displaying coordinates 67 relative target pat...

  • Page 487

    Index 487 schemas adding a component property 262 adding a schema field 263 data type 298 editing schema item settings 300 editing the schema item settings 300 encoder 294 for web services 275 for xml data sources 277 formatter 297 kind 294 kinds and encoders 292 schema item attributes 263 schema it...

  • Page 488

    488 index width and height, viewing 223 workflow 216 x and y coordinates 223 scrolling text 110, 128 seconds button, in edit envelope 206 select screen dialog box 228 selectable option for dynamic text 115 for text 115 selectable text 114 selecting adding to a selection 145 connected lines 144 desel...

  • Page 489

    Index 489 snapping to objects 101 to pixels 101 tolerance, setting for objects 103 soften fill edges command 100 sound designer ii files, importing 202 sound object, using a sound with 205 sound properties dialog box 209 sounds in accessible applications 366 adpcm compression 210 buttons, adding to ...

  • Page 490

    490 index property inspector, selecting with 77 selection tool, selecting with 144 swapping color with fill color 76 transparent, applying 76 weight, selecting 77 strokes, selecting default color 76 line style 77 with property inspector 77 with selection tool 144 weight 77 subselection tool adjustin...

  • Page 491

    Index 491 test scene command 42, 60 testing accessible content 373 generate size report option 43 projects 47 sounds 210 text aliasing 111 alignment 113 anti-aliasing 40 breaking apart 120, 155, 368 character options 113 clipboard, importing with 148 color, choosing 112 creating 108 device fonts 107...

  • Page 492

    492 index in movie clips 22 multiple timelines 22 onion skinning frames 173 parent alias 25 for screens 231 target paths 23 target paths, absolute 24 target paths, relative 25 timeline effects adding 158 deleting 161 description and settings 159 editing 161 types of objects 158 timeline frames copyi...

  • Page 493

    Index 493 v variable option for dynamic text 116 variables, html template 331 vector graphics compared to bitmaps 85 creating from imported bitmap images 142 importing with clipboard 148 version control defining site for 49 editing sites 50 opening a file 50 troubleshooting remote folder setup 51 ve...

  • Page 494

    494 index.