Gettingstarted Director
Gettingstarted Director
2004
This guide contains links to third-party Web sites 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 Web site 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.
Apple Disclaimer
APPLE COMPUTER, INC. MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING THE
ENCLOSED COMPUTER SOFTWARE PACKAGE, ITS MERCHANTABILITY OR ITS FITNESS FOR ANY
PARTICULAR PURPOSE. THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES.
THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. THIS WARRANTY PROVIDES YOU WITH SPECIFIC
LEGAL RIGHTS. THERE MAY BE OTHER RIGHTS THAT YOU MAY HAVE WHICH VARY FROM STATE TO
STATE.
Copyright © 2004 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced,
translated, or converted to any electronic or machine-readable form in whole or in part without prior written approval of
Macromedia, Inc. Part Number ZDR10M100
Macromedia, Inc.
600 Townsend St.
San Francisco, CA 94103
CONTENTS
3
Using the Property inspector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Controlling your view of the Property inspector . . . . . . . . . . . . . . . . . . . . . . . . 27
Setting cast member and sprite properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Setting movie properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Using the Script window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Using the Message window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Customizing your workspace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Customizing panel groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Docking panel groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Saving panel sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Opening, closing, and collapsing panel groups . . . . . . . . . . . . . . . . . . . . . . . . . 36
Working with Xtra extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Adding media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Adding script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Adding transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Distributing Xtra extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4 Contents
Create a QuickTime sprite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Specify direct-to-Stage playback for a QuickTime cast member . . . . . . . . . . . . 62
Add custom buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Import a sound. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Add a sound to the Score . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Add navigation buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Writing scripts to control the movie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Looping the playhead with Lingo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Write a handler. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Reuse the handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Add a marker to the Score . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Create navigation in Lingo using marker names . . . . . . . . . . . . . . . . . . . . . . . . 69
Add Lingo to navigation buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Test your script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Add markers to two additional scenes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Write script that refers to scenes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Add scripts to the animation scene . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Add one more script to the sound and video scene . . . . . . . . . . . . . . . . . . . . . . 72
Controlling digital video with script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Rewind the QuickTime sprite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Add a script that plays the QuickTime sprite . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Add a script that pauses the QuickTime sprite . . . . . . . . . . . . . . . . . . . . . . . . . 74
Control sound with script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Modify the script for the Pause button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Modify the script for the Rewind button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Add sounds to buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Publishing your movie. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Use a QuickTime Xtra extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Get linked media ready to play on your local computer . . . . . . . . . . . . . . . . . . 77
Change Publish settings and publish your movie . . . . . . . . . . . . . . . . . . . . . . . 78
Summarizing what you learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Contents 5
6 Contents
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,
Getting Started with Director, is designed to get you up and running as quickly as possible. It
includes installation guidelines for both new and returning users as well as an orientation to
Director and tutorials for new users.
In this chapter, you can get an overview of Director, learn about the features that are new in this
release of Director, and find additional sources of information.
About Director
With Director, a proven multimedia authoring tool for professionals, you can develop high-
performance content and deploy it anywhere: on CDs, DVDs, intranets, kiosks, or the Internet.
Whether you are creating enhanced CD/DVD-ROM content, educational content, or
entertainment applications, Director handles the widest variety of media, letting you unleash your
creativity and build rich, interactive experiences that deliver measurable results. Director provides
all the tools you need to maximize productivity, including a choice of scripting languages and
cross-platform publishing.
With Director, you can now do all of the following:
• Embed most major media formats in your multimedia projects, including DVD-Video,
Windows Media, RealMedia, QuickTime, and Macromedia Flash content, in addition to
audio, bitmap, and 3D formats.
• Work seamlessly with other Macromedia MX products, including Macromedia
Flash MX 2004.
• Extend the authoring environment and playback engine with the Xtra extension plug-in
architecture in Director. Use third-party Xtra extensions or write your own to control external
devices, such as joysticks and cameras, and perform sophisticated operating system-level tasks.
• Write scripts to add interactivity and automation to your projects, using the Lingo scripting
language, JavaScript syntax, or a combination of the two.
• Publish content across platforms and to different formats, including Macintosh and
Windows projectors.
7
Users view your completed Director movies in one of the following ways:
• In a projector, which plays on your user’s computer as a stand-alone application.
• In the Macromedia Shockwave Player format, which plays in Shockwave-enabled web
browsers. Millions of web users already have the Shockwave Player on their computers,
browsers, or system software. Others have downloaded Shockwave Player, which is free, from
the Macromedia website at www.macromedia.com/shockwave/download/.
Tip: To see some of the exciting and varied ways in which developers use Director, visit the Director
showcase at www.macromedia.com/go/discreet_inspiration. You can also see great examples of
Shockwave content at www.shockwave.com.
8 Chapter 1: Introduction
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.
Getting help from the reference panel A new reference panel is now available in Director to
simplify getting help with using Director, behaviors, Xtra extensions, and application
programming interfaces (APIs) for both Lingo and JavaScript syntax.
Sources of information
Getting Started with Director This printed manual contains the essential information that you
need to get started, including information about installing the latest version of Director. This
manual also guides you through the workspace and offers a tutorial, designed for those who are
new to Director.
Director Help Panel This online help system is the comprehensive information source for all
Director features. It includes overviews of the features, examples, how-to procedures, descriptions
of interface elements, and a reference of all scripting objects in both Lingo and JavaScript syntax.
Topics are linked and indexed to make finding information and jumping to related topics quick
and easy. To view the Director Help Panel, select Help > Director Help while you are working
in Director.
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.
10 Chapter 1: Introduction
Director Scripting Reference This manual is available in printable PDF format from the
Director Documentation Center at www.macromedia.com/go/director_docs. It provides a
complete reference of the Director application programming interfaces (APIs), including both
Lingo and JavaScript syntax. Information in the manual is also available in the online
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.
Tooltips When you place your mouse pointer over a Director tool or another item in the
Director workspace for a few seconds, a small tooltip appears that explains what you can do with
the item.
Director Support Center The Director Support Center website (www.macromedia.com/go/
director_support) contains the latest information about Director, plus additional topics,
examples, tips, and updates. Check the website often for the latest news and how to get the most
out of Director.
Document conventions
Director Help and the Director product manuals all follow a few basic conventions:
• The term Director typically refers to the most recent version of Director.
• Lingo refers to a scripting language that is shipped with Director. JavaScript syntax refers to the
Director implementation of JavaScript.
• How-to procedures are identified with bold headings that begin with “To...” and end with a
colon. For example, if To access Director Help: appears in a heading, then the heading is
followed by a set of steps.
• Examples of Lingo and JavaScript syntax are shown in a fixed-width font. For example,
answer = 2 + 2 is a sample Lingo statement.
• Variables used to represent parameters in Lingo and JavaScript syntax appear in italics. For
example, whichCastMember is commonly used to indicate where you should insert the name
of a cast member in Lingo or JavaScript syntax.
• Text that you should type in a window or dialog box is shown in a bold font.
Installing Macromedia Director MX 2004 takes only a few minutes. After installation, you may
want to customize Macromedia Director MX 2004 to fit your authoring needs. You can install
Xtra extensions to add functionality and set up an Internet connection for remote access to files.
You can configure Director immediately after installation, or you can return to configuration at
any time.
System requirements
The following hardware and software are the minimum required to author Director movies:
• For Microsoft Windows: An Intel Pentium III 600 MHz (or later processor running Windows
2000 or Windows XP; at least 128 MB of available RAM (256 recommended); and 200 MB
of available disk space
• For Macintosh: A Power Macintosh G3 500 MHz (or later) running Mac OS X 10.2.6 or
10.3; at least 128 MB of available RAM (256 recommended); and 200 MB of available
disk space
The following hardware and software are the minimum required to play back Director movies:
• For Microsoft Windows: An Intel Pentium II with 64 MB of available RAM running
Windows 98, or an Intel Pentium III with 128 MB of available RAM running Windows 2000
or Windows XP; one of the following web browsers: Netscape 7.1, Microsoft Internet
Explorer 5.01 Service Pack 2, Microsoft Internet Explorer 5.5 Service Pack 2, or Microsoft
Internet Explorer 6 Service Pack 1
• For Macintosh OS X: A Power Macintosh G3 with 128 MB of available RAM running
Mac OS X 10.1.5, 10.2.6, or 10.3; one of the following web browsers: Netscape 7.1, Microsoft
Internet Explorer 5.2 or later, or Safari 1.1
• For Macintosh Classic: A Power Macintosh G3 with 64 MB of available RAM running
System 9.2; Microsoft Internet Explorer 5.1
Note: Complete and updated system requirements are available on the Macromedia System
Requirements page at www.macromedia.com/go/sysreqs.
13
Installing Director
Follow these steps to install Director on either a Windows or a Macintosh computer. On the
Macintosh, you need administrator privileges and an administrator password to complete
the installation.
To install Director on a Windows or a Macintosh computer:
1 Insert the Director CD into the computer’s CD-ROM drive and do one of the following:
■ In Windows, if the installation program does not start automatically, select Run from the
Windows Start menu, type d:\setup.exe (where d is your CD-ROM drive letter), and
click OK.
■ On the Macintosh, double-click the Director Installer icon.
2 Follow the on-screen instructions. Before you can use Director, you must activate your
license by phone or on the Internet. To learn how to activate your license, see the on-screen
instructions.
3 Make sure that Director is properly installed and ready to start by doing one of the following:
■ In Windows, if you chose the default program group when you installed, select Start >
folder.
If Director starts, then you are ready to begin using or configuring Director.
Macromedia\Director MX 2004\Configuration\Xtras.
■ On a Macintosh, the location of the Xtras folder might be /Applications/Macromedia
Director MX 2004/Configuration/Xtras.
An Xtra extension can be stored in a folder up to five folders below the Xtras folder.
3 Start Director.
Note: Copies of the same Xtra extension can have different filenames or have the same filename but
reside in different folders. If duplicate Xtra extensions are available when Director starts, Director
displays an alert. Delete any duplicate Xtra extensions.
2 In the Preferred Browser text box, type the file path to your preferred web browser, or click the
Browse button and navigate to the correct file path.
By specifying this file path, you select which web browser should open on your system when
you play a movie that is programmed to open a web browser.
3 Select or clear Launch When Needed. When this option is selected, web browser launching
is enabled.
4 In the Disk Cache Size text box, type the maximum number of kilobytes that you want Director
to use to cache data from the Internet on your hard disk.
Tip: To immediately empty the cache, click Clear.
5 To specify how often cached data is compared with the same data on the server, select one of
the following Check Documents options:
Once Per Session checks for data revisions only once from the time you start to the time you
quit Director. This option improves performance but might not always display the most
current version of a page.
Every Time checks for changes whenever you request a page. This option slows performance
but ensures that you are always viewing the most current version of a page.
6 To specify the configuration of your system’s proxy server, select one of the following
Proxies options:
No Proxies specifies that you have a direct connection to the Internet.
Manual Configuration allows you to customize proxy settings for your system. Enter the
HTTP or FTP location and port number of your proxy server.
Browsers usually do not require proxy servers to interact with the network services of external
sources, but in some network configurations where a firewall blocks the connection between
the browser software and a remote server, interaction with a proxy might be required.
A firewall protects information in internal computer networks from external access, and in
doing so, it can limit the ability to exchange information. To overcome this limitation, browser
software can interact with proxy software. A proxy server interacts with the firewall and acts as
a conduit, providing a specific connection for each network service protocol. If you are
running browser software on an internal network from behind a firewall, you need the name
and associated port number for the server running proxy software for each network service.
The Macromedia Director MX 2004 workspace is designed to make the most efficient use of the
space on your screen. Windows, also called panels, can be organized into tabbed panel groups,
and panel groups can be docked together. To make the most of the features in Director, you
should take a few minutes to understand how to navigate and customize your workspace.
As you get to know the workspace, you will also learn about the features that Director has to offer.
For example, learning about the Script window and the Message window can help those who are
new to scripting in Director. If you have not scripted in Director before and would like to start,
make sure to read about the Script window and the Message window.
Before you begin working in Director for the first time, you should also understand the movie
metaphor upon which Director is based. By understanding this metaphor, you can more easily
recognize components of your workspace, like the Stage and Cast window.
17
The action in a Director movie takes place in a window called the Stage. To create a Director
movie, you add cast members (media elements) to the Cast window by creating them in Director
or importing them. Next, you place them on the Stage as sprites. A sprite is simply a copy of a cast
member that appears on the Stage. Then you refine the actions of the sprites by editing them on
the Stage or in the Score.
Score
Stage
Cast
Cast Score
3 Place the hand on the Stage, and click and drag to move the Stage.
Offstage canvas
Onstage canvas
Markers channel
Tempo channel
Palette channel
Transition channel
Sound channels
Behavior channel
Sprite channels
While the rows of the Score contain channels, the columns of the Score contain frames. A frame
in a movie represents a single point in time, which is similar in theory to a frame in a celluloid
film. Frame numbers are listed above the columns in the Score.
A red vertical line, called the playhead, moves across the frames in the Score to indicate which
point in time is currently displayed on the Stage. You can also click any frame in the Score to
move the playhead to that frame, and you can drag the playhead backward or forward
through frames.
Markers menu
2 Select the name of the marker that you want to jump to.
To jump to a frame in the Score:
• Click the frame that you want to jump to.
Showing and hiding the effects channels
The effects channels—like Tempo, Transition, and Sound—can be either displayed or hidden.
When you begin working with Director, you may want to have the effects channels shown at all
times. As you become comfortable with Director, you can hide the effects channels until you need
to use them. Settings on the effects channels remain in place even when the channels are hidden
from view.
2 Select a size from the Zoom menu. Sizes are displayed as a percentage of full size.
Frame counter
Step Forward button
2 In thumbnail view in the Cast window, right-click an empty cast member, and select Import.
3 Navigate to a media file, select the file, and click the Import button.
The cast member now appears in the Cast window.
Expander arrow
8 In the About and Copyright boxes, enter copyright and other information about the movie.
This information is important if your movie will be downloaded from the Internet and saved
on a user’s system.
9 To save the current font map settings in a text file named Fontmap.txt, click Save. To load the
font mapping assignments specified in the selected font map file, click Load.
Note: More advanced movie properties are available on the Display Template tab, next to the Movie
tab in the Property inspector. For example, you can control the location of the stage on a user’s
screen by using the Display Template tab in the Property inspector.
Trace button
When the Trace button is indented, the Message window is in trace mode.
For more information on how to use the Message window for testing and debugging, see the
Scripting Reference topics in the Director Help Panel. To view Help in Director, select Help >
Director Help.
Note: If Group [panel name] With is not available on the Options menu, then the panel cannot be
moved to a new panel group.
3 From the Group [panel name] With menu, do one of the following:
■ To move the panel to an existing tabbed panel group, select a panel group name.
■ To move the panel to a new standalone panel, select New Panel Group.
Note: The New Panel Group option is dimmed if the panel is already a stand-alone panel.
Adding script
Scripting Xtra extensions make additional objects, methods, and properties available in Director.
The built-in NetLingo scripting Xtra extension, for example, allows you to control Internet
functions.
To see which scripting Xtra extensions are available to add to your movie:
1 If the Script window is not already open, select Window > Script.
2 Click the Scripting Xtras button.
The Scripting Xtras menu displays all of the installed scripting Xtra extensions.
3 Click one of the scripting Xtra extensions to see all of the methods and properties that are
included with that Xtra extension.
For more information on the objects, methods, and properties in standard Director scripting Xtra
extensions, see the Scripting Reference topics in the Director Help Panel. To view Help in
Director, select Help > Director Help.
This tutorial takes you through the steps of creating your first movie in Macromedia Director MX
2004. If you are new to using Director, follow this tutorial to learn hands-on how to create a
simple interactive movie with animation, sound, and video. The movie is designed to suggest
what is possible with Director rather than simulate a fully developed Director project.
Before stepping through this tutorial, you should first take a few moments to read Chapter 3,
“Getting to Know the Workspace,” on page 17. It introduces you to the Director user interface
and provides an important foundation for this tutorial.
41
View the completed movie
Start by viewing a completed version of the tutorial movie to become familiar with how your
finished movie should look.
1 Start Director.
2 Select File > Open.
3 Within your Director MX 2004 application folder, browse to Tutorials/Basics/Finished and
double-click the Basic_finished.dir file.
4 If windows obscure the Stage, drag them out of the way.
5 To play the movie, click the Play button at the bottom of the Stage.
Play Volume
Stop
Rewind
6 Use the buttons in the movie to navigate from one scene to another and control the playback
of the video clip.
The movie consists of three scenes. The first is a title scene that contains buttons for navigating
to the other two scenes. The second scene is an animation of a tire bouncing. The third scene
contains a digital video and buttons that control it. Each of these scenes also contain
navigation buttons.
7 When you finish viewing the movie, click the Stop button at the bottom of the Stage.
7 In the Property inspector, click the Color button, and select dark gray from the color picker.
Color button
The Cast window contains cast members that you can use in your movie. The first is a text cast
member. It contains the text “Trio Motor Company.” The text cast member thumbnail image that
appears in the Cast window contains a small A icon in the lower right corner. This is the cast
member type icon, and the A indicates that it is a text cast member.
The second cast member is a button. Button cast members have special functionality built into
them, such as changing color when clicked, so that they behave in the way most users expect
buttons to behave. This button contains the text “Go to Animation.” Its cast member type icon is
a small square button shape.
The third cast slot is empty. You will add a cast member to that slot later. The fourth cast member
is a bitmap image. Its cast member type icon is a paintbrush.
The ninth, tenth, and eleventh cast slots contain bitmaps that you will use as custom buttons.
Using a bitmap image lets you control the appearance of the button, but it does not provide the
built-in functions of the Director button cast member type. However, you can add these
functions with script, using either the Director scripting language called Lingo or JavaScript
syntax. In this tutorial, you will use Lingo to add these functions.
You use the Text window to edit text cast members. You will find that most Director cast
member types have associated windows that you can use to view and edit the cast member.
Note: While completing the tutorial, you might find it useful to undo a change that you made.
To undo, select Edit > Undo. Conversely, you can redo what you have undone by selecting
Edit > Repeat.
2 Select Edit > Select All. The entire text block is selected.
4 Give the text cast member a name. Click the Cast Member Name text box at the top of the
window. Then type TitleText, and press Enter (Windows) or Return (Macintosh).
5 Close the Text window, and save your movie.
c In the X text box, type 15. In the Y text box, type 15, and press Enter (Windows) or Return
(Macintosh). The text is placed at precise coordinates on the Stage.
3 Drag the Animation button cast member from the Cast window to the Stage. Place it on the
lower right side of the Stage.
Classic view
Button tool
6 On the Sprite tab of the Property inspector, do the following: In the X text box, type 200. In
the Y text box, type 300, and press Enter (Windows) or Return (Macintosh).
7 Click the Stage outside the button.
The editable text box changes to a completed button sprite. In the Cast window, the new
button cast member takes the next available cast slot, appearing in cast slot 3.
Note: You can also lengthen sprites by dragging their end frames to the right to higher-numbered
frames, and you can edit more than one sprite at the same time by selecting multiple sprite end
frames.
Scene 1 of your movie is almost complete. Later, you will return to this scene to add Lingo
commands to the navigation buttons. Now you will start building scene 2.
Note: As you complete the tutorial, remember to save your work frequently.
The yellow dots in the animation path have become bunched close together near the top of
the animation.
5 Scrub the playhead. The tire slows as it reaches the apex.
6 In the Score, move the playhead to the down phase of the animation (between frames 25
and 34).
7 On the Stage, select the tire sprite.
8 Select Modify > Sprite > Tweening.
9 Move the Ease-In slider bar to 100% and click the OK button.
Later in this tutorial, you will add Lingo script to make the tire animation loop.
The playhead moves to the point that you clicked in the bar, and the window displays the
corresponding frame of video.
■ To scrub through the video, drag the playhead to the right to scrub forward and to the left
to scrub in reverse.
3 In the Cast window, find the Pause cast member and drag it to the Stage. Place the Pause button
on the Stage underneath the QuickTime sprite, just to the right of the Play button. Again,
precise placement is not necessary yet.
4 In the Cast window, find the Rewind cast member and drag it to the Stage. Place the Rewind
button on the Stage underneath the QuickTime sprite, just to the right of the Pause button.
The Rewind button’s sprite appears on the Stage and in channel 4, frames 55 through 64 of
the Score.
5 In the Score or on the Stage, press the Shift key and click the three buttons.
All three buttons are selected, so you can now place all three of them precisely on the Stage.
6 Select Window > Align.
The Align tab on the Design panel is displayed on the lower right side of the screen.
7 On the Align tab, click the Align Vertical Center button. This option aligns the buttons along
the X axis.
8 On the Align tab, click the Distribute Horizontal Center button. This option unifies the
distances between the three buttons.
Later in this tutorial, you will add Lingo to these custom buttons to make them functional.
Sound channels
How the effects channels should look when they are visible
The sound is now ready to play when frames 55 to 64 of your movie play.
4 Rewind and play your movie.
The playhead moves through the frames of your movie quickly. There is not enough time for
the QuickTime sprite or the track1 sound to play through before the playhead reaches frame
64. Later, you will add Lingo to solve this problem.
5 When you finish viewing the movie, click the Stop button at the bottom of the Stage.
The new Animation button sprite appears on the Stage and in frames 55 through 64 in
channel 6 of the Score. Because you already selected frame 55 in channel 6, the sprite
appears in that location when you drag it to the Stage. If you do not preselect a channel in
the Score, the sprite appears in the first available channel in the frame where the playhead
is located.
4 On the Stage, click the Go to Animation button.
5 Use the Sprite tab in the Property inspector, as you did earlier, to give the button an x coordinate
of 350 and a y coordinate of 300.
Each scene of your movie is graphically complete. You are now ready to add Lingo to the buttons,
to let users navigate through the movie.
Note: As you complete the tutorial, remember to save your work frequently.
Script channel
Write a handler
The start scene is the first one that needs a script to loop the playhead. Each time the playhead
leaves one frame to go to the next, an event, called an exitFrame event, occurs. In this case, the
word event refers to an action executed in Director. Your first script will use the exitFrame event
as its trigger.
Each script you write is composed of handlers. A handler is a set of Lingo commands that handle
a specific event, such as the exitFrame event. Some scripts have only one handler and some have
multiple handlers. Each handler begins with the name of the triggering event, such as exitFrame,
and ends with the word end.
When you need to enter or edit scripts in Director, you use the Script window. Each script
becomes a cast member. The Script window contains tools for editing scripts easily.
1 In the Script channel of the Score, double-click frame 10, the last frame of the start scene. The
Script window opens, and it already includes a default handler:
on exitFrame me
end
2 In between these two lines of script, enter the following additional script:
_movie.go(_movie.frame)
The result is a handler that should look like this:
on exitFrame me
_movie.go(_movie.frame)
end
3 Close the Script window. The new script cast member appears in the Cast window in the first
available cast slot. A sprite for the script also appears in the Script channel in frame 10.
4 In the Cast window, select the new script.
5 In the Cast Member Name text box at the top of the Cast window, type Loop. Press Enter
(Windows) or Return (Macintosh).
6 At the bottom of the Stage, below the movie, click the Rewind button. Then also at the bottom
of the Stage, click the Play button to play your movie.
The movie plays to frame 10 and stops. The movie continues to play, even though it loops at
frame 10.
A new marker appears in the Marker bar in frame 15. The text box next to the new marker
contains “New Marker” as placeholder text.
3 In the text box next to the new marker, type Animation, and press Enter (Windows) or Return
(Macintosh) to name the marker.
end
4 On the second line, type the following script:
_movie.go("Animation")
You see the following result:
on mouseUp me
_movie.go("Animation")
end
5 In the Name text box at the top of the Script window, type GoAnim.
6 Close the Script window, and save your movie.
This handler has three parts. The first line tells Director to trigger this handler when the user
clicks on the button sprite to which the script is attached. Specifically, the mouseUp event refers to
the action of releasing the mouse button after it has been pressed. This way the script does not
run until the user releases the mouse button when clicking.
The second line of the handler contains the same code as the previous script that you wrote. It
sends the playhead to the frame that contains the marker named Animation. The difference
between these two scripts is that this one performs its action based on a mouse click, not on
an exitFrame event.
Again, the word end on the last line tells Director that the script is finished.
The Script window opens with the Lingo from the PlayScript cast member visible.
3 Place the insertion point at the end of the second line of the handler that reads as follows:
sprite(1).movieRate = 1
4 Press Enter (Windows) or Return (Macintosh), and type the following on the new line:
sound(1).play(member("track1"))
This Lingo tells Director to play the sound cast member named track1 in sound channel 1. In
the Score, there are two sound channels. When you use Lingo, you can use as many as eight
sound channels.
5 Close the Script window, and save your movie.
6 Rewind and play your movie. The track1 sound now plays each time you press the Play button
in the sound and video scene of the movie.
81
F M
Flash Communication Server MX 9 Macromedia Studio MX 2004, integration with 8
Flash MX 2004 8 manuals available with Director 10
font maps 30 mapping fonts 30
frames markers 22
definition of 22 Markers channel 22
navigating 23, 26 media Xtra extensions 38
memory, preloading content into 21
G Message window 32
graphical view mode in Property inspector 28 Movie tab 29
movies
H adding copyright date to 30
help changing sound volume of 25
new features 9 examples of 8, 41
online help 9 properties of 27
where to get more information 10 selecting colors for 29
hiding setting properties of 29
effects channels 23 starting, stopping, and rewinding 25
information in Property inspector 28 tutorial 41
windows 19 Xtra extensions in 39
moving around on Stage 21
I
importing cast members 27 N
importing media naming sprites and channels 8
DVD-Video 8 navigating to markers 23
Flash MX 2004 8 network preferences 15
increasing view of Stage 21 new features in Director 8
index color 29
installation O
Director software 14 offstage canvas 21
Xtra extensions 14 online help 9
integration with Macromedia Studio MX 2004 8 onstage canvas 21
Internet connection settings 15 opening panel sets 36
introduction to Director 7, 17 opening panels and panel groups 36
introduction to workspace 19 Options menu, location of 33
J P
JavaScript syntax palette 29
introduction to 30 Palette channel 22
scripting in 8 panel groups
jumping to markers 23 adding new tabs to 34
closing, opening, and collapsing 36
L custom versus default 33
learning to use Director 41 customizing 32
Lingo, introduction to 30 definition of 32
list view mode in Property inspector 28 docking 35
location of Stage 30 rearranging tabs in 34
renaming 34
82 Index
panel sets server technologies, integration with 9
definition of 32 setting properties
saving, opening, and removing 36 movies 29
panels sprites and cast members 28
closing, opening, and collapsing 36 showing effects channels 23
definition of 32 showing more or less of Property inspector 28
docking 35 size of Stage 29
moving between panel groups 34 Sound channels 22
playhead sounds, changing volume of 25
location of 22 sprite channels
moving 23 definition of 22
playing DVD-Video 8 setting the number of 24
prebuilt components 8 sprites
preferences compared to cast members 26
for windows 20 editing 28
network 15 introduction to 18
number of sprite channels 24 naming 8
Property inspector Stage
changing view of 27 compared to Score 22
definition of 19, 27 definition of 19, 20
editing cast members and sprites 28 location of 30
information not appearing in 28 metaphor explained 17
setting 3D properties 29 moving around on 21
setting movie properties 29 offstage canvas 21
Proxies option 15 setting properties of 29
publishing 8 size of 29
zooming 21
R standard mode in Message window 32
removing panel sets 36 starting movies 25
rewinding movies 25 stepping through movies 26
RGB color 29 stopping movies 25
Support Center 11
S system requirements 13
saving panel sets 36
Score T
compared to Stage 22 tabs in panel groups, rearranging 34
definition of 19, 22 Tempo channel 22
frames in 22 testing movies 32
metaphor explained 17 tool windows, definition of 20
navigating 23, 26 tooltips 11
number of sprite channels in 24 trace mode in Message window 32
playhead in 22 training in Director 41
turning channels on and off 24 Transition channel 22
zooming 24, 25 transition Xtra extensions 39
Script window, definition of 30 turning channels on and off 24
scripting tutorial 41
JavaScript syntax 8
Xtra extensions 38
scripts, testing and debugging scripts 32
Index 83
U
undocking panels and panel groups 35
V
View Port 35
volume, changing 25
W
Window menu 20
windows
changing preferences 20
displaying and hiding 19
moving between panel groups 34
types of 20
workspace
customizing 8, 19, 32
default settings of 19
X
Xtra extensions
definition of 37
media 38
packaging movies with 39
scripting 38
transition 39
Z
zooming
Score 24
Stage 21
84 Index