MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Use Manual

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

Advertisement

Quick Links

DIRECTOR
MX
Using Director

Advertisement

Table of Contents
loading

Summary of Contents for MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR

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

    CONTENTS CHAPTER 1: Introduction ..........11 About Director .
  • Page 4 CHAPTER 3: Sprites ..........51 Creating sprites .
  • Page 5 Compressing bitmaps ..........129 Working with Macromedia Fireworks ....... . . 131 CHAPTER 6: Vector Shapes .
  • Page 6 CHAPTER 9: Using Flash, Flash Components, and Other Interactive Media Types ........181 Using Flash Content .
  • Page 7 CHAPTER 11: Using Digital Video ........243 About digital video formats .
  • Page 8 CHAPTER 14: 3D Basics ......... . 303 What you need to know .
  • Page 9 CHAPTER 17: Controlling the 3D World ....... 393 3D Lingo or JavaScript syntax events........393 Collisions .
  • Page 10 CHAPTER 23: Packaging Movies for Distribution ..... . . 447 About distributing movies ......... . 447 Shockwave browser compatibility .
  • Page 11: Chapter 1 Introduction

    CHAPTER 1 Introduction Welcome to Macromedia Director MX 2004. With Director, you can develop high-performance multimedia content and applications for CDs, DVDs, kiosks, and the Internet. This guide, Using Director, includes comprehensive descriptions and detailed step-by-step instructions that explain how to use all of the features in Director.
  • Page 12: What's New In Director Mx 2004

    Macromedia Studio MX 2004 products, such as Macromedia Flash MX 2004 and Macromedia Fireworks MX 2004, then the Director interface is already familiar to you. In addition to a common interface, you can now start and edit other Macromedia Studio MX 2004 files from directly within Director.
  • Page 13: Guide To Instructional Media

    Integrating with Macromedia server technologies You can now choose to integrate Director with Macromedia server technologies, such as Macromedia ColdFusion MX 6.1 and Macromedia Flash Communication Server MX. For multi-user games, distance learning content, and other server-controlled content, this link between your Director content and IT infrastructure extends your interactivity options.
  • Page 14 Using Director This manual is available in printable PDF format from the Director Documentation Center at www.macromedia.com/go/director_docs. It explains how to use all of the features and functionality offered in Director. Information in the manual is also available in the online Director Help.
  • Page 15 Director Help. Creating Your First 3D Movie in Director This tutorial is available in printable PDF format from the 3D tutorial page on the Macromedia website at www.macromedia.com/go/ drmx2004_3d_tutorial_en. It takes you step by step through creating a simple 3D movie.
  • Page 16 Chapter 1: Introduction...
  • Page 17: Chapter 2: Score, Stage, And Cast

    CHAPTER 2 Score, Stage, and Cast If you are new to Macromedia Director MX 2004, see the Getting Started topics in the Director Help Panel to become familiar with the Director workspace and features. (In Macromedia Director MX 2004, select Help > Director Help to view the Getting Started topics.) These topics...
  • Page 18: Setting Stage Properties

    To change Tool palette views: If the Tool palette is not already available, select Window > Tool Palette. The default Tool palette appears. Click on the Tool palette view menu and select the view you want: classic, flashcomponent, or default. The Tool palette changes to display the tools available for each view.
  • Page 19: Using Multiple Score Windows

    To create and set guide properties: With the Property inspector open, click the Guides tab. The top half of the tab contains settings for Guides. Click the Guide Color box to select a different color. Select the options you want to make the guides visible, lock them, or to make the sprites snap to the guides.
  • Page 20: Changing Score Settings

    Changing Score settings To control the appearance of the Score and the information that appears in numbered sprite channels, you set preferences for the Score. By doing so, you can display a script preview and cast member information. To change Score settings: Select Edit >...
  • Page 21: Selecting And Editing Frames In The Score

    Selecting and editing frames in the Score You can select a range of frames in the Score and then copy, delete, or paste all the contents of the selected frames. To move, copy, or delete all the contents of a range of frames: Double-click in the frame channel to select frames.
  • Page 22: About Cast Members

    Macromedia Flash content or components, DVD content, QuickTime movies, Windows Media video or audio, Macromedia Shockwave 3D content, Rich Text, sounds of various formats, and more. When you place a cast member on the Stage or in the Score, you create a sprite.
  • Page 23: Creating New Casts

    Casts can be internal—stored inside the movie file and exclusive to that movie—or external— stored outside the movie file and available for sharing with other movies. When you create a new movie, an empty internal cast is created automatically, and when you open the Cast window it is in the default List view.
  • Page 24: Creating Cast Members

    To create a new cast: Do one of the following: Select File > New > Cast. Select Modify > Movie > Casts to open the Movie Casts dialog box, and click the New button. In the Cast window, click the Cast button and select New Cast from the pop-up menu. (See “Using Cast window controls”...
  • Page 25 To create a new cast member from the Insert menu: Open the Cast window for the cast member you are creating. To place a cast member in a specific position in the Cast window, select the position in Thumbnail view. For more information, see “Using Cast Thumbnail view”...
  • Page 26: Using The Cast Window

    To create a cast member using the Script window: Open the Script window by selecting Window > Script. Click the New Cast Member button to create a script cast member. To create a cast member on the Stage: Open the Tool palette, if it is not already open, by selecting Window > Tool Palette. Using the tools in the Tool palette, create content directly on the Stage.
  • Page 27 Working with Cast panel groups Each Cast panel and panel group has an Options menu located in its upper right corner. The Options menu contains items for grouping, closing, and renaming panels. To use a Cast panel Options menu: • Click the Options menu control in the upper right of the panel, and select the desired menu item.
  • Page 28 To rearrange the order of tabs within a Cast panel group: Select a tab within the Cast panel group. Select Group [Panel Name] With from the panel group’s Options menu, then choose the name of the Cast panel group that contains the selected panel. The tab is moved to the last (rightmost) position in the panel group.
  • Page 29 Using Cast window controls The controls along the top of the Cast window are the same in both the List and Thumbnail views. You use the controls to change the cast that appears in the Cast window, the cast member selection, or the name of a cast member.
  • Page 30 To view cast member properties: Select a cast member. Do one of the following: Click the Cast Member Properties button. Right-click (Windows) or Control-click (Macintosh), and select Cast Member Properties from the context menu. Select Window > Property Inspector. The Property inspector displays only those properties associated with the selected cast member.
  • Page 31: Naming Cast Members

    Naming cast members To avoid problems in Lingo or JavaScript syntax when referring to cast members, you should name them and then refer to them by name. Naming cast members doesn’t affect Director performance. The name stays the same even if the cast member number changes. Avoid duplicating cast member names.
  • Page 32 Four additional columns are available in the Cast Window Preferences dialog box. For more information, see “Setting Cast window preferences” on page 36. The additional columns that you can display are described in the following table: Column Title Column Information Size The size in bytes, kilobytes, or megabytes Created...
  • Page 33: Using Cast Thumbnail View

    Using Cast Thumbnail view As the name suggests, the Cast Thumbnail view shows a very small (thumbnail) version of the cast member, along with an icon that represents the cast member media type, as shown in the following table: Icon Cast member type Icon Cast member type...
  • Page 34 To turn off or on the display of cast member icons in Thumbnail view and change the Cast window display: • Select Edit > Preferences > Cast. For more information, see “Setting Cast window preferences” on page Note: If you are using a Macintosh OS X operating system, select the Director menu, instead of the Edit menu, to access Preferences.
  • Page 35: Moving Cast Members Within The Cast Window

    Moving cast members within the Cast window To move a cast member to a new position within the Cast window, you can use Thumbnail view to see the representation of the cast member’s position. Note: When you move a cast member to a new position, Director assigns it a new number and updates all references to the cast member in the Score, but it doesn’t automatically update references to cast member numbers in Lingo or JavaScript syntax.
  • Page 36: Setting Cast Window Preferences

    To sort the cast using the Modify menu: With the Cast window active, select the cast members to sort or select Edit > Select All. Select Modify > Sort. In the Sort Cast Members dialog box, select one of the following sorting methods: Usage in Score places selected cast members that are used in the Score at the beginning of the selection.
  • Page 37 To set the Cast window to display in either List or Thumbnail view, select the appropriate Cast View option. If you want your preferences to apply to all Cast windows, select Apply to All Casts. To select the columns that appear in Cast List view, select the desired List Columns options. “Using Cast List view”...
  • Page 38: Changing Cast Properties

    Changing Cast properties You use the Property inspector to change the name of a Cast and to define how its cast members are loaded into memory. To change Cast window properties: With the Cast window as the active window, open the Property inspector and click the Cast tab. To change the name of the current cast, enter the new name in the Name text box.
  • Page 39: Viewing And Setting Cast Member Properties

    For an Xtra cast member, the information displayed in the Property inspector is determined by the developer of the Xtra. Some Xtra extensions have options in addition to those listed here. For non-Macromedia Xtra extensions, refer to documentation supplied by the developer. Viewing and setting cast member properties...
  • Page 40: Finding Cast Members

    For information about specific cast member properties, see the following topics: • “Using animated GIFs” on page 101” • “Embedding fonts in movies” on page 164 • “Using Flash Content” on page 181 • “Setting bitmap cast member properties” on page 128 •...
  • Page 41 To find cast members: Select Edit > Find > Cast Member. In the Find Cast Member dialog box, select a Cast window to search from the Cast pop-up menu. To search every cast in the movie, select All Casts. Select a search option: Select Name, and enter search text in the text box.
  • Page 42: Importing Cast Members

    Importing cast members Importing lets you create cast members from external media. You can either import data into a Director movie file or create a link to the external file and re-import the file each time the movie opens. Linked files let you display dynamic media from the Internet, such as sports scores, sounds, and weather pictures, which makes downloading movies faster.
  • Page 43 From the Media pop-up menu at the bottom of the dialog box, select an option to specify how to treat imported media: Standard Import imports all selected files, storing them inside the movie file but not updating them when changes are made to the source material. If you selected the option to import from the Internet in step 3, Director retrieves the file immediately from the Internet if a connection is available.
  • Page 44 About import file formats Director can import files in all the formats listed in the following table. For information about additional file formats Director might support, see the Director Support Center website at www.macromedia.com/support/director. Type of file Supported formats Animation and...
  • Page 45 • To retrieve media from the Internet during playback, Director requires that the projector include certain Xtra extensions. To include these Xtra extensions automatically, click Add Network in the Movie Xtras dialog box. Movies playing in web browsers do not require these Xtra extensions.
  • Page 46: Launching External Editors

    Launching external editors You can specify external applications to edit many types of media. All the types of media for which you can define an external editor are listed in the Editors Preferences dialog box. After you set up an external editor for a particular media type, Director starts the application when you edit a cast member of that type.
  • Page 47: Managing External Casts

    Edit the cast member. If you change an image in the Paint window and then edit the image with an external editor, changes made in the Paint window, with the exception of registration points, are lost. Director warns you of this possibility. Save and close the file.
  • Page 48: Creating Libraries

    Click Create. The cast is created, and a Cast window for the cast appears in List view. For more information, “Using the Cast window” on page Select File > Save while the Cast window is active, and save the cast in the desired directory. To link an external cast to a movie: Select Modify >...
  • Page 49: Setting Cast Member Properties Using Lingo Or Javascript Syntax

    Options button. This button displays the Cast Member Properties dialog box for the current cast member. The content of the Properties dialog box is determined by the developer of the Xtra. For non-Macromedia Xtra extensions, refer to any documentation that the developer supplies. Setting Xtra cast member properties...
  • Page 50 To view or change Xtra cast member properties: Select an Xtra cast member. Open the Property inspector, and click the Member tab. The Member tab displays the following information about the member: The cast member name The name of the cast that contains the cast member The size in kilobytes The creation date The date the cast member was last modified...
  • Page 51: Chapter 3: Sprites

    CHAPTER 3 Sprites A sprite is an object that controls when, where, and how cast members appear in a Macromedia Director MX 2004 movie. Multiple sprites can use the same cast member. You can also switch cast members assigned to a sprite as the movie plays. You use the Stage to control where a sprite appears, and you use the Score to control when it appears in your movie.
  • Page 52: Creating Sprites

    Creating sprites You create a sprite by dragging a cast member to either the Stage or the Score: the sprite appears in both places. New sprites, by default, span 30 frames. To create a new sprite: Click to select the frame in the Score where you want the sprite to begin. From the Cast window, in either List or Thumbnail view, do one of the following: Drag a cast member to the position on the Stage where you want to place the sprite.
  • Page 53: Selecting Sprites

    Selecting sprites To edit or move a sprite, you must select it. You can select sprites, frames within sprites, and groups of sprites in several ways. You use the Arrow tool on the Tool palette to select sprites before most operations. You can also select sprites with the Rotate and Skew tool to enable rotation and skewing.
  • Page 54 • To select a contiguous range of sprites either on the Stage or in the Score, select a sprite at one end of the range and then Shift-click a sprite at the other end of the range. You can also drag to select all the sprites in an area.
  • Page 55: Naming Sprites

    Naming sprites You can assign a name to a sprite by using the Property inspector and then view the sprite by name in the Score and on the Stage. Assigning a name lets you refer to the sprite by that name in Lingo or JavaScript syntax and not just by the channel number that it occupies.
  • Page 56 To view a sprite in the Score by its name: In the Score, select the Sprite labels pop-up menu. Select Name. All the sprites in the score appear with their sprite name listed. To view a sprite on the Stage by its name: •...
  • Page 57: Finding Sprites

    Finding sprites You can search for and find sprites by name. When you have many sprites in a movie, searching for a sprite by name is easier and more efficient than searching by channel name or number. To find a sprite by name: Select Edit >...
  • Page 58: Layering Sprites

    To name a sprite channel: Double-click a channel in the Score sprite channel column. A text box appears. Type a name for the channel and press Enter. Layering sprites A sprite appears in front of other sprites on the Stage according to its channel. Sprites in higher- numbered channels appear in front of sprites in lower-numbered channels.
  • Page 59: Displaying And Editing Sprite Properties

    Displaying and editing sprite properties As you work with sprites in your movie, you’ll want to monitor and possibly modify sprite properties. Director offers several methods of accomplishing this by using one or more of the following: • The Property inspector •...
  • Page 60 Note: To open a window in which you can edit the sprite’s cast member, you can double-click the thumbnail image. Edit any of the following sprite settings in the Property inspector: Lock changes the sprite to a locked sprite so you or other users can’t change it. For additional information about locked sprites, see “Locking and unlocking sprites”...
  • Page 61 To show or hide the Sprite toolbar in the Score: • While the Score is active, select View > Sprite Toolbar. The Sprite toolbar is displayed across the top of the Score. Using the Sprite Overlay The Sprite Overlay displays important sprite properties directly on the Stage. You can open editors, inspectors, and dialog boxes to change sprite properties by clicking the corresponding icons in the Sprite Overlay.
  • Page 62 To change the opacity of the Sprite Overlay: • Drag up or down the small thin line that appears on the right edge of the Sprite Overlay. Displaying sprite labels in the Score Sprite labels appear in the Score’s sprite bars and display key information about the sprite in relation to the movie.
  • Page 63: Locking And Unlocking Sprites

    Behavior displays the behavior that is assigned to the sprite. Location displays the x and y coordinates of the sprite’s registration point. displays the ink effect that is applied to each sprite. Blend displays the blend percentage. Extended displays any combination of display options; select options by selecting Edit > Preferences >...
  • Page 64: Positioning Sprites

    To lock a sprite: In the Stage or the Score, select one or more sprites to lock, and do one of the following: • Select Modify > Lock Sprite. • On the Sprite tab of the Property inspector, click the padlock icon. •...
  • Page 65 The following diagram shows all the sprite coordinates you can specify. 0,0 Upper left corner of the Stage Registration point (X,Y) Bounding rectangle Left Right Height Bottom Width Director places the image of a cast member on the Stage by specifying the location of its registration point.
  • Page 66 Positioning sprites with the Property inspector You can use the Property inspector to specify the exact coordinates of a sprite. To set sprite coordinates in the Property inspector: With the Property inspector open and in Graphical view, select a sprite to reposition. On the Sprite tab in the Property inspector, specify the sprite coordinates in pixels, with 0,0 at the upper left corner of the Stage, as follows: Specify attributes in the X and Y text boxes to change the horizontal and vertical coordinates...
  • Page 67 To add a guide, move the cursor over the new horizontal or vertical guide, and then drag the guide to the Stage. Numbers in the guide tooltip indicate the distance, in pixels, the guide is located from the top or left edge of the Stage. To reposition a guide, move the pointer over the guide.
  • Page 68 Select alignment buttons to modify the selected objects: For Align, select Align Left Edge, Align Horizontal Center, Align Right Edge, Align Horizontal Registration Point, Align Top Edge, Align Vertical Center, Align Bottom Edge, or Align Vertical Registration Point. For Distribute, select Distribute Left Edge, Distribute Horizontal Center, Distribute Right Edge, Distribute Horizontal Registration Point, Distribute Width, Distribute Horizontally Across Stage, Distribute Top Edge, Distribute Vertical Center, Distribute Bottom Edge, Distribute Vertical Registration Point, Distribute Height, or Distribute Vertically...
  • Page 69 To determine whether two sprites overlap: • Use the operator to determine whether a sprite’s bounding rectangle sprite...intersects touches the bounding rectangle of a second sprite. Use the operator to sprite...within determine whether a sprite is entirely within a second sprite. For more information about these operators, see the Scripting Reference topics in the Director Help Panel.
  • Page 70 Changing the duration of a sprite on the Stage By default, Director assigns each new sprite a duration of 30 frames. You can change the duration of a sprite—that is, the amount of time the sprite appears in a movie—by adjusting its length, changing the number of frames in which it appears, or by using the Extend command.
  • Page 71: Changing The Appearance Of Sprites

    To split an existing sprite: In the Score, click the frame within a sprite where you want the split to occur. The playhead moves to the selected frame. Select Modify > Split Sprite. Director splits the sprite into two new ones. To join separate sprites into a single sprite: Select the sprites you want to join, as described in “Selecting sprites”...
  • Page 72 To resize a sprite by dragging its handles: Select the sprite. On the Stage, drag any of the sprite’s resize handles. Hold down Shift while dragging to maintain the sprite’s proportions. To scale a sprite by pixels or by an exact percentage: Select the sprite you want to scale and click the Sprite tab of the Property inspector (Graphical view).
  • Page 73 Director can rotate and skew bitmaps, text, vector shapes, Macromedia Flash content, QuickTime videos, and animated GIFs. Director rotates a sprite around its registration point, which is a marker that appears on a sprite when you select it with your mouse. By default, Director assigns a registration point in the center of all bitmaps.
  • Page 74 To rotate or skew a sprite with the Property inspector: Select the sprite you want to rotate or skew and click the Sprite tab in the Property inspector (List view). To rotate the selected sprite, display the Rotation pop-up menu and enter the number of degrees in the Rotation text box.
  • Page 75 Flipping sprites Flipping a sprite creates a horizontally or vertically inverted image of the original sprite. To flip a sprite: Select a sprite. Do any of the following: Click the Flip Vertical or Flip Horizontal button on the Sprite tab in the Property inspector to flip the sprite without moving the registration point or changing the current skew or rotation angles.
  • Page 76 To change the color of a sprite with Lingo or JavaScript syntax, set the appropriate sprite property: • sprite property sets the sprite’s foreground color. The value is an RGB value. color For more information about this property, see the Scripting Reference topics in the Director Help Panel.
  • Page 77: Using Sprite Inks

    Using sprite inks You can change a sprite’s appearance on the Stage by applying inks. Sprite inks change the display of a sprite’s colors. Inks are most useful to hide white bounding rectangles around images, but they can also create many compelling and useful color effects. Inks can reverse and alter colors, make sprites change colors depending on the background, and create masks that obscure or reveal portions of a background.
  • Page 78 Black areas of a mask cast member make the sprite completely opaque in those areas, and white areas make it completely transparent (invisible). Colors between black and white are more or less transparent; darker colors are more opaque. When creating a bitmap mask for a sprite, use a grayscale palette if the mask cast member is an 8-bit (or less) image.
  • Page 79 Ink definitions The following definitions describe all available ink types. Copy displays all the original colors in a sprite. All colors, including white, are opaque unless the image contains alpha channel effects (transparency). Copy is the default ink and is useful for backgrounds or for sprites that don’t appear in front of other artwork.
  • Page 80: Assigning A Cast Member To A Sprite With Lingo Or Javascript Syntax

    Subtract subtracts the RGB color value of the foreground sprite’s color from the RGB value of the background sprite’s color to determine the new color. If the color value of the new color is less than 0, Director adds 256 so the remaining value is between 0 and 255. Subtract Pin subtracts the RGB color value of pixels in the foreground sprite from the value of the background sprite.
  • Page 81: Exchanging Cast Members

    Exchanging cast members The Exchange Cast Members command changes the cast member associated with a particular sprite to the currently selected cast member; that is, it replaces the member reference for the selected sprite with the member reference of the selected cast member. This command modifies the selected sprites in the score;...
  • Page 82 Chapter 3: Sprites...
  • Page 83: Chapter 4 Animation

    Animation is the appearance of an image changing over time. The most common types of animation in Macromedia Director MX 2004 involve moving a sprite on the Stage (tweening animation) and using a series of cast members in the same sprite (frame-by-frame animation).
  • Page 84: Tweening The Path Of A Sprite

    To open the Sprite Tweening dialog box: • Select a sprite, then select Modify > Sprite > Tweening. A keyframe usually indicates a change in sprite properties. Properties that can be tweened are position, size, rotation, skew, blend, and foreground and background color. Each keyframe defines a value for all of these properties, even if you only explicitly define one.
  • Page 85: Accelerating And Decelerating Sprites

    Insert keyframes in any additional frames where you want the sprite’s animation path to change. Drag the red handle within the sprite to the place on the Stage where you want the sprite’s path to end. The red handle represents the sprite’s location in the end frame. For bitmaps, the red handle is usually in the center of the image.
  • Page 86: Tweening Other Sprite Properties

    Tweening size works best for vector-based cast members created in the Vector Shape window or in Macromedia Flash MX 2004 (bitmaps can become distorted when resized). Director can tween all of these properties at once.
  • Page 87: Suggestions And Shortcuts For Tweening

    To define the beginning property settings, click the Sprite tab of the Property inspector and do any of the following: To make the sprite fade in or out, enter a blend setting in the Property inspector (in List view). Enter 0 to make the sprite fade in or 100 to make it fade out. For more information, “Setting blends”...
  • Page 88: Changing Tweening Settings

    Changing tweening settings To change tweening properties for sprites, you use the Sprite Tweening dialog box. You can turn tweening on and off for certain properties and control the curve of a tweening path and the way the speed changes as a sprite moves. For information about creating tweened animation, see “Tweening the path of a sprite”...
  • Page 89: Switching A Sprite's Cast Members

    Switching a sprite’s cast members To show different content while maintaining all other sprite properties, you exchange the cast member assigned to a sprite. This technique is useful when you have tweened a sprite and you decide to use a different cast member. When you exchange the cast member, the tweening path stays the same.
  • Page 90: Frame-By-Frame Animation

    When Edit Sprite Frames is turned on for a certain sprite, clicking the sprite selects a single frame. Any change you make to a tweenable property, such as moving a sprite on the Stage, defines a new keyframe. To use Edit Sprite Frames, do one of the following: •...
  • Page 91 To animate a sprite with multiple cast members: Create a sprite by placing the first cast member in the animation on the Stage in the appropriate frame. Change the length of the sprite as needed. Drag the start or end frame in the Score, or enter a new start or end frame number in the Sprite Inspector.
  • Page 92: Shortcuts For Animating With Multiple Cast Members

    Shortcuts for animating with multiple cast members The Cast to Time and Space to Time commands are both useful shortcuts for animating with multiple cast members. Using the Cast to Time command To move a series of cast members to the Score as a single sprite, you use the Cast to Time command (Modify >...
  • Page 93 Using the Space to Time command To move sprites from adjacent channels to a single sprite, you use the Space to Time command (Modify > Space to Time). This method is convenient when you want to arrange several images on the Stage in one frame and then convert them to a single sprite. Arrange sprites on the Stage in a single frame.
  • Page 94: Using Film Loops

    Using film loops A film loop is an animated sequence that you can use like a single cast member. For example, to create an animation of a bird flying across the Stage, you can create a film loop of the sequence of cast members that shows the bird flapping its wings.
  • Page 95: Setting Film Loop Properties

    Director provides three other ways of incorporating a completed animation into a movie as a discrete element: you can export it as a digital video (QuickTime or AVI) or a DIB file (BMP), save and import it as a linked Director movie, or play it in a window in another Director movie. Note: If you need to edit a film loop and you have deleted the original Score data that it was based on, it is possible to restore the Score data for editing.
  • Page 96: Step-Recording Animation

    Step-recording animation Step recording is a process of animating one frame at time. You record the position of a sprite in a frame, step forward to the next frame, move the sprite to its new position, step forward to the next frame, and so on until you have completed the animation.
  • Page 97: Linking A Sequence With Paste Relative

    To use real-time recording: Select one or more sprites on the Stage or in the Score. Recording begins at the playhead. It is best to select a sprite in a channel that contains no other sprites later in the movie. To record in a specific range of frames, select the frames, and then click the Selected Frames Only button in the Control panel.
  • Page 98 Chapter 4: Animation...
  • Page 99: Chapter 5 Bitmaps

    CHAPTER 5 Bitmaps Bitmaps and vector shapes are the two main types of graphics used with Macromedia Director MX 2004. A bitmap defines an image as a grid of colored pixels, and it stores the color for each pixel in the image. A vector shape is a mathematical description of a geometric form that includes the thickness of the line, the fill color, and additional features of the line that can be expressed mathematically.
  • Page 100: About Importing Bitmaps

    Director takes advantage of compressed JPEG data at runtime. The original compressed data bits are saved in Macromedia Shockwave content or a projector (if the Shockwave compression option is on). If you edit the member within Director in the Paint window, the compressed data is lost.
  • Page 101: Using Animated Gifs

    Using animated GIFs You can import an animated GIF into Director with File > Import, similar to the way in which you import any other bitmap cast member. The only difference is that when the Select Format dialog box appears, you select Animated GIF. Director supports both the GIF89a and GIF87 formats.
  • Page 102: Using The Paint Window

    Using the Paint window The Paint window has a complete set of paint tools and inks for creating and changing bitmap cast members for movies. Anything you draw in the Paint window becomes a cast member. When you make a change to a cast member in the Paint window, the image in the Cast window is instantly updated—as is the cast member wherever it appears on the Stage.
  • Page 103 To erase, do one of the following: • Click and drag the Eraser tool to erase pixels. • Double-click the Eraser tool to erase the cast member. To move the view of the Paint window, do one of the following: •...
  • Page 104 To brush strokes of the foreground color: • Click the Brush tool, and drag it in the Paint window. To constrain the stroke to horizontal or vertical, Shift-click and drag. To select a new brush type: • Click the Brush tool, and hold down the mouse button to select a new brush type from the pop-up menu.
  • Page 105 To select a pattern for the foreground color, do one of the following: • To change the pattern palette, select Pattern Settings at the bottom of the Patterns pop-up menu. Patterns • To define a tile—a pattern that is based on a rectangular section of an existing cast member— select Tile Settings from the Patterns pop-up menu.
  • Page 106 Using the Lasso tool You use the Lasso tool to select irregular areas or polygons. After you select artwork, it can be dragged, cut, copied, cleared, or modified with the effects on the Paint toolbar. The Lasso tool selects only those pixels of a color that are different from the color the Lasso tool was on when you first started dragging it.
  • Page 107 To change marquee settings: • Click the Marquee tool, hold down the mouse button, and select from the following options: Shrink causes the rectangle to shrink around the selected artwork. No Shrink lets you select everything within the marquee. Lasso tightens the marquee around the object in the same way as the Lasso tool and selects the pixels according to the color of the pixel beneath the cross hair when you started the drag.
  • Page 108 To change brush settings: Click the Brush tool, and hold down the mouse button. Select the menu item for which you want to define settings. Open the menu again, and select Settings from the Brush pop-up menu. Enter values for the options in the Brush Settings dialog box.
  • Page 109: Changing Selected Areas Of A Bitmap

    • Control-click (Windows) or Command-click (Macintosh) the image to zoom in on a particular place. To return to normal view, do one of the following: • Click the normal-sized image in the upper right corner. • Select View > Zoom > 100%. Changing selected areas of a bitmap After you select part of an image in the Paint window with the Lasso or Marquee tool, you can change the selected area.
  • Page 110 Note: To repeat any of these effects after using them, press Control+Y (Windows) or Command+Y (Macintosh). To flip, rotate, skew, or apply effects to part of a bitmap: Select part of a bitmap in the Paint window with the Marquee tool. Use any of the following effects: To flip the selection, click the Flip Horizontal button to flip right to left, or click the Flip Vertical button to flip top to bottom.
  • Page 111: Using Auto Distort

    To apply color effects to a selected area: Select an area within a bitmap cast member by using either the Marquee or the Lasso tool. Use any of the following effects: To soften the edges of the selected artwork, click the Smooth button. This effect works only with 8-bit cast members.
  • Page 112: Changing Registration Points

    Changing registration points A registration point is a marker that appears on a sprite when you select it with your mouse. (Registration points don’t appear on unselected sprites or when a movie is playing.) Registration points provide a fixed reference point within an image, thereby helping you align sprites and control them from Lingo or JavaScript syntax.
  • Page 113: Changing Size, Color Depth, And Color Palette For Bitmaps

    Stage, use the Sprite tab in the sprite’s Property inspector. You can also remap images to new palettes with an image-editing program such as Macromedia Fireworks. The Transform Bitmap dialog box displays values for the current selection. If you select more than one cast member, a blank value indicates that cast members in the selection have different values.
  • Page 114: Controlling Bitmap Images With Lingo Or Javascript Syntax

    To change the palette, select a palette from the Palette pop-up menu and select one of the following remapping options: Remap Colors replaces the original colors in the graphic with the most similar solid colors in the new palette. This is the preferred option in most cases. Dither blends the colors in the new palette to approximate the original colors in the graphic.
  • Page 115 To change the image assigned to a bitmap cast member: • Set the cast member property. For more information about this property, see the picture Scripting Reference topics in the Director Help Panel. To specify the background or foreground of a bitmap sprite: •...
  • Page 116 The following statement draws a line on the previously created 640 x 480 image object myImage running from 20 pixels inside the upper left corner to 20 pixels inside the lower right corner, and colors it blue: myImage.draw(20, 20, 620, 460, rgb(0, 0, 255)) To draw a rectangle on an image object: •...
  • Page 117: Using Gradients

    Using gradients Director can create gradients in the Paint window. You can use gradients with the Brush tool, the Bucket tool, the Text tool, or any of the filled shape tools. Typically, a gradient consists of a foreground color at one side (or the center) of an image and another color, the destination color, at the other side (or outside edge) of the image.
  • Page 118 To edit gradient settings: Select Gradient Settings from the Gradient Colors pop-up menu. Gradient pop-up menu To determine whether the gradient is created with the pattern you select with the Patterns pop- up menu in the Paint window or with a dithered pattern, select a Type option, as described in the following list: Dither produces a smooth transition between colors.
  • Page 119 Left to Right puts the foreground color on the left and the destination color on the right. Right to Left puts the foreground color on the right and the destination color on the left. Directional lets you determine the direction of the gradient. You set the direction of the gradient in the Paint window with the paint tool used to fill the area.
  • Page 120: Using Patterns

    Using patterns You can select among three sets of patterns that are included with Director or create custom patterns. The patterns you change or edit in the Paint window don’t affect the patterns that are available for shapes. To use a pattern: Select the Brush tool, the Bucket tool, or one of the filled shape tools.
  • Page 121: Using Paint Window Inks

    To create a custom tile: Create a bitmap cast member to use as a tile, and display it in the Paint window. Click the pattern box in the Paint window, and select Tile Setting from the bottom of the Patterns pop-up menu. Click an existing tile position to edit.
  • Page 122 B&W Color Works with Lighten Brush Smooth Brush Smear Brush Smudge Brush Spread Brush Clipboard Brush Normal is the default ink. It is opaque and maintains the color of the current foreground color and pattern. Transparent ink makes the background color of patterns transparent so artwork drawn previously in the current cast member can be seen through the pattern.
  • Page 123: Using Bitmap Filters

    Darken makes colors darker. The more times you click with the Brush tool, the darker the area becomes. The colors of the foreground, background, and destination inks have no effect on Darken. Darken creates an effect that is the same as reducing a color’s brightness with the controls in the Color Palettes window.
  • Page 124 To install a filter: • Place the filter in the Xtras folder in the Director application folder. For more information about installing Xtra extensions, see the Getting Started topics in the Director Help Panel. To apply a filter: Open the cast member in the Paint window, or select the cast member in the Cast window. You can apply a filter to several cast members at once by selecting them all in the Cast window.
  • Page 125: Using Onion Skinning

    Enter the number of new cast members you want to create. The text box is not available if you selected a range of cast members. Click Filter to begin the filtering. A message appears to show the progress. Some filters are complex and require extra time for computing.
  • Page 126 To define the number of preceding or following cast members to display: Open the Paint window, and select View > Onion Skin. The Onion Skin toolbar appears. If necessary, click the Toggle Onion Skinning button on the Onion Skin toolbar to activate onion skinning.
  • Page 127: About The Paste As Pict Option

    To use a series of images as a background while painting a series of foreground images: In the Cast window, arrange the series of cast members you want to use as your background in consecutive order. Cast members in the foreground and the background series must be adjacent to each other in the cast.
  • Page 128: Setting Bitmap Cast Member Properties

    Setting bitmap cast member properties To view important information about cast members, change a cast member’s name, select alpha settings, or turn on highlighting and dithering, you use bitmap cast member properties. To view or change bitmap cast member properties: Select a bitmap cast member, and click the Member tab in the Property inspector using the Graphical view.
  • Page 129: Setting Paint Window Preferences

    Setting Paint window preferences You can use Paint window preferences to modify the settings of several tools and drawing methods in the Paint window. To change Paint window preferences: Select Edit > Preferences > Paint. Note: If you are using a Macintosh OS X operating system, select the Director menu, instead of the Edit menu, to access Preferences.
  • Page 130 In addition to Director standard compression, you can use JPEG compression and specify a range of image quality. If you have Fireworks installed, you can use the Optimize in Fireworks button to start Fireworks and then dynamically apply compression settings while viewing how your image looks at those settings.
  • Page 131: Working With Macromedia Fireworks

    Working with Macromedia Fireworks You can combine the power of Macromedia Fireworks and Director. Fireworks lets you export graphics and interactive content into Director. The export process preserves the behaviors and slices of the graphic. You can safely export sliced images with rollovers and even layered images.
  • Page 132 Importing Fireworks files into Director In Director, you can import flattened images that you have exported from Fireworks, such as JPEGs, GIFs, and 32-bit PNGs. You can also import Fireworks layers, slices, and interactive elements by inserting Fireworks HTML. To import a flattened Fireworks image: In Director, select File >...
  • Page 133 Bitmap tab in the Property inspector. In Fireworks, change the optimization settings as desired. Click Update when you finish. Click Done if the MIX Editing dialog box appears. The image is exported back to Director using the new settings. Working with Macromedia Fireworks...
  • Page 134 Chapter 5: Bitmaps...
  • Page 135: Chapter 6: Vector Shapes

    CHAPTER 6 Vector Shapes Vector shapes and bitmaps are the two main types of graphics used with Macromedia Director MX 2004. A vector shape is a mathematical description of a geometric form that includes the thickness of the line, the fill color, and additional features of the line that can be expressed mathematically.
  • Page 136 • The first vertex in a curve is green. • The last vertex in a curve is red. • All other vertices are blue. • Unselected vertices are solid. • Selected vertices are unfilled. To open the Vector Shape window: •...
  • Page 137 To create a vector shape using the Pen tool: In the Vector Shape window, click the New Cast Member button. Click the Pen tool and begin to draw: To create a corner point, click once. To create a curve point, click and drag. Dragging creates control handles that define how the line curves through the point that you define.
  • Page 138 Choosing fill and line settings for vector shapes You can use either controls in the Vector Shape window or Lingo or JavaScript syntax to choose a vector shape’s fill color, line width and color, and background color. The background is the area outside of a vector shape but within the cast member’s bounding rectangle.
  • Page 139: Editing Vector Shapes

    To specify a vector shape’s fill in script: • Set the , and cast member properties. For fillColor fillMode fillOffset fillScale more information about these properties, see the Scripting Reference topics in the Director Help Panel. Editing vector shapes To edit vector shapes, you use the Vector Shape window. You change vector shapes by moving, adding, or deleting control points and changing the way they control curves.
  • Page 140 To join two curves: Select a vertex in each curve. If you select two endpoint vertices, you join them. If you select points in the middle of the curve, you join the start of the second curve to the end of the first curve. Select Modify >...
  • Page 141: Defining Gradients For Vector Shapes

    Defining gradients for vector shapes You can use controls in the Vector Shape window or Lingo or JavaScript syntax to specify the type of gradient, how it is placed within a shape, and how many times it cycles within the shape. A gradient for a vector shape shifts between the fill color and the end color you define.
  • Page 142: Controlling Vector Shapes With Lingo Or Javascript Syntax

    Controlling vector shapes with Lingo or JavaScript syntax You can use script to modify a vector shape by setting properties and using methods related to the shape’s vertices. For more information about the following properties, expressions, and methods, see the Scripting Reference topics in the Director Help Panel. •...
  • Page 143: Using Shapes

    To specify how vector shapes are scaled on the Stage, select an option from the Scale Mode pop-up menu. Show All maintains the vector shape’s aspect ratio and, if necessary, fills in any gap along the horizontal or vertical dimension using the vector shape’s background color. No Border maintains the vector shape’s aspect ratio by cropping the horizontal or vertical dimension as necessary without leaving a border.
  • Page 144: Setting Shape Cast Member Properties

    Setting shape cast member properties You can use cast member properties to view and change settings for selected shape cast members. You can change the type of shape and choose a new fill color or pattern. You can also use Lingo or JavaScript syntax to control shape cast member properties.
  • Page 145: Chapter 7: Color, Tempo, And Transitions

    CHAPTER 7 Color, Tempo, and Transitions Several behind-the-scenes functions in Macromedia Director MX 2004 are important to the appearance and performance of a movie. To control the way Director manages colors, it’s important to understand the difference between RGB and index color, and how to assign colors to various elements in your movie.
  • Page 146 Specifying palette index and RGB color Director can use either palette index values or RGB values to specify colors. RGB values are much more reliable and accurate for specifying colors than palette index values. RGB is the system that most web pages use. Director identifies a palette index color by the number of its position in a set of colors called a color palette.
  • Page 147 Changing the color depth of a movie When you save a Director movie, it is set to the same color depth as the system on which you are authoring. You can use Lingo or JavaScript syntax to reset the system color depth to match the color depth of a movie.
  • Page 148 To open the Color menu: Do one of the following: Select a sprite and display the Sprite tab of the Property inspector. Select Window > Tool Palette. Click and hold the mouse button while pointing at the Foreground Color and Background Color buttons.
  • Page 149 To change the color palette displayed on the Color menu: Select Window > Color Palettes or double-click the mouse button on the Foreground Color and Background Color buttons in the Tool palette. Select a color palette from the Palette pop-up menu. Changing color palettes during a movie The palette channel in the Score determines which palette is active for a particular frame in a movie.
  • Page 150 To specify a palette: In the Score, do one of the following: Double-click the cell in the palette channel where you want the new palette setting to appear. Right-click (Windows) or Control-click (Macintosh) the cell in the effects channel where you want the new palette setting to appear, and then select Palette from the Context menu.
  • Page 151 Using the Color Palettes window Use the Color Palettes window to change and rearrange color palettes and to determine which colors in a palette are used in an image. This section explains basic features of the Color Palettes window. Select a palette Reserve, select, and rearrange colors to change Define a new color...
  • Page 152 Select Modify > Transform Bitmap and select the desired options. Note: Be sure to select Remap Colors, not Dither. Click Transform to remap all the cast members to the new palette. To select one or more colors: Click a color in the Color Palettes window. If the selection arrow is not active, click the Arrow tool at the bottom of the window.
  • Page 153 To select colors in the palette used by the current cast member: In the Cast window, select the cast member. Select Window > Color Palettes. Select Used button Invert Selection button Click the Select Used Colors button in the Color Palettes window. In the Select Colors Used In Bitmap dialog box, click Select.
  • Page 154 To edit selected colors in the Color Palettes window: Select Window > Color Palettes. Select the palette you want to change from the Palette pop-up menu. Select a color within the palette to change. If you attempt to change one of the default palettes, Director makes a copy of the palette and prompts you to enter a name.
  • Page 155: Setting Palette Cast Member Properties

    To solve color palette problems, follow these guidelines: • To avoid color problems in movies for the web, map all 8-bit bitmaps in your movie to the Web216 color palette that is built in to Director. This is essentially the same palette used by Netscape Navigator and Microsoft Internet Explorer.
  • Page 156 From the Palette pop-up menu, select the palette that you want to use to create a new palette cast member. Double-click any color within the palette. Director makes a copy of the palette and prompts you to enter a name. In the Create Palette dialog box, enter a name and click the OK button.
  • Page 157: About Tempo

    About tempo Tempo is the number of frames per second that Director tries to play. You can control tempo by using the Score tempo channel or the method. puppetTempo Director tempo settings control the maximum speed at which the playhead moves from frame to frame.
  • Page 158 To specify a tempo setting: In the Score, do one of the following: Double-click the cell in the tempo channel where you want the new tempo setting to appear. Right-click (Windows) or Control-click (Macintosh) the cell in the effects channel where you want the new tempo setting to appear, and then select Tempo from the Context menu.
  • Page 159 Comparing actual speed with tempos It’s good practice to test the performance of your movie on a system that is similar to that of your users. Make sure the movie plays well on the slowest systems likely to be used. The tempo you’ve set and the actual speed of a movie both appear in the floating Control panel.
  • Page 160: Using Transitions

    Using transitions Transitions create brief animations that play between frames to create a smooth flow as sprites move, appear, or disappear or as the entire Stage changes. Director provides dozens of transitions built into the application, and many third-party Xtra extensions also include transitions. For example, you can dissolve from one scene to the next, display a new scene strip by strip, or switch to a scene as though revealing it through venetian blinds.
  • Page 161 Tips for using transitions Here are some points to remember when working with transitions: • To play a sound while a transition occurs, place the sound in the frame immediately before the transition. • The Dissolve Pixels, Dissolve Pixels Fast, or Dissolve Patterns transitions might look different on Windows and Macintosh systems.
  • Page 162 Setting transition cast member properties You use the Property inspector to set values for the transition cast member. To view or change transition cast member properties: Select a transition cast member. To display the Property inspector, select Modify > Cast Member > Properties, or select Window >...
  • Page 163: Chapter 8: Text

    CHAPTER 8 Text Macromedia Director MX 2004 creates text that is editable, anti-aliased, and compact for fast downloading of outline fonts on both the Macintosh and Windows platforms. Combine these features with any of the animation capabilities of Director, such as rotation, and you can create wonderful text effects in your Director movies.
  • Page 164: Embedding Fonts In Movies

    Embedding fonts in movies Before creating text or field cast members, it’s good practice to embed the fonts you want to use in the movie. Embedding fonts makes Director store all font information in the movie file so that a font displays properly even if it is not installed in a user’s system.
  • Page 165: Creating Text Cast Members

    To embed a font in a movie with Lingo or JavaScript syntax: • Use the method. For more information about this method, see the Scripting recordFont Reference topics in the Director Help Panel. Creating text cast members You can create text within Director or import text from external files. Creating text in Director Director provides two ways to create text cast members: directly on the Stage or in the Text window.
  • Page 166: Editing And Formatting Text

    When you import text from an HTML document, Director recognizes many standard tags and parameters, including tables, and approximates the formatting. Director does not recognize embedded objects other than tables, and it does not support nested tables. It also does not recognize , or tags...
  • Page 167 Use the Text inspector (Window > Text Inspector) to reformat the text. You can also use the Modify > Font and Modify > Paragraph commands to reformat selected text. When you make a change, Director updates all sprites that display the text cast member. Note: If you’re changing the background color of text, you have two options.
  • Page 168 To make formatting changes to a paragraph: Double-click the text sprite in the Score or the text cast member in the Cast window to open the Text window. If the ruler is not visible, select View > Rulers. To change the unit of measure on the text ruler, select Edit > Preferences > General, and select Inches, Centimeters, or Pixels from the Text Units pop-up menu.
  • Page 169 Formatting entire cast members Director can apply formatting changes to entire cast members. This process is much faster than manually opening each cast member and applying changes. Any change you apply to a cast member affects all the text within the cast member. To format text cast members: In a Cast window or on the Stage, select the cast members you want to change.
  • Page 170 About anti-aliased text Anti-aliased text is text that uses color variations to make its jagged angles and curves look smoother. Director activates anti-aliasing by default. You can change this setting on the Text tab of the Property inspector (for more information, see “Setting text or field cast member properties”...
  • Page 171: Creating A Hypertext Link

    To specify the cast members in which to search, select one of the following Search options: Cast Member [Cast Member Name] limits the search to the current cast member. Cast [Cast Name] limits the search to cast members in the current cast. All Casts extends the search to all cast members in all casts.
  • Page 172: Working With Fields

    Working with fields Working with field cast members is similar to working with text. As with text cast members, you edit fields on the Stage or in a window, and apply formatting with the Text inspector. Not all text formatting options are available for fields: you can’t apply spacing, tabs, or indents to individual paragraphs within fields.
  • Page 173: Converting Text To A Bitmap

    To make a text sprite editable in a range of frames: Select a range of frames within a sprite. You can select an entire sprite, or Shift-Alt-click (Windows) or Shift-Option-click (Macintosh) to select frames within a sprite. Click the Property inspector’s Text or Field tab by using the Graphical view. Click Editable.
  • Page 174: Setting Text Or Field Cast Member Properties

    Windows font Macintosh font Terminal Monaco Times New Roman Times (because Times New Roman is larger than Times, Fontmap.txt assigns a smaller point size.) Fontmap.txt also determines the scaling of fonts and how special characters such as bullets and symbols are translated between platforms. Again, the default settings are correct for nearly all applications, but you can edit the settings if necessary You can also load and save fontmaps by using the Property inspector.
  • Page 175 To specify how Director removes the cast member from memory if memory is low, select an option from the Unload pop-up menu. For more information, see “Controlling cast member unloading” on page To change the text of the cast member, click Edit. Click the Property inspector’s Text or Field tab by using the Graphical view.
  • Page 176: Formatting Chunks Of Text With Lingo Or Javascript Syntax

    To control how Director anti-aliases text for a text cast member, select one of the following Anti-Alias options: All Text anti-aliases all the text in the text block. Larger Than anti-aliases only text that is larger than the point size entered in the Points text box.
  • Page 177 Formatting text with Lingo or JavaScript syntax Lingo or JavaScript syntax can format text in an entire cast member or any specific chunk of text. Use the following properties: • To select or identify a chunk of text in a field cast member, use the cast selStart selEnd...
  • Page 178: Formatting Text Or Field Cast Members With Lingo Or Javascript Syntax

    Formatting text or field cast members with Lingo or JavaScript syntax In addition to formatting text in any chunk expression, Lingo or JavaScript syntax can specify anti-aliasing and kerning for an entire text cast member and control the appearance of the text’s bounding rectangle.
  • Page 179: Controlling Scrolling Text With Lingo Or Javascript Syntax

    Controlling scrolling text with Lingo or JavaScript syntax You can script in Lingo or JavaScript syntax to scroll text and determine the location of specific text within the text box for text and field cast members. For example, this statement sets the value for the text cast member called Discussion to 0, which makes its first line appear scrollTop at the top of its scrolling field:...
  • Page 180: Modifying Strings With Lingo Or Javascript Syntax

    Modifying strings with Lingo or JavaScript syntax As time passes or other conditions change, you might want to update and change text. For example, you might want to frequently update a text sprite that displays the user’s name or a description of a musical selection that the user is currently streaming from a website.
  • Page 181: Chapter 9: Using Flash, Flash Components, And Other Interactive Media Types

    Flash file. Director can import Flash 2 files or later. Director supports the new features of Macromedia Flash MX and Flash MX 2004, including access to Macromedia Flash Communication Server MX.
  • Page 182: Adding A Flash Content Cast Member

    Flash content it encounters in the Score into memory from disk, from a network drive, or from anywhere on the Internet. Flash content is particularly effective for use in Macromedia Shockwave content because, as vector-based media, they are extremely small and therefore load much more quickly than most other media types.
  • Page 183 Select Playback options to control how a Flash content sprite plays in a Director projector, in Shockwave content, and while you are authoring in Director: Image displays the image of the Flash content when it plays. When Image is deselected, the Flash movie is invisible.
  • Page 184: Editing A Flash Cast Member

    Blend and color settings are supported for Flash sprites just as they are for vector shapes. Editing a Flash cast member If you have Macromedia Flash MX or later installed, you can launch the Flash authoring tool from within Director to edit your Flash cast members.
  • Page 185: Controlling Flash Content With Lingo Or Javascript Syntax

    To add Flash to the list of external editors: Select Edit > Preferences > Editors. Note: If you are using a Macintosh OS X operating system, select the Director menu, instead of the Edit menu, to access Preferences. Select Flash, and click Edit. Select Use External Editor, and click Browse.
  • Page 186 Flipping, rotating, and skewing Flash sprites Lingo or JavaScript syntax can flip, rotate, and skew Flash sprites as the movie plays. For more information, see the Scripting Reference topics in the Director Help Panel. • To flip a Flash sprite, set the sprite properties.
  • Page 187: Streaming Flash Content With Lingo Or Javascript Syntax

    Controlling the Flash content bounding rectangle and registration points You can use Lingo or JavaScript syntax to control the Flash content bounding rectangle and to Flash content registration points. For more information, see the Scripting Reference topics in the Director Help Panel. •...
  • Page 188: Playing Back Flash Content With Lingo Or Javascript Syntax

    • To determine how much of Flash content is currently streamed, test the percentStreamed property or check the method. streamSize • To set when Director attempts to stream part of Flash content, set the property. streamMode • To clear an error setting for streaming Flash content, use the method.
  • Page 189: Using Lingo Or Javascript Syntax To Set And Test Flash Variables

    Controlling Flash content interactivity with Lingo or JavaScript syntax Lingo or JavaScript syntax can control whether Flash content remains interactive. For more information, see the Scripting Reference topics in the Director Help Panel. • To control whether the actions in Flash content are active, set the property actionsEnabled TRUE...
  • Page 190: Sending Messages From Flash Content Using Geturl

    You can also use the following two sprite methods to access ActionScript variables in Flash sprites: (). For more information, see the Scripting Reference topics in getVariable() setVariable the Director Help Panel. • To return a string that contains the current value of a Flash sprite variable, use the following statement: spriteReference.getVariable("variableName", TRUE) The parameter...
  • Page 191 To handle a message string passed by Flash content: Specify the message string in the Flash content, as described above. For example, in Flash, you could specify the following string as the URL parameter of the function: getURL Hello World In Flash, the ActionScript would look like this: getURL("Hello World");...
  • Page 192 Director. For example, if you want to send a script statement from the Flash sprite which tells Director to launch a browser and open macromedia.com, you would do the following: getURL("lingo:gotonetpage(\"http://www.macromedia.com\")");...
  • Page 193: Sending Xml Data From Flash To Director

    You can create a wide variety of Flash objects, including arrays, dates, Booleans, XML objects, and net connection objects for use with Macromedia Flash Communication Server MX. If you have authored Flash content that contains ActionScript classes that generate custom objects, you can access those objects in script as well.
  • Page 194 The Flash asset commonPlayer feature gives you the ability to load multiple Flash sprites into one instance of the Flash Player; this provides better Flash playback performance in Director objects that have a great deal of Flash assets. Note: If you do not import any Flash cast members, you must manually add the Flash Asset Xtra to your movie’s Xtra list for global Flash objects to work correctly in Shockwave and projectors.
  • Page 195: Using The Flash Local Connection Object

    The callback handler could look like the following: on dirOnStatusHandler (me, aInfoObject) if (aInfoObject[#level] = "error") then member("chat input").text = "Error sending last message." end if Using the Flash local connection object Flash includes an object type called local connection. The Flash local connection object can be very useful for allowing separate movies on the same computer to connect to and communicate with each other.
  • Page 196 Set up the callback for these user-defined messages. Decide what string you want to use as your message subjects, so that you know what the event name will be. In the following example, the...
  • Page 197 event is generated each time the local connection object sends an outgoing onStatus message. The handler might look like this: myOnStatus on myOnStatus (me, aInfoObject) if (aInfoObject[#level] = "error") then member("chat input").text = "Error sending last message." else member("chat output").text = member("chat output").text & RETURN & \ member("chat input").text end if end myOnStatus...
  • Page 198: Using Flash Communication Server Mx 2004

    ActionScript. For a detailed example, see the previous section. The Macromedia Director MX 2004 installation CD for Windows includes Flash Communication Server MX Personal Edition, the Flash Communication Server MX authoring components for Flash, and documentation.
  • Page 199 To receive a video stream from the server, the stream must be attached to a video clip instance in a Flash sprite. Sample Flash content containing a video clip object is included in the Macromedia/ Support/Flash/ folder on the Director installation CD.
  • Page 200: Using The Flash Settings Panel

    (Windows) or Control-clicking (Macintosh) on your Flash sprite when your movie is playing in a browser. To do this, you must first disable the context menu that is built into the Macromedia Shockwave Player. After the Shockwave context menu is disabled, you can trigger the Flash Settings panel by right-clicking or Control-clicking.
  • Page 201: Playback Performance Tips For Flash Content

    You can also choose to use ActionScript in your Flash content to enable the Settings panel. For more information, see the Macromedia Flash MX 2004 documentation. Playback performance tips for Flash content Performance of Flash content can vary greatly, depending on the options in effect and the playback environment.
  • Page 202: Using Director Movies Within Director Movies

    • Use Lock-Step or Fixed playback mode to adjust the Flash content frame rate. Lock-Step gives the best performance, because playback of the Flash content is synchronized to the Director movie frame for frame. • Set the property of the sprite to if your sprite contains no animation (such as a static TRUE...
  • Page 203: Setting Linked Director Movie Properties

    To place a Director movie cast member in the current movie: Do one of the following: For an internal movie, drag the film loop cast member to the Stage or Score. For a linked external movie, drag the movie cast member to the Stage or Score. Extend the sprite through all the frames in which you want it to appear.
  • Page 204: Using Activex Controls

    Note: Not all ActiveX controls expose their methods and properties in all hosts. Test the controls you want to use to see how they work in Director. Because ActiveX controls are non-Macromedia software, Macromedia Technical Support does not support them.
  • Page 205 Set the values for each property in the ActiveX control and then click OK. The ActiveX control now appears in the cast. Drag the ActiveX control from the cast to the Stage. Once the ActiveX control appears on the Stage, it can be repositioned and resized just like any other sprite Xtra.
  • Page 206 When you insert an ActiveX control in a Director movie, you can view the methods exposed by the control by clicking the Methods tab of the Control Properties dialog box for the ActiveX control. The dialog box displays each method supported by the ActiveX control and a description of the parameters for each method.
  • Page 207: Using Flash Components

    Using Flash components Macromedia Flash MX 2004 components are bundled movie clips with ActionScript programming interfaces. Director comes with a set of user interface components, including list boxes, radio buttons, check boxes, a scroll pane, and more. You can also add components to the existing set by creating your own in Flash MX 2004 and dragging and dropping them into the Director Components folder.
  • Page 208 Drag and drop the component you want to a Cast window slot, the Score, or directly to the Stage. Director MX 2004 includes the following Flash components: Button component creates a button that can be customized to include an icon. CheckBox component lets you insert a graphic component that can represent an on or off state.
  • Page 209 Setting Flash component parameters Each component has unique parameters that you can set to change its appearance and behavior. A parameter is a property or method that appears in the Property inspector. The most commonly used properties and methods appear as authoring parameters; others must be set using scripting only.
  • Page 210: Button Component

    Button component The Button component is a resizable rectangular user interface button. You can add a custom icon to a button. You can also change the behavior of a button from push to toggle. A toggle button stays pressed when clicked and returns to its up state when clicked again. A button can be enabled or disabled in an application.
  • Page 211: Checkbox Component

    Property summary for the Button class Method Description Specifies the text that appears within a button. Button.label Button.labelPlacement Specifies the orientation of the label text in relation to an icon. When the property is , specifies whether the button is pressed Button.selected toggle true...
  • Page 212: Datechooser Component

    A CheckBox component supports the following Halo styles: Style Description The background of a component. This is the only color style that doesn’t themeColor inherit its value. Possible values are "haloGreen", "haloBlue", and "haloOrange". The text of a component label. color disabledColor The disabled color for text.
  • Page 213 DataChooser parameters The following are authoring parameters that you can set for each DataChooser component instance in the Property inspector. monthNames sets the month names that are displayed in the heading row of the calendar. The value is an array and the default value is [“January“,“February“,“March“,“April“,“May“,“June“,“July“,“August“,“September“,“October“,“...
  • Page 214: Label Component

    TextInput field that accepts a user's name. If you’re building an application using components based on version 2 (v2) of the Macromedia Component Architecture, it’s a good idea to use a Label component instead of a plain text field because you can use styles to maintain a consistent look and feel.
  • Page 215 autoSize indicates how the label sizes and aligns to fit the text. The default value is none. The parameter can be any of the following four values: • none—the label doesn’t resize or align to fit the text. • left—the right and bottom sides of the label resize to fit the text. The left and top sides don’t resize.
  • Page 216: List Component

    List component The List component is a scrollable single- or multiple-selection list box. A list can also display graphics, including other components. The List component uses a zero-based index, where the item with index 0 is the top item displayed. When adding, removing, or replacing list items using the List class methods and properties, you may need to specify the index of the list item.
  • Page 217 A List component uses the following Halo styles: Style Description Specifies colors for rows in an alternating pattern. The value can be an alternatingRowColors array of two or more colors, for example, 0xFF00FF, 0xCC6699, and 0x996699. The background color of the list. This style is defined on a class style backgroundColor declaration, ScrollSelectList.
  • Page 218: Numericstepper Component

    Property summary for the List class Property Description Assigns the class or symbol to use to display each row of the list. List.cellRenderer List.dataProvider The source of the list items. The horizontal position of the list. List.hPosition Indicates whether the horizontal scroll bar is displayed ( ) or List.hScrollPolicy "on"...
  • Page 219 Using the NumericStepper component The NumericStepper can be used anywhere you want a user to select a numeric value. For example, you could use a NumericStepper component in a form to allow a user to set their credit card expiration date. In another example, you could use a NumericStepper to allow a user to increase or decrease a font size.
  • Page 220: Radiobutton Component

    Style Description textDecoration The text decoration; either "none", or "underline". The text alignment; either "left", "right", or "center". textAlign Property summary for the NumericStepper class Property Description A number indicating the maximum range value. NumericStepper.maximum NumericStepper.minimum A number indicating the minimum range value. A number indicating the next sequential value.
  • Page 221 Customizing the RadioButton component You can transform a RadioButton component horizontally and vertically both while authoring and at runtime. The bounding box of a RadioButton component is invisible and also designates the hit area for the component. If you increase the size of the component, you also increase the size of the hit area.
  • Page 222: Scrollpane Component

    Event summary for the RadioButton class Event Description Triggered when the mouse is pressed over a button instance. RadioButton.click ScrollPane component The Scroll Pane component displays movie clips, JPEG files, and SWF files in a scrollable area. You can enable scroll bars to display images in a limited area. You can display content that is loaded from a local location, or from over the internet.
  • Page 223 Method summary for the ScrollPane class Method Description Returns the number of bytes of content loaded. ScrollPane.getBytesLoaded() ScrollPane.getBytesTotal() Returns the total number of content bytes to be loaded. Reloads the contents of the scroll pane. ScrollPane.refreshPane() Property summary for the ScrollPane class Method Description ScrollPane.content...
  • Page 224: Textarea Component

    TextArea component You can use a TextArea component wherever you need a multiline text field. If you need a single- line text field, use the “TextInput component” on page 225. For example, you could use a TextArea component as a comment field in a form. You could set up a listener that checks if field is empty when a user tabs out of the field.
  • Page 225: Textinput Component

    Property summary for the TextArea class Property Description A Boolean value indicating whether the field is editable ( ) or TextArea.editable true not ( false Defines the horizontal position of the text within the scroll pane. TextArea.hPosition Indicates whether the horizontal scroll bar is always on ( ), never on TextArea.hScrollPolicy "on"...
  • Page 226 TextInput component parameters The following are authoring parameters that you can set for each TextInput component instance in the Property inspector or in the Component Inspector panel: text specified the contents of the TextInput. You cannot enter carriage returns in the Property inspector or Component Inspector panel.
  • Page 227: Tree Component

    Property Description TextInput.maxChars The maximum number of characters that a user can enter in a TextInput text field. The maximum possible value for TextField.hPosition. This property is TextInput.maxHPosition read-only. A Boolean value that indicates whether or not the input text field is a TextInput.password password field that hides the entered characters.
  • Page 228 Description Control Allows multiple noncontiguous selections. Shift Allows multiple contiguous selections. The Tree component can be used to represent hierarchical data such as e-mail client folders, file browser panes, or category browsing systems for inventory. Most often, the data for a tree is retrieved from a server in the form of XML, but it can also be well-formed XML that is created while authoring in Director.
  • Page 229 When a Tree displays a node it uses the attribute of the node by default as the text label. label If any other attributes exist, they become additional properties of the node’s attributes within the Tree. The actual root node is interpreted as the Tree component itself. This means that the firstChild (in the sample, ), is rendered as the root node in the Tree view.
  • Page 230 Method Description Tree.setIcon() Specifies whether a node is open or closed. Specifies a symbol to be used as an icon for a node. Tree.setIsOpen() Property summary for the Tree class Property Description Specifies an XML data source. Alert.cancelLabel Specifies the first node at the top of the display. Alert.noLabel Specifies the selected node in a tree instance.
  • Page 231: Chapter 10: Sound And Synchronization

    You can give your movie added appeal by including a sound track, a voice-over, ambient noises, or other sounds. With Macromedia Director MX 2004, you can control when sounds start and stop, how long they last, their quality and volume, and several other effects. Using Macromedia Shockwave Audio, you can compress sounds for easier distribution and stream them from an Internet source.
  • Page 232: Setting Sound Cast Member Properties

    Director does not store sound data in a linked sound cast member. Instead, it keeps a reference to a sound file’s location and imports the sound data each time the sound begins playing. Because the sound is never entirely loaded into RAM, the movie uses memory more efficiently. Also, Director streams many sounds, which means it begins playing the sound while the rest of the sound continues to load from its source, whether on disk or over the Internet.
  • Page 233: Controlling Sound In The Score

    Click the Member tab in the Property inspector. The following noneditable settings appear: The cast member size in kilobytes The cast member creation and edit dates The name of the last person who modified the cast member To view or edit the cast member name, use the Name text box. To change the external sound file to which the cast member is linked (if it has been imported as a Linked to External File sound), enter a new path and file in the Filename text box.
  • Page 234: Looping A Sound

    In Windows, a sound that is already playing in either sound channel overrides the sound in a QuickTime or AVI video or in Macromedia Flash content. It also prevents the video sound from playing even after the sound in the sound channel stops. After the sound in a digital video starts, however, it overrides a sound in either sound channel.
  • Page 235: Playing Sounds With Lingo Or Javascript Syntax

    Playing sounds with Lingo or JavaScript syntax Lingo or JavaScript syntax lets you play and control sounds regardless of the settings in the Score. You can use these scripts to play sounds, turn them on and off, and play external sounds that aren’t cast members.
  • Page 236 After queuing sounds, you can still control whether the queue is obeyed. You can select to interrupt loops with the method or to pause playback with the method. breakLoop() pause() method lets you skip immediately to the next sound in the queue. For more playNext() information about sound methods, see the Director Scripting Reference.
  • Page 237: About Shockwave Audio

    About Shockwave Audio Shockwave Audio is a technology that makes sounds smaller and plays them faster from disk or over the Internet. Shockwave Audio can compress the size of sounds by a ratio of up to 176:1 and is streamable, which means Director doesn’t have to load the entire sound into RAM before it begins playing.
  • Page 238: Streaming Linked Shockwave Audio And Mp3 Audio Files

    When you distribute a movie that contains sounds compressed with Shockwave Audio, the SWA Decompression Xtra is already included in the Macromedia Shockwave Player. If you compress sounds in Shockwave format in a projector, you must provide the SWA Decompression Xtra for the projector.
  • Page 239: Playing Shockwave Audio, Windows Media Audio, And Mp3 Audio With Lingo Or Javascript Syntax

    Drag the Shockwave Audio cast member to a sprite channel (not one of the sound channels) to create a sprite. Extend the sprite through all frames in which the sound should play, or use the tempo channel to make the movie wait for the end of the sound. For more information, see “Synchronizing media”...
  • Page 240: Synchronizing Media

    Synchronizing media To pause the playhead until a specified cue point in a sound or digital video is reached, you can use the Wait for Cue Point option in the Tempo dialog box. You can also use this method to wait for the end of the sound or digital video, even if it has no cue points.
  • Page 241: Synchronizing Sound With Lingo Or Javascript Syntax

    Synchronizing sound with Lingo or JavaScript syntax By writing script that performs an action when a cue point is reached in a sound or QuickTime file, you can synchronize a movie with sound or digital video. For more information about the following methods and properties, see the Scripting Reference topics in the Director Help Panel.
  • Page 242 Chapter 10: Sound and Synchronization...
  • Page 243: Chapter 11 Using Digital Video

    CHAPTER 11 Using Digital Video You can give your Macromedia Director MX 2004 movie added appeal by including digital video. Digital video not only offers high-quality real-time image animation and sound, but also supports new types of media such as Windows Media audio and video files and DVD content.
  • Page 244: About Digital Video Formats

    RealMedia digital video. For security reasons, Macromedia Shockwave links to media on a local disk only if it is in a folder named dswmedia. To test movies in a browser locally before uploading them to your Internet server, place the movie, linked casts, and linked media in folders within a dswmedia folder, and use relative links to refer to them.
  • Page 245: Using The Video Windows

    Using the video windows Whether a digital video is a cast member or a sprite on the Stage, you can preview it in its corresponding video window. There are different versions of the window for QuickTime, Windows Media, DVD, RealMedia, and AVI digital content. To open a video window, do one of the following: Click a digital video cast member or sprite and select one of the following menu options: Window >...
  • Page 246: Controlling Digital Video In The Score

    If the cast member or sprite is a QuickTime video, select one of the following Playback options: Sync to Soundtrack makes the digital video skip frames (if necessary) to keep up with its soundtrack. The digital video might also take less time to play. Play Every Frame makes every frame of the digital video appear but does not play the soundtrack because the video cannot play the soundtrack asynchronously while the video...
  • Page 247: Playing Digital Video With Lingo Or Javascript Syntax

    Playing digital video with Lingo or JavaScript syntax Lingo or JavaScript syntax can take advantage of the most important and powerful features of digital video. Besides playing digital video linearly, Lingo or JavaScript syntax can pause, stop, and rewind a video. These abilities are useful for jumping to segments within a digital video and for emulating a typical digital video control panel.
  • Page 248: Setting Quicktime Digital Video Cast Member Properties

    • To determine the stop time of a track in a digital video sprite or cast member, check the digital video’s sprite or cast member property. trackStopTime • To determine whether a sprite’s track is enabled to play, check the digital video’s trackEnabled sprite property.
  • Page 249 To determine how a movie image appears within the sprite bounding rectangle when the movie is rotated, scaled, or offset, set the following Framing options: Crop displays the movie image at its default size. Any portions that extend beyond the sprite’s rectangle are not visible.
  • Page 250: Controlling Quicktime With Lingo Or Javascript Syntax

    Controlling QuickTime with Lingo or JavaScript syntax You can use Lingo or JavaScript syntax to control a QuickTime video’s appearance and sound volume. For QuickTime VR, you can use Lingo or JavaScript syntax to pan a QuickTime VR digital video and specify what happens when the user clicks or rolls over portions of the video. You can set the rotation, scale, and translation properties for either a QuickTime cast member or a sprite.
  • Page 251 • To determine the name of the handler that runs when the pointer leaves a QuickTime VR hotspot that is visible on the Stage, set the property. hotSpotExitCallback • To specify the ID of the current node that a QuickTime VR sprite displays, set the node QuickTime VR sprite property.
  • Page 252: Using Windows Media Files In Director

    Using Windows Media files in Director Director now fully supports Windows Media Video and Audio formats. Windows Media format is a high-quality, secure, and comprehensive digital media format available for streaming and download-and-play applications on Windows systems, set-top boxes, and portable devices. Windows Media format comprises Windows Media Audio and Video codecs, an optional integrated digital rights management (DRM) system, and a file container.
  • Page 253 In the Filename text box, choose the file to be associated with the cast member. You can type the name of the file, or browse for the file by clicking the “…” button. In the Name text box, type a name for the new Windows Media cast member. Setting Windows Media properties You can set Windows Media properties that determine the cast member name, how it is displayed in your movie, whether audio or video in the sprites created from the Windows Media cast...
  • Page 254: Using Dvd Media Content In Director

    Using the Windows Media video window The Windows Media window lets you preview Windows Media audio and video files. You can also control Windows Media sprites using the this window. For more information, see “Controlling Windows Media sprites using Lingo or JavaScript syntax” on page 254.
  • Page 255 Linking to DVD media content You can link to DVD media content by using the Insert menu or the DVD Editor, or you can use scripting to set the folder property value. Setting the folder property will allow Director to play DVDs from the hard drive or from the relative location of a movie/projector.
  • Page 256 Issues with Macintosh DVD folder pathnames On Macintosh computers, the format of the pathname for the folder property should use a forward slash ( / ) as the path’s delimeter, instead of the standard Macintosh delimiter colon ( : ). In addition, /volumes/ should be concatenated at the start of the pathname of the DVD folder.
  • Page 257: Cropping Digital Video

    Setting DVD Cast member properties The DVD Property inspector lets you set the options for audio, close captioning, volume and whether or not the cast member pauses during playing. To set DVD cast member properties: Select a DVD cast member on the stage or in the cast window. Select Window >...
  • Page 258: About Using Digital Video On The Internet

    Go to the Stage and drag any of the handles that appear on the selection rectangle that surrounds the video image. Director displays only as much of the movie image as can fit in the area that is defined by the selection rectangle.
  • Page 259: Synchronizing Video And Animation

    240. Using RealMedia content in Director The Macromedia Director Xtra for RealSystem Streaming Media (Xtra for RealMedia) adds RealAudio and RealVideo to the media types supported by Director and handles the playback of RealMedia content in the Shockwave Player using an embedded RealPlayer engine. Support for...
  • Page 260 This publication contains links to third-party websites that are not under the control of Macromedia, and Macromedia is not responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites.
  • Page 261 Select File > Import. Browse to one of these test files: If you have the Director MX CD, select a file in the Macromedia\Support\RealMedia folder. If you don’t have the Director MX CD, select the videotest.rm file in the RealPlayer 8 or RealOne Player installation folder.
  • Page 262 You can have as many RealMedia streams and cast members in your Director movie as you want, as long as you play them consecutively, not concurrently. This version of Director does not support playing multiple RealMedia cast members at the same time. RealMedia video The RealVideo portion of your RealMedia file is rendered offscreen, and there is no direct-to- Stage option.
  • Page 263 RealMedia stream playback In Director, RealMedia playback occurs at the cast member level, not the sprite level. Therefore, if you have two sprites of a cast member, and you apply a method or property to one of the sprites, the method applies to both sprites. For example, if you select the Display Real Logo check box (or call the corresponding script property in a script) for one of the sprites, the displayRealLogo...
  • Page 264 Authoring tips Review the following guidelines before you begin creating RealMedia cast members and assembling your movie. • Whenever possible, refer to sprites rather than cast members in Lingo or JavaScript syntax. Because future versions of Director may enable sprite-level playback of RealMedia cast members, referring to sprites may help ensure that your movies are forward-compatible with Director.
  • Page 265 To create a RealMedia cast member using Insert > Media Element: Select Insert > Media Element > RealMedia. On the Member tab in the Property inspector, enter the name of the RealMedia cast member and enter the URL, or use the “...” button to browse to the location of a local RealMedia file. Use the options on the RealMedia tab in the Property inspector to specify the properties of the cast member.
  • Page 266 Obtaining dynamic RealMedia cast member properties When a RealMedia cast member is initially created, the values that are listed in the Property inspector for the dynamic properties— , and —are placeholder height width rect duration values. After you play the cast member on the Stage or in the RealMedia viewer, the actual values for the properties are saved and appear in the Property inspector.
  • Page 267 The RealMedia tab in the Property inspector The RealMedia tab in the Property inspector displays the properties of RealMedia cast members. To set or change the editable properties, you can use the Property inspector or the script properties for RealMedia. Even if you are not planning to use the script properties, it is a good idea to read the script entries for the properties that appear in the Property inspector because they contain valuable information.
  • Page 268 • lets you specify a user name if the cast member references a protected userName (RealMedia) URL. For security purposes, after a user name has been entered, it cannot be retrieved. If this property has been set, the value that appears in the Property inspector is ********. •...
  • Page 269 RealMedia Slider Knob lets a graphic sprite function as a slider to control and monitor the playback location (current time) of the RealMedia sprite with the RealMedia Target behavior attached. When the user drags a sprite that has this behavior attached, a action is performed seek on the stream.
  • Page 270 Create a field on the Stage to display playback information about the RealMedia sprite similar to the information that appears in the status bar of the RealMedia viewer. Drag the RealMedia Stream Information behavior to the field; then select the type of information you want to display and the group that the behavior belongs to in the Parameters dialog box.
  • Page 271 The Xtra for RealMedia is not part of the standard Shockwave 8.5, but can be downloaded from the Macromedia website. The first time a user attempts to play Shockwave content that contains a RealMedia cast member, the Shockwave Player automatically downloads and installs the Xtra for RealMedia if you selected RealMedia Asset.x32 in the Movie Xtras dialog box.
  • Page 272: Using Lingo Or Javascript Syntax Sound Elements With Realmedia

    To add the Xtra for RealMedia to your movie: Select Modify > Movie > Xtras to display the Movie Xtras dialog box. Select RealMedia Asset.x32 in the list. If RealMedia Asset.x32 does not appear in the list, click the Add button, and select it in the Add Xtras dialog box.
  • Page 273 Unsupported sound elements The following Lingo or JavaScript syntax elements are not supported for RealMedia cast members or for sound channels playing the audio portion of a RealMedia stream: • breakLoop() • channelCount • endTime • getPlayList() • loopCount • loopEndTime •...
  • Page 274 Chapter 11: Using Digital Video...
  • Page 275: Chapter 12 Behaviors

    CHAPTER 12 Behaviors A behavior in Macromedia Director MX 2004 is prewritten Lingo or JavaScript syntax that you use to provide interactivity and add interesting effects to your movie. You drag a behavior from the Library palette and drop it on a sprite or frame to attach it.
  • Page 276 To attach a behavior to a single sprite or frame using the Library palette: Select Window > Library Palette. Select a library from the Library pop-up menu in the upper left corner of the palette. To view a brief description of included behaviors, move the pointer over a behavior icon. If the behavior includes a longer description, you can view it in the Behavior inspector or in Director Help.
  • Page 277 To attach a behavior to a frame in the behavior channel, drag a behavior from the Library palette to a frame in the behavior channel. Enter parameters for the behavior in the Parameters dialog box. Note: If you attach a behavior from a Director library of behaviors, the behavior is copied to the currently active cast.
  • Page 278: Changing The Order Of Attached Behaviors

    Changing the order of attached behaviors Director executes behaviors in the order they were attached to a sprite, and they are listed in this order in the Property inspector and Behavior inspector. It is sometimes necessary to change the sequence of behaviors so that actions occur in the proper order. To change the order of the behaviors attached to a sprite: Select the sprite in the Score or on the Stage.
  • Page 279: Creating And Modifying Behaviors

    Creating and modifying behaviors Without any scripting or programming experience, you can use the Behavior inspector to create and modify behaviors to perform basic actions. To create behaviors with more complex structures, you must understand scripting in Lingo or JavaScript syntax. Using the Behavior inspector is a good way to learn Lingo or JavaScript syntax.
  • Page 280 You can choose as many actions as you need for a single event. To change an existing event or action group, select an event from the list and then add or remove actions in the Actions list. To delete an event or action group, select the event and press Delete. To change the sequence of actions in an event or action group, select an event from the Events list, select an action from the Actions list, and then click the up and down arrows above the Actions list to change the order of actions.
  • Page 281: Writing Behaviors With Lingo Or Javascript Syntax

    Go to Marker moves the playhead to the specified marker. Go to Net Page goes to the specified URL. Wait on Current Frame waits at the current frame until another behavior or script advances to the next frame. Wait until Click waits at the current frame until the mouse button is clicked.
  • Page 282: Setting Up A Parameters Dialog Box

    • The behavior can have parameters that users edit from the Parameters dialog box. The optional handler sets up the Parameters dialog box. For more on getPropertyDescriptionList information, see the Scripting Reference topics in the Director Help Panel. • A description of the behavior can be added to the Behavior inspector. The optional handler displays a description of the behavior in the Behavior getBehaviorDescription inspector.
  • Page 283: Customizing A Behavior's Property

    Customizing a behavior’s property If a behavior’s script includes an handler, Director lets users on getPropertyDescriptionList set the property’s initial values from the Parameters dialog box. The behavior’s Parameters dialog box opens in three circumstances: • After the user drags a behavior to a sprite or frame •...
  • Page 284: Creating An On Getpropertydescriptionlist Handler

    • specifies a range of possible values that the user can assign to the property. Specify the #range possible values as a list. To specify a range between a minimum and maximum number, use the form [ #min:minimum, The example sets the range from 1 to 10. When the range is between a #max:maximum maximum or minimum number, the Parameters dialog box provides a slider that sets the value.
  • Page 285: Including A Description For The Behavior Inspector

    // JavaScript syntax function getPropertyDescriptionList() { var description = new Array(); description[#movement] = [:] description[#movement][#default] = 5 description[#movement][#format] = #integer description[#movement][#comment] = "Set motion to the right:" description[#movement][#range] = [#min:1, #max:10] description[#noise] = [:] description[#noise][#default] = "" description[#noise][#format] = #sound description[#noise][#comment] = "Sound cast member name"...
  • Page 286 description = [:] description[#movement] = \ [#default: 5, \ #format:#integer, \ #comment: "Set motion to the right:", \ #range: [#min:1, #max:10] \ description[#noise] = \ [#default:"", \ #format: #sound, \ #comment:"Sound cast member name" \ return description // JavaScript syntax function enterFrame() { if (sprite(spriteNum).locH >...
  • Page 287: Sending Messages To Behaviors Attached To Sprites

    Sending messages to behaviors attached to sprites Script can run handlers in behaviors attached to specific sprites by sending messages to the behaviors attached to one sprite, all sprites, or several specific sprites. Sending messages to a sprite method sends a message to a specified sprite. If none of the sprite’s behaviors has sendSprite a handler that corresponds to the message, the message passes to the cast member script, the frame script, and then the movie script.
  • Page 288 Sending messages to specific behaviors only method sends an event to specific behaviors. Unlike the method, the call sendSprite call method does not pass the message to frame scripts, scripts of the cast member, or movie scripts. Before sending a message to a specific behavior, check the sprite property scriptInstanceList to find a behavior script reference to use with the...
  • Page 289: Using Inheritance In Behaviors

    Using inheritance in behaviors Behaviors can have ancestor scripts in the same way that parent scripts do. (Ancestor scripts are additional scripts whose handlers and properties a parent script can call on and use.) • The ancestor’s handlers and properties are available to the behavior. •...
  • Page 290 Chapter 12: Behaviors...
  • Page 291: Chapter 13: Navigation And User Interaction

    CHAPTER 13 Navigation and User Interaction Adding interactivity lets you involve your audience in your Macromedia Director MX 2004 movies. Using the keyboard, the mouse, or both, your audience can download content from the Internet, jump to different parts of movies, enter information, move objects, click buttons, and perform many other interactive operations.
  • Page 292: Adding Push Buttons, Radio Buttons, And Check Boxes

    To use basic navigation behaviors: Create a movie that contains a sprite in frame 1 and at least one marker in a later frame. Select Window > Library Palette, and select the Navigation library. Drag to frame 1 in the script channel. Hold on Current Frame Typically, you use this behavior in a frame that requires user interaction such as selecting a menu command.
  • Page 293: Jumping To Locations With Lingo Or Javascript Syntax

    Jumping to locations with Lingo or JavaScript syntax The Lingo or JavaScript syntax navigation features can make a movie jump to other frames, to other movies, or to Internet movies and web pages. You can also use script to make a movie appear to pause by looping in one frame or a group of frames.
  • Page 294: Detecting Mouse Clicks With Lingo Or Javascript Syntax

    Jumping away and returning to the original location You might want a movie to jump to a different frame or a separate movie and then return to the original frame. For example, at a website that describes the weather, you could jump to a movie segment that explains a weather term and then return to the original location.
  • Page 295: Making Sprites Editable And Draggable

    Making sprites editable and draggable Using the Property inspector, you can make a sprite editable, draggable, or both while your movie is running. For more information, see “Displaying and editing sprite properties in the Property inspector” on page To make a sprite draggable on the Stage: •...
  • Page 296: Checking Which Text Is Under The Pointer With Lingo Or Javascript Syntax

    Checking which text is under the pointer with Lingo or JavaScript syntax Lingo or JavaScript syntax can detect which text component in a text or field cast member is currently under the mouse pointer. For more information, see the Scripting Reference topics in the Director Help Panel.
  • Page 297: Finding Mouse Pointer Locations With Lingo Or Javascript Syntax

    • To set up script that runs when the mouse pointer is within a sprite’s bounding rectangle when the playhead enters the frame that contains the sprite, place the script in an on mouseWithin event handler. event can occur repeatedly as long as the mouse pointer remains mouseWithin inside the sprite.
  • Page 298: Equivalent Cross-Platform Keys

    Equivalent cross-platform keys Because of inherent differences between Windows and Macintosh keyboards, keys on Windows and Macintosh computers don’t always correspond directly. This discrepancy can create confusion because script often uses the same term to refer to corresponding keys on Windows and Macintosh computers, even though the key’s name differs on the two platforms.
  • Page 299: Creating An Animated Color Cursor Cast Member

    Xtra extensions that support animated cursors The Director installation program places two animated color cursor files in the Media Support folder within the Director application’s Xtras folder. The specific files depend on the platform you are using. Windows PowerPC Purpose Cursor Options.x32 Cursor Options This file supports the creation of cursors while you author movies in Director.
  • Page 300 To create an animated color cursor cast member: Select Insert > Media Element > Cursor. Director opens the Cursor Properties Editor, which you use to set up the cursor. From the Cast pop-up menu, select the cast that contains the cast member you want to add as a frame in your cursor.
  • Page 301: Using An Animated Color Cursor In A Movie

    Using an animated color cursor in a movie After you add an animated color cursor to the cast, use script to switch to the animated cursor as you would any other cursor. You can set up an animated cursor as the movie’s cursor or a sprite’s cursor.
  • Page 302 Chapter 13: Navigation and User Interaction...
  • Page 303: Chapter 14: 3D Basics

    CHAPTER 14 3D Basics Macromedia Director MX 2004 lets you bring robust, high-performance 3D graphics to the web. With Director, you can develop a wide spectrum of 3D productions, ranging from simple text handling to interactive product demonstrations to complete immersive game environments.
  • Page 304: About 3D In Director Mx 2004

    About 3D in Director MX 2004 The following are the main components that are common between Director MX 2004 and earlier versions of Director: • The Stage is the authoring area in which the Director movie is assembled. • The Score displays the arrangement of channels that organize, display, and control the movie over time.
  • Page 305: The 3D Xtra

    • The Behavior inspector lets you create and modify behaviors. For an introduction to the Behavior inspector, see “3D behaviors” on page 312. For a full discussion, see “Using 3D behaviors” on page 327. • Director provides easy but powerful 3D text handling. For more information, see “Creating 3D text”...
  • Page 306: Using The Shockwave 3D Window

    Using the Shockwave 3D window The Shockwave 3D window provides an easy way for you to inspect a 3D cast member. Some properties of 3D cast members can also be edited in this window. To use the Shockwave 3D window: Select a 3D cast member in the cast.
  • Page 307 Use the following controls: The camera buttons along the side—Dolly, Rotate, and Pan—let you change your viewing angle by zooming in and out, moving around the world origin, and moving in a straight line horizontally or vertically, respectively. Hold the Shift key while using these tools to make the camera move faster.
  • Page 308: Using The Property Inspector For 3D

    Using the Property inspector for 3D With the Property inspector, you can modify the 3D cast member without using script. The 3D Model tab of the Property inspector offers a simple way to view and control numerous aspects of the 3D world. To view the 3D Model tab: Open the Cast window if it isn’t already open.
  • Page 309: Using Rendering Methods

    • The Director Light area lets you select one of ten lighting positions to apply to a single directional light. You can also adjust the color for the ambient light. (Directional light comes from a particular, recognizable direction; ambient light is diffuse light that illuminates the entire scene.) Finally, you can adjust the background color of the scene.
  • Page 310: Using 3D Anti-Aliasing

    To choose a rendering method: Select the Stage. Open the Property inspector. Click the Movie tab. Select a rendering method from the pop-up menu. If you don’t select a rendering method, Director defaults to #auto Below the pop-up menu, the name of the active 3D renderer property appears. The value of this property indicates which rendering method is currently being used.
  • Page 311 Determining whether anti-aliasing is supported Not all 3D renderers can perform the additional calculations that anti-aliasing requires. If you have a 3D sprite that you want to anti-alias, check first that the 3D renderer supports anti-aliasing. The renderers that currently support anti-aliasing include the Director software renderer, and DirectX 5.2 and DirectX 7.0.
  • Page 312: 3D Behaviors

    on mouseUp -- stop animation -- the interaction/animation has ended so turn -- anti-aliasing ON sprite(1).antiAliasingEnabled = TRUE // JavaScript syntax function mouseDown() { // user interaction/animation is about to start so turn // anti-aliasing OFF sprite(1).antiAliasingEnabled = false; //start animation function mouseUp() { // stop animation // the interaction/animation has ended so turn...
  • Page 313: The 3D World

    The 3D world This section provides a brief overview of the contents of 3D cast members. For more detailed information, see “About the 3D cast member” on page 315. Each 3D cast member contains a complete 3D world. It can contain models (the objects that viewers see within the world) that are illuminated by lights and viewed by cameras.
  • Page 314 Lights and cameras Lights are used to light the 3D world. Without lights, the objects within the world can’t be seen. Although lights control the appearance of the 3D world, cameras control how a sprite views the 3D world. A 3D sprite displays a particular camera’s view into the world. For more information, “About lights and cameras”...
  • Page 315: Chapter 15: The 3D Cast Member, 3D Text, And 3D Behaviors

    3D cast member. You can apply behaviors to the 3D text, manipulate it with Lingo or JavaScript syntax, and view and edit it in the Macromedia Shockwave 3D window. You can also add extruded 3D text to a 3D cast member.
  • Page 316: Model Resources

    • Cameras are views into the 3D cast member. Each sprite that uses a given cast member can display the view from a different camera. For more information about sprites, see Chapter 14, “3D Basics,” on page 303. • Groups are clusters of models, lights, and/or cameras that are associated with one another. This makes moving the associated items much easier;...
  • Page 317 The following cast member methods and properties perform basic model resource operations: Method Function Returns Returns the number of model resource Integer. modelResource. count objects included in the cast member. Returns the model resource named Returns the model resource modelResource(name) name object named , if it exists.
  • Page 318: Models

    Models The models in a cast member are the actual visible objects that are seen in the 3D cast member. Models move according to the motions you assign to them in your 3D modeling software, and according to animation scripts that you write. Their movement results from repositioning and reorienting their geometries in 3D space.
  • Page 319: Shaders

    Method Function Returns Creates a copy of the model named Returns the model named model(name1) name1 clone and assigns it the name . The new name2. Deep(name2) name2 model uses a copy of the original model’s model resource and shader; changes to the original model’s model resource and shader have no effect on the new model.
  • Page 320: Textures

    Method Function Returns deleteShader Deletes the shader named . Script if the shader named name TRUE (1) (name) references to this shader persist but can exists. if the name FALSE (0) do nothing. shader named doesn’t name exist. Deletes the shader with the given index if the shader with this deleteShader TRUE (1)
  • Page 321: Motions

    Motions A motion is an animation of a model. Motions can be shared by multiple models. A 3D cast member contains a palette of motions that are available to any model in the world. The following cast member methods and properties can be used to perform basic motion operations: Method Function...
  • Page 322: Cameras

    The following methods and properties can be used to perform basic light operations: Method Function Returns Returns the number of light objects included Integer. light.count in the cast member. Returns the light named Returns the light object named light(name) name if it exists.
  • Page 323: Groups

    Method Function Returns Deletes the camera named . Script if the camera named deleteCamera name TRUE (1) references to this camera persist but can exists. name name FALSE (0) do nothing. the camera named name doesn’t exist. Deletes the camera with the given index if the camera with deleteCamera TRUE (1)
  • Page 324: Creating 3D Text

    Creating 3D text To create 3D text, you first create 2D text, and then you convert the text to 3D. Note: Alternatively, you can use the method of a 3D cast member to create an extruded- extrude3d() text model resource in the cast member. To create 3D text: Select Window >...
  • Page 325: Script And 3D Text

    Select from among the Front Face, Back Face, and Tunnel check boxes. These options control which sides of the text appear. Set the smoothness. This determines the number of polygons that are used to construct the text. The more polygons that are used, the smoother the text appears. Set the tunnel depth.
  • Page 326 Exceptions The following methods and properties work differently when used with 3D text. Type of Script Element Member property antiAlias Member property antiAliasThreshold Member property picture Member property preRender Member property scrollTop Member property useHypertextStyles Member property autoTab Member property boxType #scroll Member command scrollByPage...
  • Page 327: Using 3D Behaviors

    These properties can be set while the text is in 2D mode. They have no visible effect until the text appears in 3D mode. When you access the properties listed in the following table for an extruded 3D text model that you created by using the method, you must refer to the model resource of the text.
  • Page 328 Behavior types Director provides two types of 3D behaviors: trigger and action. Action behaviors are divided into three types: local, public, and independent. These behavior types and subtypes are defined in the following table. Type Function Trigger behavior A behavior that sends an event, such as a mouse click, to an action behavior Local action behavior A behavior that is attached to a particular sprite and that can...
  • Page 329 The following table describes the available triggers. Name Description Mouse Left Triggers action when the user presses, holds down, or releases the left mouse button (Windows) or the mouse button (Macintosh). Mouse Right Triggers action when user presses, holds down, or releases the right mouse button.
  • Page 330 Local actions When you attach a local action to a sprite, that action responds only to a trigger that is attached to that same sprite. The following table describes the available local actions. Name Effect Description Create Box Primitive Adds a box to the 3D world each time the trigger action occurs. The author can set the dimensions and texture.
  • Page 331 Name Effect Description Pan Camera Camera Pans along the horizontal axis by a specified number of degrees Horizontal each time the trigger action occurs. Panning left and panning right require separate triggers. Pan Camera Camera Pans along the vertical axis (up and down) by a specified number Vertical of degrees each time the trigger action occurs.
  • Page 332 Applying 3D behaviors You apply 3D behaviors in the same way as standard behaviors in Director. You can attach as many behaviors to a sprite as needed, but each behavior that requires a trigger must have a unique trigger to activate it. To apply a 3D behavior: Open the Library palette.
  • Page 333 For local behaviors, attach a trigger behavior to the same sprite. For public behaviors, attach a trigger behavior to a specific sprite. The Parameters dialog box appears. You can use this dialog box to control when the trigger should work; what modifier keys, if any, are associated with the trigger; and to which sprite group the trigger is assigned.
  • Page 334 Chapter 15: The 3D Cast Member, 3D Text, and 3D Behaviors...
  • Page 335: Chapter 16: Working With Models And Model Resources

    This chapter covers the Lingo or JavaScript syntax methods and properties used to work with models and model resources, as well as lights and cameras to enhance Macromedia Director MX 2004 three-dimensional (3D) movies. For more information about the methods and properties listed here, see the Scripting Reference topics in the Director Help Panel, where you can find syntax, definitions, and examples.
  • Page 336: Model Resources

    Model resources Model resources are 3D geometries defined in 3D modeling software or created in Director MX 2004 by scripting in Lingo or JavaScript syntax. A model is an object that makes use of a model resource’s geometry and occupies a particular position and orientation within the 3D world. Model resources are viewable only when in use by a model.
  • Page 337: Primitives

    Primitives Each type of primitive has its own set of methods and properties used to define its appearance. Use the method to create the various primitives at runtime. Exceptions newModelResource() include mesh model resources, which require you to use the method, and extruder newMesh() resources, which require you to use the...
  • Page 338 Property Access Description Value Range resolution Get and set Number of polygonal segments around An integer value the circumference of the circle. Controls greater than 1. the smoothness of the cylinder’s appearance. Get and set Height of the cylinder along the z-axis. Positive floating-point height value.
  • Page 339 Property Access Description Value Range lengthVertices Get and set Number of vertices along the length of the or more. The default box. Increasing the number of vertices improves lighting effects. Get and set Number of vertices along the width of the or more.
  • Page 340 Use these properties to work with mesh primitives: Property Access Description Value Range Get and set Vector values for each vertex in the mesh. Set the value to the vertexList Several faces may share a single vertex. number of vectors specified in your call.
  • Page 341 Property Access Description Value Range face[index]. Get and set List indicating which normals to use for Set the value to a list normals faces at designated index points. of three integers specifying the indexes of the normals in the that each normalList point of the triangle should use.
  • Page 342 Mesh generator methods Use these methods to work with mesh primitives: Method Description Returns build() Builds the mesh according to the current property Nothing values. (The mesh construction properties specified in the previous table have no effect until build() is called.) Generates a script error if any properties specify an invalid list.
  • Page 343 Property Access Description Value Range sizeRange. Get and set Size of a particle at the end of its life. The Positive integer. The size is linearly interpolated between default is startSize endSize Get and set Opacity of a particle at the start of its life. Any value between blendRange.
  • Page 344 Property Access Description Value Range emitter. Get and set Vector positions that define the path the Vector list. path particles follow. Get and set Degree to which particles remain on a Percentage between emitter. path path. 100.0 Strength Get and set Minimum emission speed.
  • Page 345: Cast Member Methods

    Cast member methods If the models and model resources you need aren’t contained in a particular cast member, the following methods let you create models and model resources using other 3D cast members at runtime. Method Description Returns This method loads a W3D format file from Nothing if the loadFile (fileName,...
  • Page 346: Models

    Method Description Returns newModel Creates a new model resource and adds it to the New model resource Resource(name, model resource palette. The can be object type #plane type) , or #box #sphere #cylinder #particle cannot be . To create a new mesh type #mesh model resource, use the...
  • Page 347 Node types A model is one of four types of objects that share the same transform, parent, and child properties. The others are cameras, lights, and groups. Models, cameras, lights, and groups are generically referred to as node types or nodes. Nodes can be each other’s parents or children, so long as any one node has exactly one parent.
  • Page 348 Property Access Description Value A list containing a vector and a floating-point bounding [vector value. The vector represents the world Sphere (0,0,0), 0.0] position and the value represents the radius of a bounding sphere surrounding the model and all its children. Get and set Position of the model in world coordinates.
  • Page 349 Model methods Use these methods to work with models: Method Description Returns Adds to this model’s list of children. An Nothing addChild(aNode, aNode equivalent operation is to set to equal preserveWorld) aNode.parent this model argument is optional. It can preserveWorld have two values: #preserveWorld .
  • Page 350 Method Description Returns Returns a Boolean value indicating if the model is isInWorld() TRUE (1) currently in the world (TRUE) or not (FALSE). This FALSE (0) is useful for detecting if a given node's parent- heirarchy tree terminates with the world group object or not.
  • Page 351 Method Description Returns Rotates the model around the axis vector in the Nothing rotate (position, specified position the specified number of degrees. axis, angle, argument is optional and relativeTo) relativeTo defaults to #self Scales the model the same amount in all directions. Nothing scale(uniform Scale) Scales the model by a factor of...
  • Page 352: Shaders

    car.child[1].rotate(0,10,0, #self) where the fourth parameter of the method is the object the rotation should be rotate relative to. • Parent-relative: A model’s property expresses its position and rotation relative to transform the model’s parent. If you want the wheels of the car to move outward regardless of how the wheels are turned, use car.child[1].translate(10,0,0,#parent) .
  • Page 353 Property Name Access Description Default shininess Get and set An integer between indicating 30.0 how shiny a surface is. emissive Get and set A color object describing the color of color(0,0,0) light this object seems to give off. This does not turn the surface using this shader into a light source;...
  • Page 354 Property Name Access Description Default textureList Get and set A shader can use up to eight layers of void [index] textures. This property gives access to the texture at the indicated index position. Get and set This property allows access to the void texture texture for the first layer.
  • Page 355 Property Name Access Description Default Get and set This property allows access to the #none textureMode texture coordinate generation method List[index] used for a texture at the texture level and then to allows you to change how textures are applied to a model’s surface.
  • Page 356 Property Name Access Description Default Get and set Controls the orientation of UV transform(50.0 wrapTransform 000,0.0000,0.0 generation in model space. List 000,0.0000, Get: Returns a list of texture coordinate 0.0000,50.0000 generation transforms, one per layer. ,0.0000,0.0000 Set: Specifies a texture coordinate 0.0000,0.0000, generation transform to be applied to all 50.0000,0.0000...
  • Page 357 Property Name Access Description Default Get and set Access to the blending method blendFunction #multiply associated with a texture layer at the List[index] position indicated by , which must index be a positive integer smaller than or equal to 8. Possible values are as follows: #replace #multiply...
  • Page 358 Property Name Access Description Default Get and set The blending ratio used for a specific 50.0 blendConstant layer when the blend method is set to List[index] #blend blendSourceList[index] set to . Returns a floating- #constant point value from 100.0 Get and set The blending ratio used for any layer 50.0 blendConstant...
  • Page 359 Properties of the painter shader shader gives the model a painted effect. Use these properties to work with the #painter painter shader: Property Access Description Default Get and set Name of shader None name Get and set Possible values: style #gradient : sharp transitions between #toon...
  • Page 360: Textures

    Properties of the engraver shader shader gives the effect of an engraved metal surface. You can control the size and #engraver number of etched lines by adjusting the properties, respectively. Use brightness density these properties to work with the engraver shader: Property Access Description...
  • Page 361 Property Access Description Default width Width, in pixels. None height Height, in pixels. None quality Get and set Property with the following #medium possible values: : texture is not mipmapped #low : mipmapping is at a low bilinear #medium setting (default) : the mipmapping is at a high #high trilinear setting...
  • Page 362 Property Access Description Default compressed Get and set The property can be TRUE (1) TRUE (1) FALSE : the texture is compressed TRUE (1) : the texture is not FALSE (0) compressed The value changes automatically from when the texture TRUE (1) FALSE (0) is to be rendered.
  • Page 363: Groups

    Groups Groups have many of the same properties and methods as models, except that you need to substitute the word for the word when writing scripts. A group is a node that can group model have a parent and/or children. These can be models, lights, cameras, or other groups. Group properties The properties of the group determine its particular appearance and relationship to the rest of the 3D world.
  • Page 364 Group methods Use these methods to work with groups: Method Description Returns addChild(aNode, Adds to this group’s list of children. An Nothing aNode preserveWorld) equivalent operation is to set to equal aNode.parent this group argument is optional. It can have preserveWorld two values: .
  • Page 365 Method Description Returns registerScript Registers a handler named that is called Nothing handlerName (eventName, in the when the member method scriptInstance handlerName, is called with as an argument. sendEvent() eventName scriptInstance) is 0, a movie script handler is called. scriptInstance The user defines what is.
  • Page 366: Modifiers

    Method Description Returns pointAt(world Rotates the model until it points at the world-relative Nothing Position, worldUp) position worldPosition. The optional argument worldUp gives the general position of the model’s Up axis. The exact position can’t be determined using this method. Both the object-relative axes are defined by the property.
  • Page 367 Use these properties to work with the level of detail modifier: Property Access Description Default Get and set means that polygons are whichModel.lod.auto TRUE (1) TRUE (1) automatically reduced based on the distance from the camera. The fewer polygons that are drawn, the faster performance will be.
  • Page 368 Toon modifier properties The toon modifier changes a model’s rendering to imitate a cartoon drawing style. Only a few colors are used, and the model’s shader, texture, and related properties are ignored. Use these properties to work with the toon modifier: Property Access Description...
  • Page 369 Use these properties to work with the inker modifier: Property Access Description Default Get and set Color object describing line color Black whichModel. inker.lineColor (rgb 0,0,0) Get and set value indicating whichModel. TRUE (1) TRUE (1) FALSE (0) inker. presence or absence of lines around silhouettes silhouettes Get and set...
  • Page 370 Property Access Description Default whichModel.sds.tension Get and set Percentage of matching between modified and original surfaces. Get and set Percentage of error tolerance. This whichModel.sds.error property applies only if sds.subdivision equals #adaptive Collision modifier properties The collision modifier allows a model to be notified of and respond to collisions. You can access a model’s collision modifier properties using syntax such as model.collision.
  • Page 371 Property Access Description Default whichModel.collision.i Get and set value indicating FALSE (0) TRUE (1) FALSE (0) mmovable whether the model can be moved. If a model cannot be moved, the 3D Xtra can save time by not checking it for collisions with other models that also have their property set to...
  • Page 372: Animation Modifiers

    Collision modifier events These events are generated when collisions occur: Event Name Description #collideAny The first event called when any collision occurs. The event called whenever a collision with a specified model occurs. It is #collideWith implicitly registered for when is called.
  • Page 373 You can add the Keyframe player modifier at runtime to a model created in Director, but you cannot add the Bones player modifier at runtime. The Bones player modifier is automatically attached to models with bones animation exported from a 3D modeling application. Since the required bones information can’t be assigned in Director, it has to exist before the model is imported into Director.
  • Page 374 Bones player properties Use these properties to work with bones animations: Property Access Description Default whichModel.bonesPlay = playing; = paused. TRUE (1) TRUE (1) FALSE (0) er.playing A linear list of property lists, where each Empty list [] whichModel. bonesPlayer. property list yields the parameters for playList the currently playing and queued...
  • Page 375 Property Access Description Default whichModel. Get and set , automatic linear blending (from TRUE (1) TRUE bonesPlayer. 0.0 to 100.0) is applied over the blend autoBlend time. Otherwise, is ignored, blendTime and the amount of blending is user- determined by the blendFactor property.
  • Page 376 Property Access Description Default whichModel. Get and set Normally a model snaps back to its #all bonesPlayer. original rotation after a motion finishes rotationReset playing. This property maintains any or all of the rotational changes after playing is complete. The values are as follows: #none #all Get and set...
  • Page 377 Keyframe player methods Use these methods to work with keyframe animations: Method Description Returns Plays the motion named starting at Nothing whichModel.keyframePlayer.play name ("name", looped, startTime, endTime, the time , with the currently startTime playRate, timeOffset) playing motion being pushed down the play list.
  • Page 378 Keyframe player properties Use these properties to work with keyframe animations: Property Access Description Returns whichModel. = playing; = paused. TRUE (1) TRUE (1) FALSE (0) keyframePlayer. playing A linear list of property lists, where each Empty list [] whichModel. keyframePlayer.
  • Page 379 Property Access Description Returns whichModel. Get and set The degree of blending keyframePlayer. between motions, expressed as a blendFactor floating-point value between 100.0 A value of uses all the previous motion. A value of uses all of the 100.0 next motion. can be changed blendFactor frame by frame to create custom...
  • Page 380 Keyframe player events These events are generated by keyframe animations: Event name Description #animation This is a system-defined notification event triggered when a motion Started begins playing. If looping is on, this event is triggered only by the first playthrough. During a blend of two animations, this event will be triggered as the blend begins.
  • Page 381: Motions

    Property Access Description whichModel. Returns a list of three indexes into the vertex, meshDeform. normal, texture coordinate, and color lists. These mesh[index]. indexes correspond to the corners of the face for the face[index] specified mesh. Returns a list of lists describing the neighbors of a whichModel.
  • Page 382: About Lights And Cameras

    Motion methods Use this method to work with motions: Method Description map(motion, "bone name") Maps the given motion into the current motion beginning at the named bone. If no bone name is specified, the mapping begins at the root bone. method will replace any motion tracks mapped map() previously to the specified bone and all of its children.
  • Page 383: Light Properties

    Light properties Use these properties to work with lights: Property Name Access Description Default Unique name of this light. None name If the light was exported from a 3D modeling package, the name is the name assigned there. parent Get and set The model, light, camera, or group that is Group ("World")
  • Page 384: Light Methods

    Property Name Access Description Default spotAngle Get and set Angle of the light’s projection cone. 90.0 If type equals , setting a value less #spot than the umbra causes a “property not found” error. Get and set A three-value vector controlling the attenuation vector (1.0,0.0,0.0)
  • Page 385 Method Description Returns clone(name) Clones a light named , adds it to light’s parent’s child Light object name list, and adds it to the world. All children of the light are automatically cloned.This can be avoided by removing the children, performing the cloning operation, and then adding the children back.
  • Page 386: Cameras

    Method Description Returns translate(x,y,z, Moves the light distance along the x-axis, distance along Nothing relativeTo) the y-axis, and distance along the z-axis. The relativeTo argument is optional and defaults to #self This method can also be written as translate (vector(x,y,z) relativeTo) Rotates the light by degrees around the x-axis, y degrees Nothing...
  • Page 387 Camera properties Use these properties to work with cameras: Property Name Access Description Default Get and set Unique name of this camera. None name If the camera was exported from a 3D modeling program, the name is the name assigned there. Get and set The model, light, camera, or group parent...
  • Page 388 Property Name Access Description Default colorBuffer. Get and set TRUE (1) TRUE (1) FALSE (0) clearAtRender value indicating whether color buffer is or isn’t cleared out after each frame. If value is set to , the effect FALSE (2) is similar to the trails ink effect, although it requires a semi- transparent model behind the whole scene.
  • Page 389 Property Name Access Description Default overlay[index]. Get and set Location, in pixels, of the overlay, as point(0,0) measured from the upper left corner of the sprite’s to the rect overlay[index].source’s regPoint Get and set Texture object used as the source for None overlay[index].
  • Page 390 Property Name Access Description Default boundingSphere A list containing a vector and a [vector (0,0,0), 0.0] floating-point value, with the vector representing the position and the value the radius of a bounding sphere surrounding the camera and all its children. Get and set Position of the camera in world Vector object...
  • Page 391 Method Description Returns isInWorld() Returns a Boolean value indicating if the camera is TRUE (1) currently in the world (TRUE) or not (FALSE). This is FALSE (0) useful for detecting if a given node's parent-heirarchy tree terminates with the world group object or not. Registers a handler named that is called in Nothing...
  • Page 392 Chapter 16: Working with Models and Model Resources...
  • Page 393: Chapter 17: Controlling The 3D World

    CHAPTER 17 Controlling the 3D World Macromedia Director MX 2004 provides powerful methods for overall control of the three-dimensional (3D) world, including Lingo and JavaScript syntax for handling new 3D- generated events, selecting models (picking), vector math operations, and transforms. In addition, the properties and methods of the Director global renderer services object supply common rendering properties for all 3D sprites and cast members.
  • Page 394: Collisions

    Use these methods to set up event handling: Method Description Returns The event is one of the following: if the registerForEvent eventName TRUE (1) (eventName, operation succeeds. : Called when any collision occurs. #collideAny handlerName, if the : Called when a collision with a specific FALSE (0) #collideWith scriptInstance,...
  • Page 395 These properties are included in the object passed to the handler: collisionData Property Access Description One model in the collision. modelA If the script includes registration for collision with a particular model, is that model. modelA The second model in the collision. modelB Vector describing world-space location of collision.
  • Page 396 Camera methods These camera methods let you determine which models have been clicked when a user clicks the mouse within a 3D sprite. You can also translate coordinates in 3D space to coordinates in 2D sprite space and vice versa. Method Description Returns...
  • Page 397: Vector Math

    Vector math A 3D vector describes both direction and location in 3D space. Vector objects include floating- point values for position along each of the x-, y-, and z-axes. Vectors can be node-relative or world-relative. If they are node-relative, their x, y, and z values are relative to the position of the node.
  • Page 398 Vector methods Use these methods to work with vectors: Method Description Returns normalize() Normalizes the vector by modifying it into a unit vector of Nothing. Vector is length 1. This is done by dividing each component of the modified. vector by the vector’s original length. That original length is the square root of the sum of the squares of each component.
  • Page 399: Transforms

    Operator Description Returns vector2/scalar Returns a new vector equaling A new vector object vector2/scalar transform* Returns a new vector resulting from applying the A new vector object vector positional and transformation changes defined by . Note that vector*transform is an transform vector invalid operation.
  • Page 400 Property Access Description Default rotation Get and set Script vector object describing the vector (0,0,0) , and xRotation yRotation zRotation components of the transform with the value vector(xRotation, yRotation, , with the rotation values zRotation) defined in degrees. This value can vary because of the permissible types of transform operation.
  • Page 401 Transform methods Use these methods to work with transforms: Method Description Returns Applies a rotation transformation after the current Nothing rotate (xAngle, transformation: yAngle, zAngle) model.transform.identity() model.transform.translate(100,0,0) model.transform.rotate(0,0,90) After this series of transformations, performed in this order, the model’s local origin will be at , assuming the model’s (0,100,0) parent is the world.
  • Page 402 Method Description Returns preTranslate Translates the position of the transform before the current Nothing (xIncrement, transformation: yIncrement, model.transform.identity() zIncrement) model.transform.rotate(0,90,0) model.transform.translate(100,0,0) After this series of transformations, performed in this order, the model’s local origin will be at , assuming the model’s (0,0,100) parent is the world.
  • Page 403: Rendering Functionality

    Transform operator Use the asterisk (*) to multiply two transforms: Operator Description Returns transform1 * Returns a new transform that is the product of the two original A new transform transform2 transforms. Useful for combining the effects of two object transforms.
  • Page 404 Property Access Description Default modifiers A list of modifiers available for 3D cast None members. Possible values are as follows: #lod #toon #sds #bonesPlayer #keyframePlayer #inker #collision #meshDeform primitives A list of basic 3D shapes available for all None 3D cast members. Possible values are as follows: #box #sphere...
  • Page 405 Property Access Description Default colorBuffer Either 16 or 32, depending on the None Depth hardware card. Controls the precision of the hardware output buffer. Returns a A property list with the following entries: getHardware Info() property list of the if the card is present; #present TRUE (1) specifics of the...
  • Page 406 Cast member properties You can control most cast member properties using the Property inspector. For more information, “Using the Property inspector for 3D” on page 308. Use the following properties to work with 3D cast members in script: Property Access Description Default preload...
  • Page 407 Property Access Description Default diffuseColor Get and set Diffuse color of first shader: the shader’s rgb(255, 255,255) overall color. Get and set Default texture type for world. Values are as textureType #default follows: : no texture #none : use original texture from Shader #default : use image from specified #member...
  • Page 408 Sprite properties You can control the properties using the Property inspector. For directToStage bgColor more information, see “Using the Property inspector for 3D” on page 308. Use the following properties to work with 3D sprites in scripts.: Property Access Description Default Get and set specification of...
  • Page 409: Chapter 18: Movies In A Window

    You can create and control movies in windows using behaviors from the Behavior Library or by writing your own scripts. Macromedia Shockwave does not support MIAWs. Use MIAWs only with movies that you intend to distribute as projectors (see “About distribution formats” on page 451 “About projectors”...
  • Page 410: About Miaws

    About MIAWs A MIAW is the combination of a window object and a movie object. In fact, there is no such thing as a MIAW object, but it is the name used to describe the concept of this unique combination of window and movie objects. Most of the properties described in this section are really window properties, but apply to a MIAW.
  • Page 411 To open a MIAW: • Use the following script: -- Lingo window().new("movieName") window("movieName").open() -or- window().new("movieName").open() // JavaScript syntax new window("movieName"); window("movieName").open(); -or- new window("movieName").open(); Unless you explicitly preload the movie through scripting, Director doesn’t load the movie into memory until the window is opened, which can cause a noticeable pause. To load the first frame of the movie, use the method.
  • Page 412: Setting The Window Size And Location For A Miaw

    Setting the window size and location for a MIAW Setting the screen coordinates for a MIAW lets you control the size of the window and where it appears. Setting the coordinates before the movie appears controls the initial position of the window;...
  • Page 413: Controlling The Appearance Of A Miaw

    Controlling the appearance of a MIAW You can control the appearance of a MIAW by setting different appearance properties. You can do this by using Lingo or JavaScript syntax. Some default appearance properties can also be set by using the Display Template tab found in the Property inspector. You can set the type of window you want—for example, a tool window—and how it will behave and act.
  • Page 414 Minimize Box determines if a minimize box appears in the title bar. For example: window("window_name").titlebarOptions.maximizebox = true Visible determines whether the title bar of a window is visible. When you set this property to false, the other options (Maximize Box, Close Box, and so forth) remain untouched. The next time the window’s title bar is visible, all other title bar properties are maintained.
  • Page 415 Window appearance methods There are several new window appearance methods in Director MX 2004 that apply to MIAWs. For more information about these methods, see the Scripting Reference topics in the Director Help Panel. The following are three of these methods: •...
  • Page 416: Controlling Miaw Layering

    Controlling MIAW layering To control whether a movie appears in front of or behind other windows: • Use the methods. For more information about these moveToFront() moveToBack() methods, see the Scripting Reference topics in the Director Help Panel. This code moves a MIAW to the front: window("miaw").moveToFront() This code moves a MIAW to the back: window("miaw").moveToBack()
  • Page 417: Listing The Current Miaws

    For more information, see the Scripting Reference topics in the Director Help Panel. Listing the current MIAWs property displays a list of all known MIAWs in the main movie. For example, windowList the following statement displays a list of current MIAW names in the Message window: put_player.windowList For more information about this property, see the Scripting Reference topics in the Director Help Panel.
  • Page 418 Chapter 18: Movies in a Window...
  • Page 419: Chapter 19: Using The Xml Parser Xtra

    CHAPTER 19 Using the XML Parser Xtra The XML Parser Xtra lets Macromedia Director MX 2004 movies read, parse, and use the contents of Extensible Markup Language (XML) documents. Using the XML Parser Xtra requires that you understand the structure and content of the documents you are parsing. You can then access the XML document’s contents through Lingo or JavaScript syntax or convert the contents...
  • Page 420: Using Xml Parser Objects

    There are many sources of information for understanding, creating, and editing XML on the Internet. The following websites offer useful information about XML: • www.xml.com • www.ucc.ie/xml/ • www.w3.org/TR/REC-xml • www.w3.org/DOM/ Using XML parser objects The XML Parser Xtra lets Director developers access the nodes of an XML document. A node can be a tag (similar to an HTML tag, also called an element), character data (text that does not appear inside the angle brackets of a tag), or a processing instruction (a special type of tag that passes data to the parsing application for special processing).
  • Page 421 The following example shows a short XML document: <?xml version="1.0"?> <e1><tagName attr1="val1" attr2="val2"/><e2>element 2</e2><e3>element 3</e3> </e1> The following example is the same XML with its tree structure shown more clearly: <?xml version="1.0"?> <e1> <tagName attr1="val1" attr2="val2"/> <e2>element 2</e2> <e3>element 3</e3> </e1>...
  • Page 422: Using Xml Document Nodes

    errCode = gParserObject.parseString(member("XMLtext").text) theList = gParserObject.makeList() After this code has been executed, the variable contains the parsed node structure gParserObject of the XML document, and the variable is a property list that contains all the theList information in the document broken into property name and value pairs. All the regular script methods for sorting and accessing lists can work normally with theList Using XML document nodes...
  • Page 423 Using this XML document as a starting point, the following examples demonstrate how to use these script terms to access the data within various node levels of the XML structure. The XML looks like the following example: <?xml version="1.0"?> <e1> <tagName attr1="val1"...
  • Page 424: Accessing Attributes

    This script returns the text of the fourth child of the tag, as shown in the following example: put gParserObject.child[1].child[4].text -- " here is some text " The text element includes the white space for Return, Space, and Tab characters as well as the string "here is some text"...
  • Page 425: Treating White Space

    The following script returns the root node’s type, name, and number of children: put gParser.type, gParser.name, gParser.count(#child) -- #element "ROOT OF XML DOCUMENT" 1 The main difference between the root node and its child nodes is that there are several script methods that apply to the entire XML document and operate on the root node only.
  • Page 426 This requirement applies to documents parsed by as well as files that are parsed parseString() parseURL() The XML Parser Xtra supports the following character sets: • ISO-8859-1 Also called Latin 1. This is the most common Western encoding used on the web.
  • Page 427: Chapter 20: Making Director Movies Accessible

    CHAPTER 20 Making Director Movies Accessible As a Macromedia Director MX 2004 author, you might want to provide ways for computer users with disabilities to experience the movies that you create. Director includes accessibility features that let you do this. By using these features, you can make existing and new movies accessible to users who have hearing, visual, or mobility impairment.
  • Page 428: Using The Accessibility Behavior Library

    Therefore, when you use text-to-speech script or behaviors in a projector, you must remember to add the Speech Xtra to the Xtra extensions list manually. The Speech Xtra is available automatically in the Director application and in Macromedia Shockwave. To add the Speech Xtra to a movie’s Xtra extensions list: Select Modify >...
  • Page 429 Enabling keyboard navigation With the Accessibility Behavior library, you can easily make sprites on the Stage navigable with the keyboard. This lets mobility-impaired users select sprites and simulate mouse clicks without using a mouse. For example, if you have four button sprites on the Stage, you can apply accessibility behaviors that let them be selected by using the Tab key.
  • Page 430 In the dialog box that appears, enter a name for the behavior group. Because the accessibility behaviors work together and are dependent on one another, a group name associates all the accessibility behaviors used in a given scene of your movie with one another.
  • Page 431 Repeat this process for each sprite in the scene that you want to be navigable. Note: The Accessibility Item and Accessibility Text Edit Item behaviors cannot be applied to sprites that have the Accessibility Target or Accessibility Keyboard Controller behaviors attached. If you are testing your movie while applying Accessibility Item or Accessibility Text Edit Item behaviors, you might need to rewind your movie to restore the shape sprite with the Accessibility Target behavior to its original location.
  • Page 432 To apply the Accessibility Speak behavior: Begin by applying the keyboard navigation behaviors to sprites in your scene. For more information, see “Enabling keyboard navigation” on page 429. Drag the Accessibility Speak behavior from the Library palette to the sprite you want to trigger the spoken text when the user navigates to it with the Tab key.
  • Page 433 Using captioning For users who are hearing impaired, you can add text captioning to your movies. Captioning is the practice of displaying text that corresponds to spoken narration or other sounds being played. Using the captioning behaviors in addition to the text-to-speech behaviors lets you make your movies accessible to users with all types of disabilities.
  • Page 434: Accessibility Scripting With Lingo Or Javascript Syntax

    In the Display How Many of the Words That Follow text box, enter the number of words to display after the word number you selected in the previous step. For example if you want to display 22 words of text after word 16, enter 22 in this text box. In the remaining text boxes, enter the numbers of the first word of each section of text followed by the number of words in each section.
  • Page 435: Deploying Accessible Movies

    To resume the speech: • Use the method. voiceResume() To stop speech synthesis: • Use the method. voiceStop() To check whether the speech is currently speaking, paused, or stopped: • Use the method. voiceState() To set the volume of the voice: •...
  • Page 436 Macintosh OS 8.6 and later include text-to-speech software. No additions are necessary. Understanding the Xtra download process Because the Speech Xtra is from Macromedia, it is considered a trusted download. The user does not have to interact with any dialog boxes for the download to occur. When a user encounters accessible Shockwave content for the first time, the Xtra downloads automatically.
  • Page 437: Chapter 21 Managing Memory

    CHAPTER 21 Managing Memory Macromedia Director MX 2004 has effective built-in memory management that is sufficient for most projects. To make memory available for new sprites, Director simply unloads the cast members used for sprites that are no longer on the Stage. However, sometimes large cast members, such as high resolution images, large sounds, or digital video, can take longer to load or unload than typical, smaller cast members.
  • Page 438 Monitoring memory use The Memory inspector displays information about how much memory is available to Director for your movie and indicates how much memory different parts of the current movie use and the total disk space the movie occupies. It also can purge all removable items from RAM if you are about to perform a memory-intensive operation.
  • Page 439: Loading And Unloading Individual Cast Members

    Using script to change a cast member’s property is a good technique for purgePriority controlling memory management. However, changes to the property do not take purgePriority effect until the next time a cast member is used. For example, if you change the property in an script in the same frame as a cast member is used, the cast member is exitFrame enterFrame...
  • Page 440 In the frame where you want the video to appear, use script to set the sprite’s property to place the sprite on the Stage in the location you select. Set the property to 1 to start playing the video. movieRate This way, the video loads its initial segment into memory and is ready to play immediately when your movie reaches the frame where you want it to appear.
  • Page 441: Chapter 22: Managing And Testing Director Projects

    CHAPTER 22 Managing and Testing Director Projects As you work with Macromedia Director MX 2004 and develop projects with it, you might encounter some situations where a seemingly small change in the design of a project has a significant effect on the organization of the Director files and media files associated with it. A little bit of planning before you start a Director project can help avoid difficult changes during the course of development.
  • Page 442 • Organize the cast members in your cast in a logical way. You might choose to group all the cast members of a particular type together, or you might choose to group the cast members from each scene together. Choose a system that works for you and that will make it easy to find cast members when your cast becomes large.
  • Page 443: About Testing Movies To Avoid Problems

    About testing movies to avoid problems While you develop movies, you might encounter some difficulties because creating interesting movies and trying out new ideas always involves some experimentation. By testing your movies according to the simple guidelines described in this section, you can prevent problems from becoming obstacles.
  • Page 444: Printing Movies

    You can use the following strategies to test your movies effectively: • Testing in the Director authoring environment is different than testing in the Director Projector and Macromedia Shockwave environments for online content. The Preview in Browser command demonstrates the true behavior of the movie in the Shockwave environment.
  • Page 445: Resources

    Type the footer in the text box. The image at the left of the dialog box previews the layout options. Resources The following resource is available to help you with testing and troubleshooting your Director movies: index of Director testing and troubleshooting TechNotes at www.macromedia.com/go/director_troubleshooting Resources...
  • Page 446 Chapter 22: Managing and Testing Director Projects...
  • Page 447: Chapter 23: Packaging Movies For Distribution

    CHAPTER 23 Packaging Movies for Distribution When you finish authoring your Macromedia Director MX 2004 movie, you have a choice of several ways to prepare it for distribution. You can distribute a movie in the Macromedia Shockwave format that plays in a browser, or you can distribute it as a stand-alone projector.
  • Page 448: Shockwave Browser Compatibility

    For more information about how to distribute Xtra extensions with projectors, see TechNote 13965 in the Director Support Center at www.macromedia.com/go/director_support. Although the note might refer to Director 7, the information is the same for more recent versions of Director.
  • Page 449: About Xtra Extensions

    Including Xtra extensions The Shockwave Player includes the Xtra extensions that support the most common features and media types. These include text; vector shapes; Macromedia Flash; BMP, PICT, JPEG, and GIF file importing; sound management; and Shockwave Audio. Xtra extensions not included with the Shockwave Player must be installed in a user’s system before the movie plays.
  • Page 450: Managing Xtra Extensions For Distributed Movies

    You can also exclude Xtra extensions in projectors. For more information, see “Excluding Xtra extensions from projectors” on page 462. Xtra extensions usually required for the movie to play back correctly include the following: • Xtra extensions that create cast members (text, Flash, vector shapes, Windows Media, QuickTime, and so on) •...
  • Page 451: About Distribution Formats

    About distribution formats Before deciding how to distribute a movie, it helps to understand how Director plays movies. Director movies play either with the Shockwave Player or through a projector player. The Shockwave Player is a system component that plays movies in web browsers and also outside browsers as stand-alone applications.
  • Page 452: Creating Shockwave Content

    Distributing movies on a disk Whenever a movie plays from a disk, it accesses all external linked files the same way that it did in the authoring environment. All linked media—bitmaps, sounds, digital videos, and so on—must be in the same relative location as they were when you created the movie. To make sure you don’t forget any linked media when you distribute a movie on a disk, place linked files in the same folder as the projector or in a folder inside the Projector folder.
  • Page 453: Changing Publish Settings

    If your movie needs Xtra extensions that fall beyond the range of the default publish settings, (for example, Windows Media) you will be prompted to add them. In that case, you can set up your movie with the correct settings by changing them. Changing Publish Settings You can change Publish Settings by using the Publish Settings dialog box.
  • Page 454 Selecting a publishing format Use the Formats tab to select the movie format you want and determine the types of files you wish to publish. It includes support for creating cross-platform projectors. To set options using the Formats tab: • To publish a Projector movie, click Projector.
  • Page 455 Setting Projector options The Projector tab lets you set options that include how the projector movie appears on stage or in a browser, and what type of player it is shown on. To set options using the Projector tab: Select File > Publish Settings and click the Projector tab. Set the options you want and click OK to keep your settings and return to the movie or Publish to begin the projector publishing process.
  • Page 456 Setting Shockwave options The Shockwave tab lets you set options that determine the Shockwave Player version, how images are compressed, how users interact with the movie once it’s published, and more. To set options using the Shockwave tab: Select File > Publish Settings and select the Shockwave tab. Select the options you want to provide for your users, as described in the following list: Version: Select Shockwave Player 10 or Shockwave Player 8.5.
  • Page 457 If you use the default Match Movie setting in the Dimensions field, values in the OBJECT tags in the HTML file are set to the exact dimension of your movie. To change the EMBED dimensions, select either Pixels or Percent of Browser Window, and type the new dimensions in the Width and Height fields.
  • Page 458 To let users resize the Stage without resizing the sprites, select Expand Stage Size. The movie is aligned within the browser based on the align tags that you specify in step 4. To specify align tags for your movie, use the Horizontal Align and Vertical Align pop-up menus.
  • Page 459: Using Dswmedia Folders And The Support Folder To Publish Shockwave Content

    For more information, see “Processing movies with Update Movies” on page 464. Note: Macromedia Shockwave Player 8.5 can play Shockwave content created with Director 5, 6, 7, 8, and Director MX. Converting movies created in previous versions of Director...
  • Page 460: About Projectors

    To be included as a file in a Projector, a movie must be created with Director 8.5 or newer. However, using Lingo, movies created with earlier versions of Director can be played (e.g. go to movie, play movie) back to and including movies created with Director 5. When you open a Director 7 movie in Director MX or convert it to the new format with Update Movies, the following changes occur to the movie: •...
  • Page 461 Select from the following options: Animate in Background lets the movie continue playing if a user switches to another application. This is useful if you want the movie to continue running in the background when its window is not active. If this option is not selected, the movie pauses when the user switches to another application and resumes when the user switches back.
  • Page 462 To create a fast-start projector: Create a new folder on your computer desktop. It does not matter what you name the folder. In Director, select Modify > Movie > Xtras. The Movies Xtras dialog box appears. Select the name of each Xtra and deselect Include in Projector for each, then click OK. Select File >...
  • Page 463: About Cross-Platform Projectors

    • Shockwave projectors can use the Xtra extensions that have been already installed with Shockwave instead of requiring their own copy. • Because of the way the Xtra extensions list for the movie is maintained, it is possible to get Xtra extensions included in a projector that you don't need.
  • Page 464: Processing Movies With Update Movies

    Processing movies with Update Movies You can use the Update Movies command on the Xtras menu to do the following: • Update movies and casts from older version of Director to the latest file format. • Compress movies for faster downloading from the Internet. •...
  • Page 465: Exporting Digital Video And Frame-By-Frame Bitmaps

    Click Update. Director saves new versions of the selected movies with the same names and locations as the original movies. This ensures that all links and references to other files continue to work properly. Director copies the original movies to the folder you specified, re-creating their original folder structure.
  • Page 466: Setting Quicktime Export Options

    From the Format pop-up menu at the bottom of the dialog box, select a format. Windows: Video for Windows (.AVI), DIB File Sequence (.BMP), or QuickTime Movie (.MOV) Macintosh: PICT or QuickTime Movie BMP is the standard format for a Windows bitmap series. PICT is the standard format for a Macintosh bitmap file format.
  • Page 467 A movie that would work well with Tempo Settings as the Frame Rate option is one in which the tempos have been carefully timed. For instance, some frames could be set to a tempo of 10 frames per second, and their QuickTime frame durations would be exactly one-tenth of a second.
  • Page 468: About Organizing Movie Files

    Looped sounds don’t loop in a movie that you have exported as a digital video. To loop a sound in a movie that you plan to export as a digital video, you must trigger the sound by alternating it between the two sound channels. About organizing movie files In most cases, you should divide a large production into a series of smaller movies.
  • Page 469: Chapter 24: Using Shockwave Player

    To make a movie appear in a user’s browser, you can save it as Macromedia Shockwave content and embed it in an HTML document. The movie can play from a local disk or an Internet server.
  • Page 470: About Network Operations

    When Director streams a movie over the Internet, it first downloads the Score data and other nonmedia information such as scripts and the size of each cast member’s bounding rectangle. This data is usually quite small compared with the size of the movie’s media—usually only a few kilobytes.
  • Page 471: Setting Movie Playback Options

    To set Shockwave playback options, see the next section. Setting Shockwave playback options To view Shockwave content, your users must have the Macromedia Shockwave Player, which comes preinstalled on many computer systems. The player is also available for free downloading from the Macromedia website at www.macromedia.com/shockwave/download/.
  • Page 472: About Creating Multiuser Applications

    If you want to create multiuser movies or applications with Director, you need to use Macromedia Flash Communication Server MX in your Director movie. This can be a Flash movie that has already been authored to communicate with the Flash Communication server or a simple Flash movie that can serve as a container for Flash script objects that you create with Lingo or JavaScript syntax.
  • Page 473: About Streaming With The Score And Behaviors

    About streaming with the Score and behaviors The easiest way to create a movie that streams well is to arrange the Score properly and use behaviors to control the playhead. Director downloads cast members in the order in which they appear in the Score.
  • Page 474: Checking Whether Media Elements Are Loaded With Lingo Or Javascript Syntax

    Checking whether media elements are loaded with Lingo or JavaScript syntax Director has several options that let an initial portion of a movie start playing as soon as the required data and cast members are available. You can use Lingo or JavaScript syntax to check whether media elements have been downloaded from a network by testing the following: •...
  • Page 475 To execute a network script operation: Start the operation. For example, the following statement initiates a text downloading operation and assigns the network ID returned by the operation to the variable getNetText() theNetID theNetID = getNetText("http://www.thenews.com") Make sure that the operation finishes. To check an operation’s status regularly until the method indicates that the operation is complete, use the method.
  • Page 476: Retrieving Network Operation Results With Lingo Or Javascript Syntax

    method is similar to the Director method. It does not return a value. gotoNetPage open To preload a file from the server into the browser’s cache: • Use the method. For more information about this method, see the preloadNetThing() Scripting Reference topics in the Director Help Panel. method initiates downloading a linked movie asset into the cache, preloadNetThing() where it is available for later use.
  • Page 477: Using Lingo Or Javascript Syntax In Different Internet Environments

    To determine the state of a network operation that retrieves data: • Use the event handler or the function. Lingo on streamStatus JavaScript streamStatus For more information, see the Scripting Reference topics in the Director Help Panel. Using Lingo or JavaScript syntax in different Internet environments Some Lingo or JavaScript syntax features behave differently, depending on whether the movie is playing back in a browser, as a projector, or within the authoring environment.
  • Page 478 The following Lingo or JavaScript syntax supports URLs as references to external files. If you use this script in projectors or during authoring, you can avoid pauses while the file is being downloaded by first using to download the file. After the file has been preloadNetThing() downloaded, you can use these Lingo or JavaScript syntax elements with the file’s URL without a delay.
  • Page 479: Testing Your Movie

    The \Macromed\Shockwave 8 subfolder of the system folder; the system folder is typically c:\winnt\system32 or c:\windows\system Macintosh The OS 9 path is The System Folder:Extensions:Macromedia:Shockwave 8 folder. The OS X path is /my Volume/Users/<me>/Library/Application Support/Macromedia/ Shockwave/prefs. method cannot write to a file that is on a CD.
  • Page 480: About Downloading Speed

    • Run the movie on slow and fast connections; problems can arise from fast as well as slow connections. • Check for display problems on systems set to 8-, 16-, 24-, and 32-bit color. Also test as many types of monitors and display adapters as you can. •...
  • Page 481: Index

    INDEX Numerics public 330 viewing 329 3D behaviors ActionScript instructions 190 about 327 ActiveX 204 action 330 Add inks command 79 applying 332 Airbrush tool, Paint window 103, 107 groups 333 Align window 66, 67 library 328 alternate image options 458 triggers 329 ancestor scripts 288 types 328...
  • Page 482 appearance properties, MIAWs (movie in a window) triggers 329 types 328 arranging sprites 58 bevel, 3D text 325 ASCII values, keys 298 binary operations, vectors 398 attaching behaviors 275 bitmaps attributes, XML 424 animated GIFs 101 audio. See sound Auto Filter command 124 Auto Distort command 111 cast member properties 128 Auto Filter command 124...
  • Page 483 299 Cast window defined 22 controls 29 digital video 248 list view 31 downloading, for streaming movies 470 moving members 35 editing in Macromedia Fireworks 133 old movies, opening 28 editing text 166 organizing 35 editors, launching 40, 46 Index...
  • Page 484 preferences 36 Favorites, editing 148 viewing 26 Flash movies 186 casts guides 66 creating 23 hue 154 defined 22 importing images 45 external 23, 47 inks, Paint window 121 internal, defined 23 inks, sprite 77, 79 opening in new window 29 Lingo and JavaScript controls 154 preferences 34 mask effects 77...
  • Page 485 Paste Relative command 97 sprites 69 Darken button, Paint window 111 corner points in vector shapes 137 Darken ink 78 creating Darkest ink 79 3D text 324 data, obtaining from a network 474 behaviors 279 DCR files bitmaps 100 creating 452 cast members 24 distributing 451 casts 23...
  • Page 486 Extreme tweening option 88 bitmaps 100 extruder model resource 344 cast member scripts 29 Eyedropper tool, Paint window 103 cast members in Macromedia Fireworks 133 Favorite color 148 fields 172 film loops 95 Fade to Black/White 150 Flash cast members 184...
  • Page 487 downloading, speed 480 fonts importing 42 3D text 324 linking to 44 character sets, XML 425 preloading 476 embedding in a movie 164 project management 441 mapping across platforms 173 projectors, options 455 Foreground and Background color 75 types supported 44 formatting URL references 478 fields 172...
  • Page 488 HTML files types of 79 browser options 456 Insert Blank Frames to Make Room option 21 format options 454 integration with Macromedia Studio MX 2004 12 previewing in browsers 448 interactive features 291 settings 452 internal casts, defined 23 HTML, compared to XML 419...
  • Page 489 speed 480 joining streaming movies 470 curves, vector shapes 140 introduction to Director 11 sprites 70 Invert colors, Paint window 111 JPEG files, importing 100 italic text 167 jumping 293, 473 JavaScript syntax kerning 167, 170, 176 3D text methods and properties 325 Key Down event 280 animating sprites 97 Key Up event 280...
  • Page 490 56 keyboards 298 network operation results 476 projectors 463 positioning sprites 68 Macromedia Studio MX 2004, integration with 12 rollovers 296 Magnifying Glass tool, Paint window) 103 security limitations 477 Maintain Outdated Ink Mode Limitations option 459 sound controls 235...
  • Page 491 sounds, importing 231 properties 336 textures 360 spheres 337 unloading cast members 47, 437, 439 models Xtra extensions 449 3D Xtra 305 Memory inspector 438 automatic rotation 331 mesh deform modifier 380 cast members 345 mesh generator 339, 342 commands 318 messages, sending to sprites 287 defined 313, 315 methods...
  • Page 492 movies MP3 audio accessibility 427, 428 controlling with Lingo or JavaScript 239 browsers, playing in 478 streaming 238 browsers, previewing in 448 captioning 433 changing color depth of 147 naming color modes 146 cast members 29, 31 color palettes, changing 149 Cast panel groups 27 cursors, animated color 301 MIAWs (movie in a window) 410...
  • Page 493 Lingo and JavaScript controls 154 modes 146 object-relative model movement 351 properties 155 objects remapping 114 3D 315 troubleshooting 154 Flash 193 window 151 local connection 195 pan camera 331 MIAWs (movie in a window) 410 panning QuickTime VR 251 renderer services 403 paragraph formatting 167, 177 scripts 393...
  • Page 494 Play Cast Member action 281 options 455 play done method 294 organizing 468 Play Every Frame digital video property 246 Xtra extensions 449, 450 Play External File action 281 Xtra extensions, excluding 462 play method 294 projects, managing 441, 468 Playback options, Shockwave 471 properties playhead...
  • Page 495 Guides tab 66 rendering Guides tab, Stage 18 methods 309, 407 Member tab 22, 39 properties 405 MIAWs (movie in a window) 415 Reset Monitor option 461 Movie tab 146 resizing new features 304 bitmaps 99, 113 sprites 59 Flash movies 186 Stage 18 HTML pages 456 Text tab 324...
  • Page 496 preferences 20 properties 352 searching for cast members in 41 Property inspector 309 sound controls 233 text 325 Space to Time command 93 shape cast members 142 sprite display settings 20 shape drawing tools, Paint window 104 sprite labels 62 Sharp Changes tweening option 85, 88 sprites, viewing by name 56 shocked fonts 164...
  • Page 497 controlling with Lingo or JavaScript 239 draggable 295 importing 231 duration, changing 70 Lingo and JavaScript controls 235 editable 295 looping 234 editing frames 21, 89 playing external 239 finding 57 Shockwave Audio 237 flipping 75 streaming Shockwave Audio 238 frame-by-frame animation 90 streaming, formats supported 232 inks 77...
  • Page 498 guides and grid 18 creating 165 moving sprites 69 editable 172 positioning sprites 65 editing 166 Property inspector 18 embedding in a movie 164 rendering methods 309 features 163 Sprite Overlay 61 field 163 sprite preference 52 field properties 174 sprites, viewing by name 56 finding and replacing 170 Standard Import option 43...
  • Page 499 Transparent ink 79 vector shapes trigger behaviors cast members 142, 143 defined 328 color settings 147 groups 333 controlling with Lingo or JavaScript 142 parameters 333 corner points 137 viewing 328 creating 135 troubleshooting curve points 137 color palettes 154 defined 99 resources 445 editing 139...
  • Page 500 workspace customizing 12 world-relative model movement 351 wrapping, text 178 about 419 attributes 424 character sets 425 data, sending from Flash to Director 193 nodes 422, 424 parser objects 420, 424 websites, resources 420 white space, ignoring 425 Xtra extensions 3D 305 Auto Filter command 124 bitmap filters 123...

This manual is also suitable for:

Director mx 2004

Table of Contents