MACROMEDIA FLASH MX 2004-USING FLASH Use Manual
MACROMEDIA FLASH MX 2004-USING FLASH Use Manual

MACROMEDIA FLASH MX 2004-USING FLASH Use Manual

Hide thumbs Also See for FLASH MX 2004-USING FLASH:
Table of Contents

Advertisement

Quick Links

Using Flash

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING FLASH and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for MACROMEDIA FLASH MX 2004-USING FLASH

  • Page 1 Using Flash...
  • Page 2 Open Sesame!, Roundtrip, Roundtrip HTML, Shockwave, Sitespring, SoundEdit, Titlemaker, UltraDev, Web Design 101, what the web can be, and Xtra are either registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Macromedia, Inc.
  • Page 3: Table Of Contents

    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) .
  • Page 4 CHAPTER 3: Using Symbols, Instances, and Library Assets ....53 Types of symbols ..........54 About controlling instances and symbols with ActionScript.
  • Page 5 CHAPTER 6: Working with Text ........105 About Unicode text encoding in Flash applications .
  • Page 6 Using the Video Import wizard ........181 Importing Macromedia Flash Video (FLV) files......187 Importing linked QuickTime video files .
  • Page 7 Selecting and moving screens (Flash Professional only) ....226 Creating controls and transitions for screens with behaviors (Flash Professional only) ......... 228 Using Find and Replace with screens (Flash Professional only) .
  • Page 8 Worldwide accessibility standards ........356 Macromedia Flash Accessibility web page ......357 Understanding screen reader technology .
  • Page 9 APPENDIX B: XML to UI ......... . . 435 Layout tag summary for XML to UI dialog boxes .
  • Page 10 Contents...
  • Page 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 the document as a SWF file.
  • Page 12: Creating Or Opening A Document And Setting Properties

    Using the Undo, Redo, and Repeat menu commands ....... 34 Using the History panel .
  • Page 13 To open an existing document: Select File > Open. In the Open dialog box, navigate to the file or enter the path to the file in the Go To text box. Click Open. To set properties for a new or existing document in the Document Properties dialog box: With the document open, select Modify >...
  • Page 14: Using Document Tabs For Multiple Documents (Windows Only)

    To change document properties with the Property inspector: Deselect all assets, then select the Selection tool. If the Property inspector is not visible, select Window > Properties. Click the Size control to display the Document Properties dialog box and access its settings. To select a background color, click the triangle in the Background color box and select a color from the palette.
  • Page 15 To save a Flash document: 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. If you selected the Save As command, or if the document has never been saved before, enter the filename and location.
  • Page 16: About Adding Media Content

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

    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 behaviors to control movie clips and video and sound files.
  • Page 18 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 Flash libraries and permanent libraries that you create are listed in the Window >...
  • Page 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 another document. Working with folders in the Library panel You can organize items in the Library panel using folders, much like in the Windows Explorer or the Macintosh Finder.
  • Page 20 To edit a library item: Select the item in the Library panel. 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 starting a supported external editor, Flash opens the original imported document.
  • Page 21: About Actionscript

    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 external Flash documents.
  • Page 22: Multiple Timelines And Levels

    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 International website at www.ecma-international.org. The popular JavaScript language is rooted in the same standard. For this reason, developers who are familiar with JavaScript should find ActionScript immediately familiar and have no trouble learning it quickly.
  • Page 23: Using Absolute And Relative Target Paths

    Parent and child movie clips When you place a movie clip instance on another movie clip’s Timeline, the placed movie clip is the child and the other movie clip is the parent. The parent instance contains the child instance. The root Timeline for each level is the parent of all the movie clips on its level, and because it is the topmost Timeline, it has no parent.
  • Page 24 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 bakersfield oregon portland ashland washington...
  • Page 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 that targets a Timeline _level0 _level5...
  • Page 26 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 eval To assign an instance name:...
  • Page 27: Working With Scenes

    The following script assigns the value 1 to the variable . It then uses the function to eval create a reference to a movie clip instance and assigns it to the variable . The variable now a reference to a movie clip instance and can call the MovieClip object methods. i = 1;...
  • Page 28: Using The Movie Explorer

    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 the document for modification.
  • Page 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 that scene on the Stage.
  • Page 30: Using Find And Replace

    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.
  • Page 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 Flash can evaluate that returns a value. For more information, see ActionScript Reference Guide Help.
  • Page 32 You cannot find and replace colors in grouped objects. Note: To find and replace colors in a GIF or JPEG file in a Flash document, edit the file in Macromedia Fireworks or a similar image-editing application. To find and replace a color: Select Edit >...
  • Page 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. Select the Fills, Strokes, or Text option or any combination of those options to specify which occurrence of the color to find and replace.
  • Page 34: Using The Undo, Redo, And Repeat Menu Commands

    To find and replace a sound, video, or bitmap: Select Edit > Find and Replace. Select Sound, Video, or Bitmap from the For pop-up menu. For Name, enter a sound, video, or bitmap filename or select a name from the pop-up menu. Under Replace With, for Name enter a sound, video, or bitmap filename or select a name from the pop-up menu.
  • Page 35: Using The History Panel

    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 slider in the History panel initially points to the last step that you performed.
  • Page 36 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 selecting the subsequent steps) is different from selecting an individual step.
  • Page 37: Saving Documents When You Undo Steps

    To reuse steps from one document in another document: In the document containing the steps you want to reuse, select the steps in the History panel. In the History panel options menu, select Copy Steps. Open the document into which you want to paste the steps. Select an object to which you want to apply the steps.
  • Page 38 Getting more commands You can use the Get More Commands option in the Commands menu to link to the Flash Exchange website at www.macromedia.com/cfusion/exchange/index.cfm and download commands that other Flash users have posted. For more information on the commands posted there, see Flash Exchange.
  • Page 39: About Customizing Context Menus In Flash Documents

    To get more commands: Make sure you are connected to the Internet. 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 Flash documents in Flash Player 7. •...
  • Page 40: Speeding Up Document Display

    Speeding up document display To speed up the document display, you can use commands in the View menu to turn off rendering-quality features that require extra computing and slow down document display. None of these commands have any effect on how Flash exports a document. To specify the display quality of Flash documents in a web browser, you use the parameters.
  • Page 41: Testing Document Download Performance

    • 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 that change during the animation from those that do not. •...
  • Page 42 When external SWF files, GIF and XML files, and variables are streamed into a player by using ActionScript calls such as , the data flows at the rate set for streaming. The loadMovie getUrl stream rate for the main SWF file is reduced based on the reduction of bandwidth caused by the additional data requests.
  • Page 43: Printing From The Flash Authoring Tool

    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 each block indicates its relative byte size.
  • Page 44 To set printing options: Select File > Page Setup (Windows) or File > Print Margins (Macintosh). Set page margins. Select both Center options to print the frame in the center of the page. In the Frames pop-up menu, select whether to print all frames in the document or only the first frame of each scene.
  • Page 45: Chapter 2: Working With Projects (Flash Professional Only)

    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.
  • Page 46: Creating And Managing Projects (Flash Professional Only)

    Creating and managing projects (Flash Professional only) You use the Flash Project panel to create and manage projects.The panel displays the contents of a Flash Project in a collapsible tree structure. The panel title bar displays the project name. If a project file is missing (not in its specified location), a Missing File icon appears next to the filename.
  • Page 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 window of an open FLA or AS file and select Add to Project from the context menu.
  • Page 48 To specify a publish profile for a FLA file in a project: 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 select Settings from the context menu.
  • Page 49: Using Version Control With Projects (Flash Professional Only)

    To find a missing file: Select the filename in the Flash Project panel. 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 Missing File from the context menu. Navigate to the file and click OK.
  • Page 50 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. In the Database Path text box, click Browse to browse for the VSS database you want, or enter the full file path.
  • Page 51: Troubleshooting Remote Folder Setup (Flash Professional Only)

    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 use with version control, and how to resolve them: •...
  • Page 52 Chapter 2: Working with Projects (Flash Professional Only)
  • Page 53: Chapter 3: Using Symbols, Instances, And Library Assets

    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.
  • Page 54: Types Of Symbols

    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 For an introduction to using symbols and instances, select Help > How Do I > Quick Tasks > Create Symbols and Instances.
  • Page 55: About Controlling Instances And Symbols With Actionscript

    • 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 bars, to your documents. For more information, see Introduction, “Getting Started with Components,”in Using Components.
  • Page 56 To create a new empty symbol: 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 Library options menu in the upper right corner of the Library panel.
  • Page 57 Deselect your selection and make sure nothing on the Stage is selected. Select Modify > New Symbol. 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. On the Timeline, click Frame 1 on Layer 1, and select Edit >...
  • Page 58: Creating Instances

    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 gives movie clip and button instances default instance names when you create them. From the Property inspector, you can apply custom names to instances.
  • Page 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 button.
  • Page 60: Enabling, Editing, And Testing Buttons

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

    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.
  • Page 62: Changing Instance Properties

    To edit a symbol in a new window: 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. Edit the symbol as needed. To change the registration point, drag the symbol on the Stage. A cross hair indicates the location of the registration point.
  • Page 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 symbols.
  • Page 64 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 you’re creating a cartoon with a rat symbol for your character, but decide to change the character to a cat.
  • Page 65: Controlling Instances With Behaviors

    To set the animation of a graphic instance: Select a graphic instance on the Stage and select Window > Properties. In the Property inspector, select an animation option from the pop-up menu below the instance name: Loop loops all the animation sequences contained in the current instance for as many frames as the instance occupies.
  • Page 66 Behavior Purpose Select/input GotoAndStop at Stops a movie clip, optionally Instance name of target clip to stop. frame or label moving the playhead to a particular Frame number or label to stop. frame. Bring to Front Brings target movie clip or screen to Instance name of movie clip or screen.
  • Page 67: Breaking Apart Instances

    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 affecting any other instance. If you modify the source symbol after breaking apart the instance, the instance is not updated with the changes.
  • Page 68: Copying Library Assets Between Documents

    To get information about an instance on the Stage: Select the instance on the Stage. Display the Property inspector or panel you want to use: To display the Property inspector, select Window > Properties. To display the Info panel, select Window > Design Panels > Info. To display the Movie Explorer, select Window >...
  • Page 69: Using Shared Library Assets

    To copy a library asset by copying and pasting: Select the asset on the Stage in the source document. Select Edit > Copy. Make the destination document the active document. Place the pointer on the Stage and select Edit > Paste in Center to paste the asset in the center of the visible work area.
  • Page 70 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 document author can drag the shared assets from the posted source document into the destination document library.
  • Page 71 To link a shared asset to a destination document by entering the identifier and URL: In the destination document, select Window > Library to display the Library panel. Do one of the following: Select a movie clip, button, or graphic symbol in the Library panel and select Properties from the Library options menu.
  • Page 72: Resolving Conflicts Between Library Assets

    To update or replace a symbol: With the document open, select a movie clip, button, or graphic symbol and select Properties from the Library options menu. If the Symbol Properties dialog box is in basic mode, click Advanced to display the Linkage and Source panels.
  • Page 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 library items using this method is not undoable.
  • Page 74 Chapter 3: Using Symbols, Instances, and Library Assets...
  • Page 75: Chapter 4: Working With Color

    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 create, or one already on the Stage.
  • Page 76: Using The Stroke Color And Fill Color Controls In The Tools Panel

    Transforming gradient and bitmap fills ......... . 80 Copying strokes and fills with the Eyedropper tool .
  • Page 77: Working With Solid Colors And Gradient Fills In The Color Mixer

    To select a stroke color, style, and weight using the Property inspector: Select an object or objects on the Stage (for symbols, first double-click to enter symbol-editing mode). If the Property inspector is not visible, select Window > Properties. To select a color, click the triangle next to the Stroke color box and do one of the following: Select a color swatch from the palette.
  • Page 78 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. Click the arrow in the lower right corner to expand the Color Mixer. Do one of the following: Click in the color space in the Color Mixer to select a color.
  • Page 79: Modifying Strokes With The Ink Bottle Tool

    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. To save the gradient, click the triangle in the upper right corner of the Color Mixer and select Add Swatch from the pop-up menu.
  • Page 80: Transforming Gradient And Bitmap Fills

    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 Transform tool: Select the Fill Transform tool.
  • Page 81: Copying Strokes And Fills With The Eyedropper Tool

    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, drag one of the circular handles on the top or right side of the bounding box.
  • Page 82: Locking A Gradient Or Bitmap To Fill The Stage

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

    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.
  • Page 86 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 determined by the color of the outline and the color of the area enclosed by the outline.
  • Page 87: Flash Drawing And Painting Tools

    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 with the Pencil tool”...
  • Page 88: About Overlapping Shapes In Flash

    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 reshape each segment individually. Note: Overlapping lines that you create with the Pen tool do not divide into individual segments at intersection points, but remain connected.
  • Page 89: Drawing Straight Lines, Ovals, And Rectangles

    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 curved lines. Select Ink to draw freehand lines with no modification applied. Lines drawn with Straighten, Smooth, and Ink mode, respectively Drag on the Stage to draw with the Pencil tool.
  • Page 90: Drawing Polygons And Stars

    Drawing polygons and stars Using the PolyStar tool you can draw polygons or stars. You can choose the number of sides of the polygon or the number of points on the star, from 3 to 32. You can also choose the depth of the star points.
  • Page 91 To set Pen tool preferences: Select the Pen tool, then select Edit > Preferences (Windows) or Flash > Preferences (Macintosh) and click the Editing tab. Under Pen Tool, set the following options: Show Pen Preview previews line segments as you draw. Flash displays a preview of the line segment as you move the pointer around the Stage, before you click to create the end point of the segment.
  • Page 92 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, position the Pen tool over the first anchor point.
  • Page 93 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°. To draw the next segment of a curve, position the pointer where you want the next segment to end, and drag away from the curve.
  • Page 94 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: •...
  • Page 95: Painting With The Brush Tool

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

    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 points on lines and shape outlines and modify the lines and outlines by adjusting the points.
  • Page 98 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. Straightening makes small straightening adjustments to lines and curves you have already drawn.
  • Page 99: Erasing

    Optimizing curves Another way to smooth curves is to optimize them. This refines curved lines and fill outlines by reducing the number of curves used to define these elements. Optimizing curves also reduces the size of the Flash document (FLA file) and the exported Flash application (SWF file). As with the Smooth or Straighten modifiers or commands, you can apply optimization to the same elements multiple times.
  • Page 100: Modifying Shapes

    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 erasing from an empty point, nothing is erased.
  • Page 101: Snapping

    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 individual pixels or lines of pixels on the Stage. •...
  • Page 102 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: •...
  • Page 103: Specifying Drawing Settings

    Specifying drawing settings You can set drawing settings to specify snapping, smoothing, and straightening behaviors when you use Flash drawing tools. You can change the tolerance setting for each option, and turn each option off or on. Tolerance settings are relative, depending on the resolution of your computer screen and the current magnification of the scene.
  • Page 104 Chapter 5: Drawing...
  • Page 105: Chapter 6: Working With Text

    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 also create dynamic or input text fields.
  • Page 106 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.
  • Page 107: About Unicode Text Encoding In Flash Applications

    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 Flash, including multiple languages within a single text field. Any user with Macromedia Flash Player 7 can view multilanguage text in a Macromedia Flash Player 7 application, regardless of the language used by the operating system running the player.
  • Page 108: Creating 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 in the SWF file takes the shape of the rectangular bounding box of the mask, not the shape of the mask itself.
  • Page 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 block.
  • Page 110: Creating Scrolling Text

    To create text: Select the Text tool. Select Window > Properties. 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 field in which users can enter text.
  • Page 111: Setting Text Attributes

    If you want to use ActionScript, you can use the properties of the scroll maxscroll TextField object to control vertical scrolling and the properties to hscroll maxhscroll control horizontal scrolling in a text block. See “Creating scrolling text” in Using ActionScript in Flash.
  • Page 112 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 text. •...
  • Page 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 of characters. Many fonts have built-in kerning information.
  • Page 114 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: Select the Text tool. To apply settings to existing text, use the Text tool to select a text block or text blocks on the Stage.
  • Page 115 To make horizontal text selectable by a user: Select the horizontal text that you want to make selectable by a user. Select Window > Properties. In the Property inspector, select Static Text or Dynamic Text (Input Text is selectable by default). Click the Selectable button.
  • Page 116: Creating Font Symbols

    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 for the text field.
  • Page 117: Editing Text

    In the URL text box, enter the URL where the SWF file that contains the font symbol will be posted. Click OK. To use the font in a Flash application, copy the font symbol into the destination FLA file. For more information, see “Copying library assets between documents”...
  • Page 118 In the Dictionaries scroll list, select one or more dictionaries from the Macromedia dictionaries installed with your product. You must select at least one dictionary to enable spell checking.
  • Page 119: About Transforming Text

    To use the Check Spelling feature: 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 the text is located (such as text field, frame label, or other).
  • Page 120: Breaking Text Apart

    If the Property inspector is not already displayed, select Window > Properties. For Link, enter the URL to which you want to link the text block. Note: To create a link to an e-mail address, use the mailto: URL. For example, for the Macromedia Flash Wish URL, enter mailto:wish-flash@macromedia.com.
  • Page 121: Preserving Rich Text Formatting

    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 property of html the TextField object to , Flash preserves basic text formatting (such as font, style, color, and true size) and hyperlinks in the text field by automatically applying the corresponding HTML tags...
  • Page 122: Substituting Missing Fonts

    Set the text field variable to a value that includes HTML tags. For example, the following code assigns a value to a text field with the variable name . The text is rendered in bold if you select the Render Text as HTML option in the Property inspector, or if the property is set to html...
  • Page 123 To specify font substitution: 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 Default to use the Flash System Default Font to substitute all missing fonts and to dismiss the Missing Fonts alert.
  • Page 124: Controlling Text With Actionscript

    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 to set, change, and format the text field and its content using the TextField andTextFormat objects.
  • Page 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: Select a frame, button, or movie clip that will receive the action.
  • Page 126 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 inspector.
  • Page 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: Select Window > Development Panels > Actions to open the Actions panel if it isn’t already open.
  • Page 128: Creating Scrolling Text

    You can capture the following text field events: onChanged onScroller To use a text field event to trigger a script: 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 field an instance name in the Property inspector.
  • Page 129 Replace with the instance name of the text field you want to scroll. instanceName Increment the scroll property by 1 to scroll the text up. The code should look like this: instName.scroll += 1; Select the Down button on the Stage. Repeat steps 4 and 5.
  • Page 130 Chapter 6: Working with Text...
  • Page 131: Chapter 7: Using Imported Artwork

    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 additional vector or bitmap file formats.
  • Page 132 • 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 Fireworks PNG files”...
  • Page 133 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 specified file.
  • Page 134 The following bitmap file formats can be imported into Flash only if QuickTime 4 or later is installed: File type Extension Windows Macintosh MacPaint .pntg Photoshop .psd PICT .pct, .pic (As bitmap) QuickTime Image .qtif Silicon Graphics Image .sgi .tga TIFF .tif Importing Fireworks PNG files...
  • Page 135 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 on import. For Text, select one of the following: Rasterize if Necessary to Maintain Appearance preserves Fireworks fills, strokes, and effects...
  • Page 136 To import a FreeHand file: Select File > Import to Stage or File > Import to Library. In the Import dialog box, select FreeHand from the Files of Type (Windows) or Show (Macintosh) pop-up menu. Navigate to a FreeHand file and select it. Click Open.
  • Page 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, EPS, or PDF file: Select File >...
  • Page 138: Working With Imported Bitmaps

    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 > Scale command. Also, Flash supports only ASCII DXF files.
  • Page 139 To replace an instance of a bitmap with an instance of another bitmap: Select a bitmap instance on the Stage. Select Window > Properties if the Property inspector is not visible. In the Property inspector, click Swap. In the Swap Bitmap dialog box, select a bitmap to replace the one currently assigned to the instance.
  • Page 140 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.
  • Page 141 Save the file in the image-editing application. The file is automatically updated in Flash. 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 selected and modified separately.
  • Page 142 Converting bitmaps to vector graphics The Trace Bitmap command converts a bitmap into a vector graphic with editable, discrete areas of color. This command lets you manipulate the image as a vector graphic; it is also useful if you want to reduce file size. When you convert a bitmap to a vector graphic, the vector graphic is no longer linked to the bitmap symbol in the Library panel.
  • Page 143: Chapter 8: Working With Graphic Objects

    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 that modifying lines and shapes can alter other lines and shapes on the same layer.
  • Page 144: Selecting Objects

    Selecting objects To modify an object, you must first select it. Flash provides a variety of methods for making selections, including the Selection tool, the Lasso tool, and keyboard commands. You can group individual objects to manipulate them as a single object. See “Grouping objects”...
  • Page 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: To disable the Shift-selecting option, deselect the option in Flash General Preferences.
  • Page 146: Grouping Objects

    To select objects by drawing both freehand and straight-edged selection areas: Select the Lasso tool and deselect the Polygon Mode modifier. To draw a freehand segment, drag on the Stage. To draw a straight-edged segment, Alt-click (Windows) or Option-click (Macintosh) to set start and end points.
  • Page 147: Moving, Copying, And Deleting Objects

    To edit a group or an object within a group: 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. Edit any element within the group.
  • Page 148 To move objects using the Info panel: Select an object or multiple objects. If the Info Panel is not visible, select Window > Design Panels > Info. Enter x and y values for the location of the upper left corner of the selection. The units are relative to the upper left corner of the Stage.
  • Page 149: Stacking Objects

    Enter scale, rotation, or skew values. See “Scaling objects” on page 153, “Rotating objects” on page 153, and “Skewing objects” on page 154. Click the Create Copy button in the Transform panel (the left button in the lower right corner of the panel).
  • Page 150: Transforming 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, rotate, skew, scale, or distort the element. You can change or add to a selection during a transformation operation.
  • Page 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 the symbol. Coordinate grid Info panel with center square in coordinate grid selected;...
  • Page 152 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-Command-drag (Macintosh) a corner handle to taper the object—to move the selected corner and the adjoining corner equal distances from their origins.
  • Page 153 To modify a shape with the Envelope modifier: 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 distorted.
  • Page 154: Flipping Objects

    To rotate and skew objects by dragging: Select the object or objects on the Stage. Select Modify > Transform > Rotate and Skew. Do one of the following: Drag a corner handle to rotate the object. Drag a center handle to skew the object. To end the transformation, click outside the selected object or objects.
  • Page 155: Aligning Objects

    To restore a transformed object to its original state: Select the transformed object. Select Modify > Transform > Remove Transform. To reset a transformation performed in the Transform panel: • With the transformed object still selected, click the Reset button in the Transform panel. Aligning objects The Align panel enables you to align selected objects along the horizontal or vertical axis.
  • Page 156 • 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 Ungroup command. The Ungroup command separates grouped objects, returning grouped elements to the state they were in prior to grouping.
  • Page 157: Chapter 9: Creating Motion

    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, then select an effect and specify parameters.
  • Page 158: Using Timeline Effects

    Tweening shapes ............169 Using shape hints.
  • Page 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 description Settings Copy to grid...
  • Page 160 Motion effect name and description Settings Expand Expands, contracts, or expands and contracts • Expand duration, in frames objects over time. This effect works best with • Expand, squeeze, both two or more objects grouped together or • Expand direction, to left, from center, to right combined in a movie clip or graphic symbol.
  • Page 161: Tweened Animation

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

    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 more rapidly than tweened animation. In frame-by-frame animation, Flash stores the values for each complete frame.
  • Page 163: Representations Of Animations In The Timeline

    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 background. •...
  • Page 164: Extending Still Images

    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 extend a still image through multiple frames: Create an image in the first keyframe of the sequence.
  • Page 165: Tweening Instances, Groups, And Type

    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, whether left-to-right, right-to-left, or top-to-bottom.
  • Page 166 To create a motion tween using the Motion Tweening option: Click a layer name to make it the active layer, and select an empty keyframe in the layer where you want the animation to start. To create the first frame of the motion tween, do one of the following: Create a graphic object with the Pen, Oval, Rectangle, Pencil, or Brush tool, then convert it to a symbol.
  • Page 167 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 the number of frames allotted to it in the Timeline. If you’re using a motion path, select Snap to attach the tweened element to the motion path by its registration point.
  • Page 168: Tweening Motion Along A Path

    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 document.
  • Page 169: Tweening Shapes

    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. •...
  • Page 170: Using Shape Hints

    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 -100. To begin the shape tween rapidly and decelerate the tween toward the end of the animation, drag the slider up or enter a positive value between 1 and 100.
  • Page 171: Creating Frame-By-Frame Animations

    To use shape hints: Select the first keyframe in a shape-tweened sequence. Select Modify > Shape > Add Shape Hint. The beginning shape hint appears as a red circle with the letter a somewhere on the shape. Move the shape hint to a point that you want to mark. Select the last keyframe in the tweening sequence.
  • Page 172: Editing Animation

    To complete your frame-by-frame animation sequence, repeat steps 4 and 5 until you’ve built the motion you want. 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 keyframe, you can move it elsewhere in the active layer or to another layer, remove it, and make other changes.
  • Page 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 Library panel onto the Stage.
  • Page 174: Using Mask Layers

    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: Unlock all layers.
  • Page 175 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 contents show through the filled area on the mask. The masked layer name is indented, and its icon changes to a masked layer icon.
  • Page 176 Chapter 9: Creating Motion...
  • Page 177: Chapter 10: Working With Video

    188. • If you have Macromedia Flash MX Professional 2004, you can use the FLV file format to create and import video in a streamlined workflow. You can export FLV files from video-editing applications using the FLV plug-in. For more information, see “Exporting FLV files from...
  • Page 178: About File Formats For Imported Video

    For more information, see “Changing the properties of a video clip” on page 190. For lessons on working with video, see Import and Edit Video on the Macromedia Flash Support Center at www.macromedia.com/support/flash/images_video/flash_video/. About file formats for imported video...
  • Page 179: About The Sorenson Spark Codec

    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, see “About the Sorenson Spark codec” on page 179.
  • Page 180 Because video looks much better at native frame rates, Macromedia recommends leaving it high if allowed by your delivery channels and playback platforms. However, if you need to reduce the frame rate, the best results come from dividing the frame rate by whole numbers.
  • Page 181: Using The Video Import Wizard

    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 resolution than conventional televisions.
  • Page 182 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 > Create a Document or Import and Edit Video.
  • Page 183 To edit an embedded video clip: Import an embedded video clip. Select Edit the Video First, and click Next to open the Editing pane of the Video Import wizard. To browse frames in the video, do one of the following: Drag the playhead along the scrubber bar.
  • Page 184 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 keyframes, ensure consistent image quality in keyframes, increase encoding speed, and match the playback speed of the imported video to the playback speed of the main Flash document Timeline.
  • Page 185 Select Quick Compress to reduce the time it takes to compress a file. Increasing encoding speed can also decrease image quality. Select Synchronize Video to Macromedia Flash Document Frame Rate to match the playback speed of the imported video to the playback speed of the main Flash document Timeline.
  • Page 186 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 separate file or an integrated part of the video file, or you can exclude the audio track from the imports.
  • Page 187: Importing Macromedia Flash Video (Flv) Files

    Click No to keep the span at its current size. Frames in the imported clip that exceed the frames in the span do not appear unless you subsequently add frames to the span. Importing Macromedia Flash Video (FLV) files The FLV file format lets you import or export a static video stream with encoded audio. This format can be used with communications applications, such as video conferencing.
  • Page 188: Importing Linked Quicktime Video Files

    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.
  • Page 189: About Playing Back External Flv Files Dynamically

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

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

    To update a video clip: Select the video clip in the Library panel. Select Properties from the Library options menu. In the Embedded Video Properties dialog box, click Update. Navigate to the updated video file and click Open. The file is reimported into the Flash document.
  • Page 192: About Controlling Video Playback Using The Timeline

    Exporting FLV files from video-editing applications (Flash Professional only) If you have Macromedia Flash MX Professional 2004 and QuickTime 6.1.1 installed on your computer, you can use the FLV Export plug-in to export FLV files from supported video-editing applications. You can then import these FLV files directly into Flash to use in your Flash documents.
  • Page 193 You can import FLV files directly into Flash without needing to re-encode the video after import. For more information on video formats and importing to Flash, see “Video Fundamentals” at www.macromedia.com/support/flash/. The following video-editing applications are supported by the FLV Export plug-in: •...
  • Page 194 To export an FLV file from a supported application: With the video open in the video-editing application, select File > Export > QuickTime. In the Export dialog box, under Export, select Macromedia Flash Video (FLV), and click Options. In the Flash Video (FLV) Exporter dialog box, select an Encoding Method from the...
  • Page 195 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 resolution and frame rate. When you select Low, Medium, and High from this menu, the Limit Data Rate To text box updates to reflect the specified value.
  • Page 196: Playing Flv Video Clips With Media Components (Flash Professional Only)

    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 animation, text, and graphics. For example, you can create a Flash presentation that has video playing in one area of the screen while text and graphics appear in another area.
  • Page 197 sets the number of frames per second for video playback. When Milliseconds is selected, the frames per second control is disabled. sets the path and filename or URL for the media. Automatically Play sets the media to play as soon as it is available. Use Preferred Media Size displays the FLV video clip at its native size and aspect ratio.
  • Page 198 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 the controller appears as default or as none.
  • Page 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 default, cue point times are specified in “hour : minute : second : frame”...
  • Page 200 To add a Slide CuePoint Navigation behavior: Create a slide presentation and name each screen. For more information, see Chapter 12, “Working with Screens (Flash Professional Only),” on page 215. Select the MediaDisplay or MediaPlayback component that will trigger the action. In the Behaviors panel (Window >...
  • Page 201: Chapter 11: Working With Sound

    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 them more interactive and make sounds fade in and out for a more polished sound track.
  • Page 202: Importing Sounds

    Using the sound-editing controls ..........206 Controlling sound playback using behaviors .
  • Page 203: Adding Sounds To A Document

    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 or work with 8-bit sounds instead of 16-bit sounds.
  • Page 204: Adding Sounds To Buttons

    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. Select a synchronization option from the Sync pop-up menu: Note: If you are placing the sound on a frame other than Frame 1 in the main TImeline, select the Stop option.
  • Page 205: Using Sounds With Sound Objects

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

    in Flash ActionScript Language For more information on using the ID3 properties, see Sound.id3 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 in the Property inspector.
  • Page 207 To load a sound to a file using a behavior: Select the object, such as a button, that you want to use to trigger the behavior. In the Behaviors panel (Window > Development Panels > Behaviors), click the Add (+) button and select Sound >...
  • Page 208: Starting And Stopping Sounds At Keyframes

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

    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 single stream file, using the highest setting of all those applied to individual stream sounds.
  • Page 210 Set export settings. Click Test to play the sound once. Click Stop if you want to stop testing the sound before it finishes playing. Adjust export settings if necessary until the desired sound quality is achieved. Click OK. The Default compression option uses the global compression settings in the Publish Settings dialog box when you export your SWF file.
  • Page 211 To use MP3 compression: In the Sound Properties dialog box, select MP3 from the Compression menu. Deselect Use Imported MP3 Quality (the default setting). For Bit Rate, select an option to determine the bits per second in the exported sound file. Flash supports 8 through 160 Kbps CBR (constant bit rate).
  • Page 212 Using the Speech compression option The Speech compression option exports sounds using a compression specially adapted to speech. To use speech compression: In the Sound Properties dialog box, select Speech from the Compression menu. For Sample Rate, select an option to control sound fidelity and file size. A lower rate decreases file size but can also degrade sound quality.
  • Page 213: Using Sounds In Flash Documents For Mobile Devices (Flash Professional Only)

    For detailed information on authoring for mobile devices, see the Content Development Kits on the Mobile and Devices Development Center at www.macromedia.com/ devnet/devices. Flash does not support sound file formats used for mobile devices (such as MIDI and others);...
  • Page 214: Creating A Flash Lite Sound File

    For a complete overview of the process, see the FlashLite1.1_Authoring_Guidelines.pdf file on your Macromedia Flash application CD or on the Mobile and Devices Development Center. Chapter 11: Working with Sound...
  • Page 215: Chapter 12: Working With Screens (Flash Professional Only)

    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 applications.
  • Page 216: Understanding Screen-Based Documents And The Screen Authoring Environment (Flash Professional Only)

    This chapter contains the following sections: Understanding screen-based documents and the screen authoring environment (Flash Professional only)............216 Using the Screen Outline pane (Flash Professional only) .
  • Page 217: Understanding Screen-Based Documents And The Screen Authoring Environment

    • “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 screens with behaviors (Flash Professional only)” on page 228 Slide presentations and form applications (Flash Professional only) You can create screen-based documents of two types.
  • Page 218 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 parent of that screen. If a screen is nested several layers deep, all the screens above that screen are its ancestors.
  • Page 219: Using The Screen Outline Pane (Flash Professional Only)

    You can set parameters for slide or form screens in the Property inspector. For more information, “Setting parameters for a screen (Flash Professional only)” on page 225. You can also use ActionScript to control screens. For more information, see “Screen class (Flash Professional only)”, “Form class (Flash Professional only)”, and “Slide class (Flash Professional only)”, in Using Components.
  • Page 220: About Undoing And Redoing Commands With Screens

    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, and hiding a screen. The following actions performed on screens are recorded in the History panel: adding a screen, adding a nested screen, selecting a screen, renaming a screen, and deleting a screen.
  • Page 221: Adding Screens To A Document (Flash Professional Only)

    To create a new screen-based document from the Start page: • Select a screen type for your document. Under Get Started, select one of the following from the Open a File options menu: Flash Slide Presentation creates a document with the slide screen as the default screen type. Flash Form Application creates a document with the form screen as the default screen type.
  • Page 222: Naming Screens (Flash Professional Only)

    To add a screen of a specified type at the current screen level: Select a screen in the Screen Outline pane. Select Insert Screen Type from the context menu and select a screen type. To add a nested screen of the default type: Select a screen in the Screen Outline pane.
  • Page 223: Setting Properties And Parameters For A Screen (Flash Professional Only)

    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 and parameters for individual screens. On the left side of the Property inspector, you can view the instance name, width, height, and x and y coordinates of a screen: •...
  • Page 224 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 ActionScript class specifies what class to which the screen belongs. The class determines what methods and properties are available for the screen.
  • Page 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 available for slide and form screens. The following parameters are available only for slide screens: •...
  • Page 226: About Adding Media Content To Screens (Flash Professional Only)

    • The parameter is an absolute or relative URL indicating the file to load when the contentPath method is called. A relative path must point to the SWF file loading the Loader.load() content. The URL must be in the same subdomain as the URL where the Flash content currently resides.
  • Page 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 pop-up menu.
  • Page 228: Creating Controls And Transitions For Screens With Behaviors (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, drag it toward the right side of the Screen Outline pane below the intended parent.
  • Page 229 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 an absolute target path, and click OK. (For information on target paths, see “Using absolute and relative target paths”...
  • Page 230: Using Find And Replace With Screens (Flash Professional Only)

    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. For Duration, enter a time in seconds. For Easing, select an option to define the transition style. If the transition has additional parameters, select options or enter values for those parameters in the fields provided.
  • Page 231: About Using Timelines With Screens (Flash Professional Only)

    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 screen-based document. You can add frames, keyframes, and layers, and manipulate content on a screen’s Timeline.
  • Page 232 • The class name identifies the ActionScript class to which the screen is assigned. By default, a slide screen is assigned to the class, and a form screen is assigned to the mx.screens.Slide class. You can assign the screen to a different class to modify the methods mx.screens.Form and properties that are available for the screen.
  • Page 233: About Using Components With Screens (Flash Professional Only)

    For more information on controlling screens with ActionScript, see “Screen class (Flash Professional only)”, “Form class (Flash Professional only)”, and “Slide class (Flash Professional only)”, in Using Components. For information on the Object class and the event handler, see “Object class” and onclipEvent() in Flash ActionScript Language Reference.
  • Page 234 Chapter 12: Working with Screens (Flash Professional Only)
  • Page 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 enhance the work flow for authoring multiple language Unicode-based applications. You can include multilanguage text in your document in the following ways: •...
  • Page 236: Selecting An Encoding Language

    “Using external text or XML files that are not Unicode encoded” on page 251. For Flash applications in Macromedia Flash Player 5 or earlier that are authored in Flash MX or earlier, Flash Player 6 and earlier versions display the text using the traditional code page of the operating system running the player.
  • Page 237: Fonts For Unicode-Encoded Text

    XML files, the text in these files should be UTF-8 encoded. You can create these files using the Strings panel or in a text or HTML editor, such as Macromedia Dreamweaver MX 2004, that can save the files in Unicode format.
  • Page 238 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 can select ranges of fonts you want to embed. To select and embed a range of fonts: On the Stage, select a text field, and then show the Property inspector (Window >...
  • Page 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 necessary Unicode glyph ranges as shown in the following Korean examples.
  • Page 240: Authoring Multilanguage Text With The Strings Panel

    Range Description Basic Hangul Most commonly used Korean characters, Roman characters, punctuations, and special characters/symbols Hangul (All) 11,720 Korean characters (sorted by Hangul syllables), Roman characters, punctuations, and special characters/symbols) Traditional Chinese – 5000 most commonly used Traditional Chinese characters used in Level 1 Taiwan Traditional Chinese (All) All Traditional Chinese characters used in Taiwan and Hong Kong, and...
  • Page 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 translation”...
  • Page 242 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 Flash documents”...
  • Page 243 To add a string ID to the Strings panel without assigning it to a text field: Select Window > Other Panels > Strings to open the Strings panel. Type in a new string ID and new string in the Strings panel, and click the Apply button. Note: You can also use the Enter key to apply the ID to the text field.
  • Page 244 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 folder indicated as the SWF publish path.
  • Page 245 If you want to enable automatic language detection, make sure that Insert ActionScript for Automatic Language Detection is selected. Click OK. XML file format Exported XML is in UTF-8 format and follows the XML Localization Interchange File Format (XLIFF)1.0 standard. It defines a specification for an extensible localization interchange format that lets any software provider produce a single interchange format that can be delivered to, and understood by, any localization service provider.
  • Page 246 <source></source> </trans-unit> </body> </file> </xliff> French version sample <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN" "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd" > <xliff version="1.0" xml:lang="fr"> <file datatype="plaintext" original="MultiLingualContent.fla" source- language="EN"> <header></header> <body> <trans-unit id="001" resname="IDS_GREETINGS"> <source>Bienvenue sur notre site web!</source> </trans-unit> <trans-unit id="002" resname="IDS_MAILING LIST"> <source>Voudriez-vous être sur notre liste de diffusion?</source>...
  • Page 247 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. To translate text in an XML file: Using an XML file editor or translating software, open the folder for the desired language, then the XML file for that language.
  • Page 248: Creating Documents With Multilanguage Text Without Using The Strings Panel

    Creating documents with multilanguage text without using the Strings panel You can create documents with multilanguage text without using the Strings panel. Using the XMLConnector component to connect to external XML files You can use the XMLConnector component to connect to an external XML document in order to bind to properties in the document.
  • Page 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 identify the encoding format to Flash Player. For more information, see “Unicode encoding formats supported by Flash Player”...
  • Page 250 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 that external files that use the #include action are encoded in the traditional code page of the operating system running the authoring tool.
  • Page 251: Using External Text Or Xml Files That Are Not Unicode Encoded

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

    The Macromedia website and Flash Help has many tutorials on creating rich Internet data applications in Flash. For downloadable examples and tutorials that use the data components, see “Additional resources”...
  • Page 254 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 manage how the data is displayed in your application and how it’s updated on the server.
  • Page 255: Additional Resources

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

    Creating a simple application The following example walks you through creating a simple data integration application, which can help you understand the concepts and steps involved. In the example, you create a simple application that loads and displays a dinner menu. You load an XML file, which you’ll use both as a data source and as a sample for the data source’s schema.
  • Page 257: Workflows For Using The Data Components

    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 instance that you just added. Now, add two new xmlConn bindings: Bind the DataSet’s...
  • Page 258 Set up the connector component: Set component parameters. Set component properties on the Schema tab. Bind the connector component to DataSet component. Set up the DataSet component: Set component parameters. Set component properties on the Schema tab. Bind the UI component to the DataSet component. Set up the resolver component: Set component parameters.
  • Page 259: Data Binding (Flash Professional Only)

    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 rich internet applications, you can map data from external data sources to Flash components.
  • Page 260 For more tutorials that show you how to create data bindings, see www.macromedia.com/devnet/ mx/flash/data_integration.html. Working with schemas in the Schema tab (Flash Professional only) The Schema tab in the Component inspector lets you view and edit the schema for each data- related component in your application.
  • Page 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 instance, with the property selected, and the bottom pane shows the xmlConn food:Array settings for the...
  • Page 262 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. “Connecting to XML data with the XMLConnector component (Flash Professional only)” on page 277.
  • Page 263 In the Bound To dialog box, select the CheckBox component under Component Path, and click OK. Select the Checkbox component on the Stage, and click the Parameters tab in the Component inspector. Select Control > Test Movie. To test the functionality, type a value into the TextInput component and then deselect the CheckBox component.
  • Page 264 The following illustration shows the runtime process of the data binding engine. The four attributes that handle data types are shown in the illustration and discussed in the following text. GET DATA SET DATA DataType Type conversion Validation Formatter (maybe) (maybe) Convert to String Convert from String...
  • Page 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 the data is a string and a Formatter setting exists, then the formatter converts the data from string to the specified ActionScript data type.
  • Page 266 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 (-) buttons. The bottom pane shows information about settings for the selected property, such as what it’s bound to and in which direction it’s bound.
  • Page 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 you want to expose for binding. Component properties appear as root nodes within the schema tree.
  • Page 268 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 commonly need to specify, as well more complex properties such as Formatter and Formatter Options: Direction Shows a list of directions that can be set for a binding.
  • Page 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 includes the Component Path pane and the Schema Location pane.
  • Page 270 To use a dynamic value for the Bound To property: Select a component in the Component Path pane. 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 Schema Location pane. Select Use Path Expression, select a component property from the schema tree, and enter a path expression.
  • Page 271 Select the instance, click the Bindings tab, click the + symbol, and select the xmlConn property, which is in the array. description:String food Notice that on the Bindings tab, the attribute is dynamically added, as Index for ‘food’ shown in the following image; you’ll fill in this value in a later step. With the field selected on the results:dinner_menu:food.[n].description:String...
  • Page 272 Next, set the DataGrid index default value to 0 to make it available for data binding: select the instance, click the Schema tab, select , and in the Default menu_dg selectedIndex:number Value field in the lower pane, type Save and test the application. Click Load Data, then click different items in the data grid. The text area updates with the detailed description for each food item.
  • Page 273 DataSet, that provide their own events for accessing data that may become out of sync with data binding. To avoid these issues, Macromedia recommends that you publish to Flash Player 7 when using the DataSet component. Data binding (Flash Professional only)
  • Page 274: Data Connectivity (Flash Professional Only)

    Note: The WebService classes are accessible only through ActionScript code and are common to various Macromedia products. The WebServiceConnector component has an API that is unique to Flash MX 2004 and lets you access the component’s methods, properties, and events through the visual interface.
  • Page 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 a URL, specifies a list of operations, parameters, and results that are exposed by the web service.
  • Page 276 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, , when it is called; this is the write-only product input, as indicated by the right-pointing arrow.
  • Page 277 To add, edit the name of, or remove a web service: Click Define Web Services (the planet icon at the top of the panel). To add a service, click Add Web Service, and enter the URL of the web service. Double-click an existing web service to edit its name, or select a service and click Remove to remove it.
  • Page 278 In the Open File dialog box, select the file that you want to use as a sample, and click Open. The schema appears in the Schema tab. You can now create bindings between elements of your XML document and other component properties within your application. Note: Some XML documents may have a structure that Flash MX cannot represent;...
  • Page 279 “XMLConnector component (Flash Professional only)” in Using Components. For a common workflow using this component, see “Using the XMLConnector component (Flash Professional only)” in Using Components. You can also read the following tutorials on Macromedia DevNet: “Bike Trips Sample” at www.macromedia.com/devnet/mx/flash/articles/xmlconnector.html and “Data Integration Using ASP”...
  • Page 280: Data Management (Flash Professional Only)

    For more information, see the DevNet article “Getting a Handle on Web Services” at www.macromedia.com/devnet/mx/flash/articles/flmxpro_webservices.html. Data management (Flash Professional only) You use the DataSet component for applications that handle managed data. The term managed data refers to the ability to perform advanced operations on a local cache of data, including multiple sorts, filters, finds, and offline caching.
  • Page 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 properties of a DataSet component on the Schema tab.
  • Page 282 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 import the DataBinding classes into your FLA file and set schema properties in your code.
  • Page 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 result is assigned to the property of dataProvider component instance: myDataset...
  • Page 284 Array of objects returned from an XMLConnector component The following illustration shows an example of using the Component inspector to bind an array of XML nodes, represented with the XMLConnector component. It assumes that you have imported a schema for an XML file that contains an array of XML nodes.
  • Page 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 myDataSet.first(); //Traces through the properties while ( myDataSet.hasNext() ) { //access the data through the Dataset properties trace(myDataSet.firstName + "...
  • Page 286: Data Resolution (Flash Professional Only)

    Select the DataGrid component, and click the Bindings tab of the Component inspector. Click the Add Binding (+) button to add a new binding. Select dataProvider:Array Click Bound To, select the DataSet component, and select its property. dataProvider:Array Click Direction and select In. Save and test the application.
  • Page 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 connector component, such as the XMLConnector or WebServiceConnector components.
  • Page 288 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 XUpdateResolver component (Flash Professional only)” in Using Components.
  • Page 289: Advanced Topics In Data Integration

    304. For a tutorial that uses the RDBMSResolver component, see the DevNet article “Using the RDBMSResolver to Update a Database” at www.macromedia.com/devnet/mx/flash/articles/ delta_packet.html. Formatting your results (Flash Professional only) By default, the resolver components use the schema specified on the connector components to format values sent to the server.
  • Page 290 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 and the data management components handle the data of a field.
  • Page 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 type. For example, the String data type has settings for the minimum and maximum allowed length of the data.
  • Page 292 Default settings These settings let you set defaults for various situations. The following list describes the uses for these settings: • If a field’s value is undefined, the default value is used whenever the value of the field is used as the source of a data binding.
  • Page 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 value in the grid instead of true false...
  • Page 294 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 kind. Data Data The schema item is a data structure, and the data field is stored within the data structure as specified by the field’s schema location.
  • Page 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 value that data binding expects the property to have.
  • Page 296 In the following example, the row node represents a record within the XML file. The value of attribute is what makes the row unique. <datapacket> <row id="1" date="01/01/2003" rate="50" hours="5" /> <row id="2" date="02/04/2003" rate="50" hours="8" /> </datapacket> The XPath to uniquely identify the row node is shown in the following example: datapacket/row[@id=’xxx’] In this example, xxx represents a value for the attribute.
  • Page 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 will be instantiated to encode/decode the data. This class must be a subclass of mx.databinding.DataAccessor.
  • Page 298 are the names of the fields in the new array or records. The is one fieldnameN definitionN 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 tag is the name of a field in the original array, enclosed in <...
  • Page 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 return. If not, the function should call .
  • Page 300 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 following restrictions: •...
  • Page 301 Component Property/field Settings When to use Any component Any property or field Kind, Kind Options, Various purposes, as Encoding, Encoding Options described in “Using kinds and encoders” on page 292. Any connector (and its Path To identify the location of the results subfields) data for a virtual schema...
  • Page 302 The solution is to create a new schema field under the object within the Bird array. The new schema field is named . Every schema field has a property called that accepts an XPath path statement that points to the data in your XML file. In this case the XPath expression would be .
  • Page 303 • Support for Boolean values in predicates: /B[@id=1 AND @customer="macromedia"] Note: The following operators are not supported: "<", ">", "//". To add a binding using path expressions: In either the Add Binding dialog box or the Bound To dialog box, select Use path expression.
  • Page 304 Example of an RDMBSResolver component XML update packet • About receiving results from an external data source In addition to the information in this section, see the DevNet article “Using the RDBMSResolver to Update a Database” at www.macromedia.com/devnet/mx/flash/articles/delta_packet.html. Chapter 14: Data Integration (Flash Professional Only)
  • Page 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 parameter values that are assigned by the developer. For information on the RDBMSResolver component parameters, see “Using the RDBMSResolver component (Flash Professional only)”...
  • Page 306 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 parameter, it will always appear in fieldInfo the update packet with . Otherwise, the field’s key attribute in the update packet will key="true"...
  • Page 307 • The optional attribute contains a message string that describes the problem that occurred when attempting the operation • Zero, one, or more child nodes give field-level specific information. Each node, field field at a minimum, should have a attribute that contains the field name, and a attribute name that gives the field-level message.
  • Page 308 To request the data, use the ActionScript expression, as for any array. You myArray[myIndex] must access the array using numeric indices; that is, must be a number. To iterate over the myIndex array, use the following statement: for(var i=0; i < myArray.length; i++); The expression won’t work in this case.
  • Page 309: Chapter 15: Publishing

    “Using publish profiles” on page 327. If you’re publishing content that targets Macromedia Flash Player 4 or later, you can implement Flash Player detection, which checks your user’s version of Flash Player. If the user doesn’t have the specified version, you can direct the user to an alternate web page. For more information, see “Configuring publish settings for Flash Player detection”...
  • Page 310: Playing Your Flash Swf Files

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

    Exact domain matching Flash Player 6 lets SWF files from similar domains (for example, ) communicate freely with each other and www.macromedia.com store.macromedia.com with other documents. In Flash Player 7, the domain of the data to be accessed must match the data provider’s domain exactly for the domains to communicate.
  • Page 312 To set general publish settings for a Flash document: Open the Publish Settings dialog box. Do one of the following: Select File > Publish Settings. In the Property inspector for the document (which is available when no object is selected), click the Settings button.
  • Page 313 Click the Flash tab and select a Player version from the Version pop-up menu. Not all Macromedia Flash MX 2004 and Macromedia Flash MX Professional 2004 features work in published SWF files that target Flash Player versions earlier than Flash Player 7.
  • Page 314 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 of Flash Player 6 or later.
  • Page 315 To modify the document-level classpath: Select File > Publish Settings to open the Publish Settings dialog box. Click the Flash tab. Verify that ActionScript 2.0 is selected in the ActionScript Version pop-up menu and click Settings. In the ActionScript Settings dialog box, specify the frame on which the class definition should reside in the Export Frame for classes text box.
  • Page 316 To publish HTML that displays your Flash SWF file: Do one of the following to open the Publish Settings dialog box: Select File > Publish Settings. In the Property inspector for the document (which is available when no object is selected), click the Settings button.
  • Page 317 Select Quality options to determine the trade-off between processing time and appearance, as described in the following list. This option sets the parameter’s value in the QUALITY object tags. embed favors playback speed over appearance and does not use anti-aliasing. Auto Low emphasizes speed at first but improves appearance whenever possible.
  • Page 318 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 parameter in the SCALE tags. object embed Default (Show All) shows the entire document in the specified area without distortion while maintaining the original aspect ratio of the SWF files.
  • Page 319 To enable Flash Player detection: 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 available only if you selected Flash Player 4 or later on the Flash tab of the Publish Settings dialog box, and if you have not selected QuickTime or Image Map as a template.
  • Page 320 To publish a GIF file with your Flash file: Do one of the following to open the Publish Settings dialog box: Select File > Publish Settings. In the Property inspector for the document (which is available when no object is selected), click the Settings button.
  • Page 321 Palette box at the bottom of the dialog box and select a palette file. Flash supports palettes saved in the ACT format, exported by Macromedia Fireworks and other leading graphics applications; for more information, see “Importing and exporting color...
  • Page 322 PNG is the only cross-platform bitmap format that supports transparency (an alpha channel). It is also the native file format for Macromedia Fireworks. Flash exports the first frame in the SWF file as a PNG file, unless you mark a different keyframe for export by entering the frame label #Static.
  • Page 323 To publish a PNG file with your Flash SWF file: Do one of the following to open the Publish Settings dialog box: Select File > Publish Settings. In the Property inspector for the document (which is available when no object is selected), click the Settings button.
  • Page 324 To select a custom palette, click the Ellipsis (...) button to the right of the Palette box at the bottom of the dialog box and select a palette file. Flash supports palettes saved in the ACT format, exported by Macromedia Fireworks and other leading graphics applications; for more information, see “Importing and exporting color palettes”...
  • Page 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 selected PNG file.
  • Page 326 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. Select one of the following Alpha options to control the transparency (alpha) mode of the Flash track in the QuickTime video without affecting any alpha settings in the Flash application: Alpha Transparent...
  • Page 327: About Publishing Flash Lite Documents

    About publishing Flash Lite documents Macromedia Flash Lite lets Flash designers, developers, and content providers quickly create engaging content for mobile phones using the ActionScript scripting language, drawing tools, and templates. For detailed information on authoring for mobile devices, see the Content Development Kits on the Mobile and Devices Development Center at www.macromedia.com/...
  • Page 328 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: From the Current Profile pop-up menu in the Publish Settings dialog box (File > Publish Settings), select the publish profile that you want to copy.
  • Page 329: About Html Publishing Templates

    Deleting a publish profile When you no longer need a publish profile, you can delete it from the document. To delete a publish profile: In the Publish Settings dialog box (File > Publish Settings), select the publish profile that you want to delete in the Current Profile pop-up menu.
  • Page 330: Customizing Html Publishing Templates

    Note: The Application Data folder is normally a hidden folder; you might need to change your Windows Explorer settings to see this folder. Windows 98 boot drive:\Program Files\Macromedia\Flash MX 2004\language\ First Run\HTML For Macintosh operating systems: Macintosh OS X 10.1.5 and 10.2.6 and later...
  • Page 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 Template title Template description start Template description finish Flash (SWF file) title Width...
  • Page 332 For JPEG, during the publish operation, place the playhead on the frame to be used for display. In an HTML editor, open the HTML template you’ll modify. Flash stores HTML templates in the following location: <boot drive>:\Program Files\Macromedia\Flash MX 2004\ <language>\First Run\HTML. Save your template.
  • Page 333 Sample template The following Default.HTML template file in Flash includes many of the commonly used template variables: $TTFlash Only Display Macromedia Flash Movie in HTML. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>...
  • Page 334: Editing Flash Html Settings

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100" height="100" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/ flash/swflash.cab#version=7,0,0,0"> <param name="movie" value="moviename.swf"> <param name="play" value="true"> <param name="loop" value="true"> <param name="quality" value="high"> </object>...
  • Page 335 Note: If you use both the and the tags, use identical values for each attribute object embed or parameter to ensure consistent playback across browsers. The parameter is optional, and you can omit it if you don’t want to check for swflash.cab#version=7,0,0,0 the version number.
  • Page 336 (For example, the following sizes all have a 4:3 aspect ratio: 640 x 480 pixels, 320 x 240 pixels, and 240 x 180 pixels.) codebase attribute Value http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=7,0,0,0 Description Identifies the location of the Flash Player ActiveX control so that the browser can automatically download it if it is not already installed.
  • Page 337 Description Identifies the location of the Flash Player plug-in so that the user can download it if it is not already installed. The value must be entered exactly as shown. Applies to the tag only. embed swliveconnect attribute Value true false Description (Optional) Specifies whether the browser should start Java when loading Flash Player for the first...
  • Page 338 quality attribute/parameter Value medium high autolow autohigh best Template variable: Description (Optional) Specifies the level of anti-aliasing to be used when your application plays. Because anti-aliasing requires a faster processor to smooth each frame of the SWF file before it is rendered on the viewer’s screen, select one of the following values based on whether your priority is speed or appearance: favors playback speed over appearance and never uses anti-aliasing.
  • Page 339 scale attribute/parameter Value showall noborder exactfit Template variable: Description (Optional) Defines how the application is placed within the browser window when width values are percentages. height Showall (Default) makes the entire Flash content visible in the specified area without distortion while maintaining the original aspect ratio of the.
  • Page 340 About Macromedia Flash Player 6 option and the Settings option. The default value is if this attribute is omitted...
  • Page 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 its own rectangular window on a web page. Window indicates that the Flash application has no interaction with HTML layers and is always the topmost item.
  • Page 342: Previewing The Publishing Format And Settings

    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 nothing focusable in the HTML following the Flash application.
  • Page 343: About Configuring A Web Server For Flash

    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 error messages or a blank window with a puzzle piece icon.
  • Page 344 Chapter 15: Publishing...
  • Page 345: Chapter 16: Exporting

    Chapter 13, “Creating Multilanguage Text,” on page 235. If you have Macromedia Dreamweaver, you can add Flash content to your website easily. Dreamweaver generates all the needed HTML code. You can start Flash from within Dreamweaver to update the Flash content. See “Updating Flash content for Dreamweaver...
  • Page 346: About Export File Formats

    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 page-layout and word-processing programs.
  • Page 347 The Export Adobe Illustrator dialog box lets you select the Adobe Illustrator version—88, 3.0, 5.0, or 6.0. You can use the Macromedia Flashwriter plug-in to export files in SWF format from Adobe Illustrator 8. Adobe Illustrator versions 9 and 10 have built-in support for SWF export, so the Macromedia Flashwriter plug-in is not needed.
  • Page 348 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 the following options: Dimensions sets the size of the exported bitmap image in pixels.
  • Page 349 311. Macromedia Flash Video (FLV) The Macromedia FLV file format lets you import or export a static video stream with encoded audio. This format is intended for use with communications applications, such as video conferencing and files that contain screen share encoded data exported from the Flash Communication Server.
  • Page 350 Include sets the portion of the document to be exported, either Minimum Image Area or Full Document Size. Color Depth designates whether the PICT file is object-based or bitmap. Object-based images generally look better when printed, and scaling doesn’t affect their appearance. Bitmap PICT images normally look best onscreen and can be manipulated in applications such as Adobe Photoshop.
  • Page 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 video track. The Flash content is exported as a bitmap image without any interactivity.
  • Page 352: Updating Flash Content For Dreamweaver Ultradev

    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 anti-aliasing to the exported AVI movie.
  • Page 353 Update the Flash document (FLA) as needed in Flash. 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 corner of the Stage.
  • Page 354 Chapter 16: Exporting...
  • Page 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, consider how users might interact with the content.
  • Page 356: Worldwide Accessibility Standards

    Macromedia Flash Accessibility web page........
  • Page 357: Macromedia Flash Accessibility Web Page

    Macromedia Flash Accessibility web page For the latest information on creating and viewing accessible Flash content, including supported platforms, screen reader compatibility, articles, and accessible examples, consult the Macromedia Flash Accessibility web page at www.macromedia.com/software/Flash/productinfo/accessibility/. Understanding screen reader technology Screen readers are software designed to navigate through a website and read the web content aloud.
  • Page 358 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. (These modes are options in the HTML Publish Settings panel, available for use with the Windows version of Internet Explorer 4.0 or later, with the Flash ActiveX control.) If you need your Flash content to be accessible to screen readers, avoid using these modes.
  • Page 359: Using Flash To Enter Accessibility Information For Screen Readers

    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 transferred to the screen reader. No names are transferred, except where labeling relationships are found, and no descriptions or keyboard shortcut strings are transferred.
  • Page 360 All objects in Flash documents must have instance names for you to apply accessibility options to them. You create instance names for objects in the Property inspector. The instance name is used to refer to the object in ActionScript. To open the Accessibility panel: Select Window >...
  • Page 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 Accessibility panel to assign names to buttons and input text fields so that they are identified appropriately by the screen reader.
  • Page 362 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 Accessibility panel and select the button and enter the desired name (for example, “left arrow”) and description (for example, “Go to previous page”) in the Name and Description text boxes, respectively.
  • Page 363 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 text, you must convert it to dynamic text.) Input text fields or buttons Enter a name for the object.
  • Page 364 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 ignores the object.
  • Page 365 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 names, with no spaces (for example, Control+A). Warning: Flash does not check that the ActionScript to code the keyboard shortcut has been created.
  • Page 366: Viewing And Creating Tab Order And Reading Order

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

    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 can create a custom tab order for the following objects: •...
  • Page 368: About Animation And Accessibility For The Visually Impaired

    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 enable the Show Tab Order option.
  • Page 369: Using Accessible Components

    Using accessible components To accelerate building accessible applications, Macromedia has built a core set of UI components. These components automate many of the most common accessibility practices related to labeling, keyboard access, and testing and help ensure a consistent user experience across rich applications.
  • Page 370 For properties that apply to a specific object, you can use the syntax instancename._accProps The value of is an object that can include any of the following properties: _accProps Property Type Equivalent selection in the Applies to Accessibility panel Boolean Make Movie Accessible/Make Entire documents silent...
  • Page 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 , which returns a value of if a screen Accessibility.isActive() true reader is present, and otherwise.
  • Page 372: Accessibility For Hearing-Impaired Users

    SE for use with Flash. The white paper titled Captioning Multimedia with Hi-Caption SE for Use with Macromedia Flash MX explains how to use Hi-Caption SE and Flash together to create an a captioned document. The white paper is available on the Macromedia website on the Accessibility White Papers page at www.macromedia.com/macromedia/accessibility/...
  • Page 373: Testing Accessible Content

    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 screen reader enabled. Make sure that the screen reader is not attempting to “talk over”...
  • Page 374 Chapter 17: Creating Accessible Content...
  • Page 375: Chapter 18: Printing From Swf Files

    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...
  • Page 376: Controlling Printing

    Supported printers With Flash Player, you can print to PostScript and non-PostScript printers. For a list of supported Flash Player printing platforms, see the “Macromedia Flash Player Web Printing FAQ” on the Macromedia website (www.macromedia.com/software/flash/open/webprinting/faq.html). Using the ActionScript PrintJob class...
  • Page 377 Because you are spooling a print job to the user’s operating system between your calls to , and because the PrintJob functions might PrintJob.start() PrintJob.send() temporarily affect the Flash Player internal view of onscreen Flash content, you should implement print-specific activities only between your calls to PrintJob.start() PrintJob.send() For example, the Flash content should not interact with the user between...
  • Page 378: Starting A Print Job

    Starting a print job Calling the method prompts Flash Player to spool the print job to the user’s PrintJob.start() operating system and also prompts the user’s operating system print dialog box to appear. If the user selects an option in the print dialog box to begin printing, the PrintJob.start( method returns a value of .
  • Page 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 as the print job requires.
  • Page 380 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 pixels equals one inch; on paper, 72 points equals one inch.) To understand how Flash screen content maps to the printed page, it helps to understand screen and print units of measure.
  • Page 381: Printing Frames Independent Of The Printjob Class

    Sending the print job to the printer To send the print job to the printer after using the calls, use the addPage() PrintJob.send() method, which causes Flash Player to stop spooling the print job so that the printer starts printing. Deleting the print job After sending the print job to a printer, use the ActionScript function delete PrintJob()
  • Page 382 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 all shapes, symbols, bitmaps, text blocks, and text fields.
  • Page 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 function parameters, see in Flash ActionScript print() print() Language Reference.
  • Page 384: Changing The Printed Background Color

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

    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 menu’s Print command cannot print transparency or color effects and cannot print frames from other movie clips;...
  • Page 386 Chapter 18: Printing from SWF Files...
  • Page 387: Chapter 19: Creating E-Learning Content

    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 browser can use the instructional content you create.
  • Page 388: Getting Started With Flash Learning Interactions

    Extending learning interaction scripts ......... . 417 Getting started with Flash learning interactions Your e-learning courseware runs on any computer with Macromedia Flash Player 6 or later and a Flash-enabled web browser.
  • Page 389: Including A Flash Learning Interaction In A Document

    Including a Flash learning interaction in a document You can use either quiz templates or stand-alone interactions in your Flash documents: • The quiz templates are designed for scenarios in which interaction-based quizzes are required or tracking is necessary. The quiz learning interactions are graphically designed to fit into the quiz format.
  • Page 390 To create a quiz: Create a new file by selecting File > New. In the New from Template window, select the Templates tab. In the Category column, select Quiz; then in the Templates column, select one of the quiz styles. Setting the quiz parameters After you create a new file and select one of the quiz templates, the next step is to set the quiz parameters.
  • Page 391 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 be legible, drag a corner of the panel to enlarge it.
  • Page 392 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. Select Show Results Page if you want to present quiz results to users after they have completed the quiz.
  • Page 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 that make up each interaction. When you add an interaction (movie clip) to the Stage, you must break it apart to edit the individual objects.
  • Page 394 In the Property inspector, click Launch Component Inspector. If the Flash application will send tracking information to a server-side LMS, specify a name for the interaction in the Interaction ID text box. You should uniquely name each interaction in the quiz as specified by your LMS. Each interaction in the quiz templates is uniquely named. However, if you add interactions from the library or you are not using the quiz template, make sure to uniquely name each interaction in your file.
  • Page 395 (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 learning interactions to the Interactions layer. To add an interaction to the Timeline when using a quiz template: In the first layer of the Timeline, select the frame that precedes the frame number in which you want to add the interaction.
  • Page 396 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, sequential frames (for example, 10 questions in 10 sequential frames), or labeled frames.
  • Page 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 the library of the Flash document you are creating. For example, if you copy a Hot Object learning interaction from the Learning Interactions common library to your document, the symbols in the following illustration become part of the document library.
  • Page 398: Changing The Appearance Of A Learning Interaction

    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: •...
  • Page 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 learning interaction scripts use the internal features of the UI components to function properly.
  • Page 400: Testing A Quiz

    Testing a quiz It is important to test a quiz frequently as you add and remove interactions. To test a quiz: Select Control > Test Movie. The quiz appears in the Flash Player window. Answer the questions as they appear. When you complete the quiz, close it in the Flash Player window to return to the workspace in which you edit the document.
  • Page 401 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 Name column, you need to enter a corresponding Target instance name in the Matches Target Name column.
  • Page 402 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: If you are not using a quiz template, place the learning interaction on the Stage.
  • Page 403 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 Match deselected, an answer is considered correct if it contains the correct word. For example, if the answer is zebra and the user enters striped zebra, the answer is considered correct.
  • Page 404 Adding and removing hot object distractors You can change the default number of six distractors (choices) by adding more distractors or deleting existing distrators. You can include from one to eight hot object distractors in a Hot Object learning interaction. To add a hot object distractor: Create a movie clip symbol containing the graphics for the hot object distractor.
  • Page 405 To configure a Hot Spot interaction: If you are not using a quiz template, place the learning interaction on the Stage. If you are using a quiz template, select the frame on the Interactions layer that contains the Hot Spot interaction (Frame 5, if you have not added or removed keyframes).
  • Page 406 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: If you are not using a quiz template, place the learning interaction on the Stage. If you are using a quiz template, select the frame on the Interactions layer that contains the Multiple Choice interaction (Frame 6, if you have not added or removed keyframes).
  • Page 407: Adding, Naming, And Registering Assets

    Configuring a True or False interaction In a True or False interaction, the user responds with an answer of either True or False. To configure a True or False interaction: If you are not using a quiz template, place the learning interaction on the Stage. If you are using a quiz template, select the frame on the Interactions layer that contains the True or False interaction (Frame 7, if you have not added or removed keyframes).
  • Page 408 • 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. About naming Learning Interaction component instances Every interaction has an interaction component associated with it to configure its unique parameters.
  • Page 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 four Drag objects, each of the eight Drag objects in the file must be named uniquely.
  • Page 410 Asset Description Object type Instance name Reset button Resets Drag objects Flash UI Button Template_ResetButton component 1-8 Drag objects Drag object distractors Movie clip symbol Drag1 – Drag8 1-8 Target objects Targets for Drag Movie clip symbol Target1 – Target8 objects Fill in the Blank learning interaction asset names Asset...
  • Page 411: Setting Feedback Options For A Learning Interaction

    Multiple Choice learning interaction asset names Asset Description Object type Instance name Question text field Holds question text Dynamic text field Template_Question Feedback text field Holds feedback text Dynamic text field Template_Feedback Control button Submits user response Flash UI Button Template_ControlButton and controls navigation component...
  • Page 412: Setting Knowledge Track Options For A Learning Interaction

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

    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 value. If all learning interactions have a weight of 1, they are all scored equally.
  • Page 414: Setting Control Button Labels For A Learning Interaction

    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 a Reset button. You can change the label for the instance of each button using the Component Inspector.
  • Page 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 overview When a student takes an AICC-compliant quiz, the following events occur: The LMS is opened.
  • Page 416 Preparing Flash learning interactions for web hosting In order for web users to see your Flash application, you need to embed it into a web page. The steps to prepare AICC- and SCORM-compliant files for web hosting are slightly different and are covered in the following two sections.
  • Page 417: Extending Learning Interaction Scripts

    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 quiz and publish the learning interaction using the Flash with SCORM Tracking template.
  • Page 418 • When the Timeline moves to the third interaction, that interaction’s component creates an instance of in index2 of the SessionArray. It continues with index3, LToolBox global class index4, and so on, until all interactions are in an index. • At the end of a series of interactions, all the data processed during those interactions are available and organized.
  • Page 419 All the methods and properties of the global class are available within each LToolBox 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 more information to complete the picture.
  • Page 420 Chapter 19: Creating E-learning Content...
  • Page 421: Appendix A: Using Samples And Templates

    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.
  • Page 422 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, multiple behaviors are combined to create an interactive scrapbook.
  • Page 423 Building a news reader (Flash Professional only) This sample provides an interface to read the latest news at DevNet on www.macromedia.com. The addition of the data binding user interface in Flash MX Professional 2004 lets users build interfaces that connect to, retrieve, and display remote data without writing any code.
  • Page 424: Using 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)” on page 425 •...
  • Page 425 Internet advertising experience. Visit the MFAA and participate in the ongoing discussion at the Macromedia Flash Advertising Alliance website at www.mfaa.org. Using video templates (Flash Professional only) This section covers creating Flash content using video and includes instructions on using the video templates.
  • Page 426 property of the radio buttons is set to a string that is appended to a base string to data 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 change the base string, open the Actions panel and select Frame 1 of the Actions layer of the Select screen.
  • Page 427 JPEGs typically work best for photographs. For best results, save your photos as JPEGs using an image-editing program such as Macromedia Fireworks. Each image should have a size of 640 x 480 pixels and should be named in a numbered sequence. For example, for three files, the names could be photo1.jpg, photo2.jpg, and photo3.jpg.
  • Page 428 Using autoplay mode with the Photo Slideshow template The Photo Slideshow template also has a built-in autoplay mode that automatically changes the photo after a set delay. The template is set to a default delay time of 4 seconds, but you can change this setting easily.
  • Page 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 change the background color.
  • Page 430 Note: The skins are on guide layers and won’t export with your content or appear at runtime. For more information on authoring Flash files for mobile devices, see the Macromedia Mobile Devices site at www.macromedia.com/devnet/devices/.
  • Page 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 only)” on page 432 Query-Error-Response template (Flash Professional only) The Query-Error-Response template helps you create applications that perform a simple query to a remote data source, and then, depending on the outcome, display the results in a response form...
  • Page 432 To customize the Response form: Select the Response form in the Screen Outline pane. Use components to create fields that will show the results. For example, if your service is a weather service that returns temperature, you could use a label component to create a non-editable text display.
  • Page 433 To modify window content: 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 Using Components. After altering the contents of a form, make sure that the window component that will load the form is sized properly, so your form’s content won’t appear clipped at runtime.
  • Page 434 Appendix A: Using Samples and Templates...
  • Page 435: Appendix Bxml To Ui

    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 XML to UI engine works with each of these extensibility features to create dialog boxes that the user sees if the extension either requires or accepts parameters.
  • Page 436: Control Tag Summary For Xml To Ui Dialog Boxes

    Description Creates a transparent fill space used to arrange controls. <spacer> Creates a container for items laid out vertically. <vbox> Control tag summary for XML to UI dialog boxes The following XML tags are used to create controls: Description Creates a button control. <button>...
  • Page 437: Columns

    Attributes None. Child tags Control tags. Parent tag <columns> Description Layout tag; creates one column in a tabular grid layout. The column tag must be within a tag, which must be within a tag. <columns> <grid> Example See the example for <grid>...
  • Page 438: Dialog

    <dialog> Availability Flash MX 2004. Usage <dialog id = "myID" title="yourTitle" buttons="accept[, cancel]"> child tags </dialog> Attributes String; represents a unique identification string that is used by the extensibility features to identify the dialog box and access the values it returns. String;...
  • Page 439: Hbox

    Child tags <columns> <rows> Parent tag <dialog> Description Layout tag; creates a container for tabular layout using tags. <rows> <columns> Example The following example uses the <grid>, <columns> and <rows> tags to define a dialog box. To see how this dialog box works with a JavaScript API command, see the example for <menulist>...
  • Page 440: Row

    Parent tag <dialog> <hbox>,<vbox> Description Layout tag; creates a container for items laid out horizontally. All layout objects defined within <hbox> tags are arranged horizontally with respect to one another. By default, each layout object is evenly spaced, but this setting can be altered with the tag.
  • Page 441: Rows

    child tags </row> Attributes None. Child tags Control tags. Parent tag <rows> Description Layout tag; creates one row in a tabular grid layout. The row tag must be within a tag, <rows> which must be within a tag. <grid> Example The following example uses the <row>...
  • Page 442: Separator

    </rows> Attributes None. Child tags <row> Parent tag <grid> Description Layout tag; creates a container tag for the row tags in a tabular grid layout. The columns tag must be within a tag. <grid> Example The following example uses the <grid>, <columns> and <rows> tags to define a dialog box. To see how this dialog box works with a JavaScript API command, see the example for <menulist>...
  • Page 443 Child tags None. Parent tag <hbox> <vbox> Description Layout tag; creates a separator bar that displays vertically in an <hbox> and horizontally in a <vbox>. Example The following example adds a separator bar to the Labeled Frame Cuepoint Navigation behavior dialog box.
  • Page 444: Spacer

    <targetlist id="target" class="movieclip" /> <separator/> <checkbox id="stop" label="gotoAndStop? (vs gotoAndPlay)" checked="false" /> </vbox> </dialog> The modified tags produce the following dialog box: <spacer> Availability Flash MX 2004. Usage <spacer/> Attributes None. Child tags None. Parent tag <column> <hbox> <row> <vbox> Description Layout tag;...
  • Page 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.checkbox1); fl.trace("Checkbox 2: " + traceSelectionsDlg.checkbox2); fl.trace("Checkbox 3: "...
  • Page 446: Vbox

    <checkbox id="checkbox4" label="checkbox4"/> <checkbox id="checkbox5" label="checkbox5"/> </hbox> </vbox> </dialog> Adding the tag to the second row of check boxes pushes checkbox4 and checkbox5 to <spacer/> the right: <vbox> Availability Flash MX 2004. Usage <vbox> child tags </vbox> Attributes None. Child tags , control tags <hbox>...
  • Page 447: Button

    <label value="Skew y:" control="ySkew" align="left"/> <popupslider id="ySkew" minvalue="-180" maxvalue="180"/> </hbox> <hbox> <label value="Edge:" control="edge" align="left"/> <menulist id="edge"> <menupop> <menuitem label="top center"/> <menuitem label="right center"/> <menuitem label="bottom center"/> <menuitem label="left center"/> </menupop> </menulist> </hbox> </vbox> </dialog> The following figure shows the Skew Selection dialog box defined using tags <vbox>...
  • Page 448 Number; an integer used to set the control’s position in the tab order (available only tabindex on Windows). String; a character to be used for the keyboard shortcut for this control (available accesskey only on Windows). A JavaScript command that executes when the button is clicked. oncommand Child tags None.
  • Page 449: Checkbox

    </grid> </dialog> command now appears on the Commands menu. If you have a Flash document button open, you can select the command from the Commands menu and the dialog box button defined by button.xml appears. <checkbox> Availability Flash MX 2004. Usage <checkbox id=”myID”...
  • Page 450: Choosefile

    <label value="Select clip with labeled frames:" control="target"/> <targetlist id="target" class="movieclip" /> </hbox> <hbox> <checkbox id="stop" label="gotoAndStop? (vs gotoAndPlay)" checked="false" /> </hbox> </vbox> </dialog> <choosefile> Availability Flash MX 2004. Usage <choosefile id="myID" literal="true|false" pathtype="relative|absolute" required="true|false" size="mySize" tabindex="myIdx" type="open|save" value="myValue" width="myWidth"/> Attributes String;...
  • Page 451 Parent tag <dialog>, <hbox>, <row> <vbox> 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 in Commands menu.
  • Page 452: Colorchip

    <colorchip> Availability Flash MX 2004. Usage <colorchip id="myID" color="myColor"/> Attributes String; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. Number; hex number representing a color used as default value. color Child tags None.
  • Page 453: Flash

    <column/> </columns> <rows> <row align="left"> <label value="Set fill color: " control="fillColor" align="left"/> <colorchip id="fillColor" color="#000000"/> </row> <row align="left"> <label value="Set stroke color:" control="strokeColor" align="left"/> <colorchip id="strokeColor" color="#000000"/> </row> </rows> </grid> </dialog> command now appears on the Commands menu. If you have a Flash document setcolor open, draw a shape on the stage and select the command from the Commands menu.
  • Page 454: Label

    Child tags <property> Parent tag <dialog>, <hbox>, <row> <vbox> 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.
  • Page 455: Listbox

    Child tags None. Parent tag <dialog>, <hbox>, <row> <vbox> Description Control tag; creates a text label that can be associated with another control. Example The following example is excerpted from the HideScreen.xml file, which defines the Hide Screen Behavior. <dialog id="SelectScreenDialog" title="Select Screen" buttons="accept, cancel">...
  • Page 456 Parent tag <dialog>, <hbox>, <row> <vbox> Description Control tag; creates a listbox control to contain tags. <listitem> Example The following example modifies the command example from so that it uses skew <popupslider> control instead of a control for the parameter to the JavaScript <listbox>...
  • Page 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: <dialog id="skewlist-dialog"...
  • Page 458: Listitem

    <listitem> Availability Flash MX 2004. Usage <listitem label="mylabel" value="myValue"/> Attributes String; text that appears in the listbox for that item. label String; text that is returned if the user selects the item. If not set, the value of the value label attribute is returned.
  • Page 459 Number; an integer used to set the control’s position in the tab order (available only tabindex on Windows). Child tags <menupop> Parent tag <dialog>, <hbox>, <row> <vbox> Description Control tag; creates a pop-up menu control that contains tags. <menupop> <menuitem> Example The following example uses the JavaScript API to create a new command...
  • Page 460: Menupop

    <radio label="Button"/> <radio label="Graphic"/> </radiogroup> </row> <row align="right"> <label value="Registration:" control="registration"/> <menulist id="registration"> <menupop> <menuitem label="top left"/> <menuitem label="top center"/> <menuitem label="top right"/> <menuitem label="center left"/> <menuitem label="center"/> <menuitem label="center right"/> <menuitem label="bottom left"/> <menuitem label="bottom center"/> <menuitem label="bottom right"/> </menupop>...
  • Page 461: Menuitem

    <menuitem/> </menupop> </menulist> Attributes None. Child tags <menuitem> Parent tag <menulist> Description Control tag; creates the pop-up menu of a pop-up menu control, and must contain at least one tag. <menuitem> Example The following example creates a pop-up menu control with eight elements. To see the XML definition of the entire dialog box, see the example for <menulist>...
  • Page 462: Popupslider

    Attributes String; text that appears in the pop-up menu for that item. label String; text that is returned if the user selects the item. If not set, the value of the value label attribute is returned. Child tags None. Parent tag <menupop>...
  • Page 463 Number; an integer that represents the control’s position in the tab order (available tabindex only on Windows). Number; an integer that represents the minimum value. minvalue Number; an integer that represents the maximum value. maxvalue Child tags None. Parent tag <dialog>, <hbox>, <row>...
  • Page 464 inputIsValid = false; if (ySkew == 0 || 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 your Commands folder. Place the following code into the file and save the file: <dialog id="skew-dialog"...
  • Page 465: Property

    command now appears on the Commands menu. Draw a shape on the stage, then skew select it with the pointer tool. If you then select the command from the Commands menu, skew the dialog box defined by skew.xml appears, as shown in the following figure: <property>...
  • Page 466: Radio

    label = "myLabel" groupbox = "true|false"> <radio/> <radio/> </radiogroup> Attributes String; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. String; defines a string that appears above the group of radio buttons. label Boolean value;...
  • Page 467: Targetlist

    String; a character to be used for the keyboard shortcut for this control (available accesskey only on Windows). Child tags None. Parent tag <radiogroup> Description Control tag; creates a single radio button control. This tag must be used within a <radiogroup>...
  • Page 468: Textbox

    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 clip into which a graphic will be loaded. For the complete dialog box definition, see the Graphic_load_graphic.xml file in the Behaviors folder.
  • Page 469 Attributes String; represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns. Boolean value; if the value that is returned from this control is enclosed by literal true, quotation marks ("").
  • Page 470 // check for valid input because sending 0 or undefined to // scaleSelection() will cause the object to disappear. var inputIsValid = true; if (xScale == 0 || isNaN(xScale)) { inputIsValid = false; if (yScale == 0 || isNaN(yScale)) { inputIsValid = false;...
  • Page 471: Index

    Add Shape Hint command 171 instance names and 360 Adobe Illustrator files keyboard navigation for 373 exporting 347 Macromedia Flash Accessibility web page 357 importing 136 for movie clip children 363 Adobe Photoshop files naming buttons and text fields for 361...
  • Page 472 aligning shapes 169 objects 155 type 165 text blocks 113 anti-aliasing text characters 113 bitmaps 40 alignment, HTML (publish setting) 317 exported GIF 320 Alpha effect exported PNG 323 instance property 63 objects on Clipboard 148 partial transparency 321 shapes 40 ancestor screen, defined 218 text 40 anchor points...
  • Page 473 Load External Movie Clip 65 Bring Forward behavior 66 Load Graphic 65 Bring Forward command 149 screen navigation and control 228 Bring to Front behavior 66 screen transitions 229 Bring to Front command 149 Send Backward 66 Brush tool Send to Back 66 Lock Fill modifier 82 Start Dragging Movieclip 66 painting modes 96...
  • Page 474 color palette Commands menu Adaptive 321 creating and managing commands 38 default 83 Edit Command List option 38 importing and exporting 83 Get More Commands option 38 modifying 82 reusing commands 37 saving current as default 83 Run Command 38 web-safe 83 running commands 38 Color Picker, opening 76...
  • Page 475 Create Copy button, in Transform panel 148 devicefont parameter 335 createTextField method 125 dimensions creating default for document 13 new document 12 publishing Flash SWF file 316 passwords for debugging files 314 setting for document 13 cumulative tracking data, accessing in learning display, speeding up document 40 interactions 417 distorting objects 152, 153...
  • Page 476 saving as template 15 line segments, adjusting 94 saving Flash 14 lines, straight 89, 91 saving in Flash MX format 15 objects, snapping 101 saving when quitting 15 ovals and rectangles 89 screen hierarchy 217 overlapping shapes 88 size report, generating 43 Pen tool 90 slide presentation 217 Pencil tool 88...
  • Page 477 dynamic text export file formats 346 creating 108 Export for Runtime Sharing option 70 defined 105 Exporter, Flash Video 194 HTML formatting for 121 exporting HTML option 116 color palettes 83 rich text formatting for 121 FLV files from editing applications 192 setting options 115 images 345 dynamic text fields...
  • Page 478 locked gradient or bitmap, with 82 FLV files Paint Bucket tool, applying with 79 dynamically playing external 189 selecting default color 76 exporting 349 softening edges 100 exporting from editing applications 192 swapping color with stroke color 76 importing 349 text, for 112 folders transparent, applying 76...
  • Page 479 animation, in Timeline 163 gradient pointers 78 Bandwidth Profiler, testing performance with 42 graphic distractors, registering in a learning interaction converting keyframes into 172 copying and pasting 172 graphic object, converting to a symbol 19 copying by dragging 172 graphic symbols displaying as onion skin outlines 173 about 54 dragging in Timeline 172...
  • Page 480 publish settings 315 instance names publishing templates 329 and accessible objects 360 tag reference 334 for screens 231 templates 330 Instance Properties dialog box 62 HTML Alignment publish setting 317 instances, symbol hyperlinks, viewing in Flash Player 39 behavior, changing 64 behaviors 65 breaking apart 155 color and transparency, changing 63...
  • Page 481 images, extending 164 libraries inserting 172 assets, resolving conflicts between 72 motion tweening 168 common 21 removing 172 components in 17 selecting everything between two 145 creating permanent 21 shape tweening 169 included in Flash 21 Sorenson Spark codec, for 179 opening from other Flash files 18 sounds, associating with 208 resolving conflicts between assets 72...
  • Page 482 165 Macromedia Authorware, playing a Flash SWF file in along a path 168 Create Motion Tween command 167 Macromedia Director, playing a Flash SWF file in 310 linking layers to a motion path 169 Macromedia Fireworks Motion Tweening option 166...
  • Page 483 Movie Explorer about 28 objects context menu 29 accessibility options, defining 362 displaying symbol definition 68 aligning 155 filtering displayed items in 28 bringing forward 149 Find text box 28 bringing to front 149 instance information 67 copying 148 instances in 67 copying when transforming 148 options menu 29 cutting 149...
  • Page 484 optimizing paths curves 99 adjusting anchor points in 94 documents 40 tweening along 168 GIF colors 320 Pen tool PNG colors 323 adjusting anchor points with 94 Orient to Path option, for motion tweening 166, 167 corner points 93 Outlines command 40 curve points 93 Oval tool 89 drawing curved paths 92...
  • Page 485 printers, supported 376 sound properties 203 printing Stroke and Fill Color controls in 76 from authoring environment 43 tools 87 FLA files 43 video, changing properties 190 Flash Player context menu 385 Protect from Import option 313 PrintJob Publish command 311 addPage method 378 Publish Preview command 342 object and class 375...
  • Page 486 Recognize Lines preference 103 Ruler Units menu 13 Recognize Shapes preference 103 running commands with Run Command 38 Rectangle tool about 89 Round Rectangle modifier 89 salign parameter 339 Redo command 34 SALIGN parameter publish settings 318 redoing steps with the History panel 35 Sample Rate registering images from frame to frame 173 for ADPCM sound compression 210...
  • Page 487 schemas contents, editing 227 adding a component property 262 context menu 220 adding a schema field 263 copying or cutting 227 data type 298 default screen and instance names 222 editing schema item settings 300 deleting 228 editing the schema item settings 300 document structure and hierarchy 217, 219 encoder 294 document types 217...
  • Page 488 width and height, viewing 223 reshaping with the Selection tool 97 workflow 216 rotating 153 x and y coordinates 223 scaling 153 scrolling text 110, 128 selecting 144 Seconds button, in Edit Envelope 206 skewing 154 Select Screen dialog box 228 snapping 101 Selectable option Shareable Content Object Reference Model.
  • Page 489 snapping Special instance color property 63 to objects 101 spell checking to pixels 101 about 117 tolerance, setting for objects 103 setup 118 Soften Fill Edges command 100 using 118 Sound Designer II files, importing 202 src attribute 335 Sound object, using a sound with 205 stacking objects 149 Sound Properties dialog box 209 Stage size 13...
  • Page 490 Property inspector, selecting with 77 locking 145 Selection tool, selecting with 144 movie clip 54 swapping color with fill color 76 swapping 64 transparent, applying 76 symbol-editing mode 62 weight, selecting 77 tweening colors 165 strokes, selecting types 54 default color 76 unlinking from instance 67 line style 77 viewing definition 68...
  • Page 491 Test Scene command 42, 60 text fields 105 testing transforming 119 accessible content 373 translating in Strings panel 246 Generate Size Report option 43 Unicode in Flash Player 237 projects 47 URL, linking to 120 sounds 210 widening text block 110 text text blocks aliasing 111...
  • Page 492 in movie clips 22 pointers 151 multiple Timelines 22 transforming onion skinning frames 173 objects 148 parent alias 25 text 119 for screens 231 transitions target paths 23 motion tweening 165 target paths, absolute 24 for screens 229 target paths, relative 25 transparency Timeline effects adjusting separate color values 63...
  • Page 493 in and out points 183 Video Import wizard Variable option for dynamic text 116 advanced settings 181 variables, HTML template 331 compression profiles 181 vector graphics editing video clips 181 compared to bitmaps 85 importing embedded video 181, 182 creating from imported bitmap images 142 View menu, changing document display with 40 importing with Clipboard 148 visible parameter, for form screen 225...
  • Page 494 Index...

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents