Tài liệu Macromedia Director 8 Using Director - Pdf 84

Using Director
DIRECTOR
®
8
macromedia
®
macromedia

®

ii

Trademarks

Afterburner, AppletAce, Attain, Attain Enterprise Learning System, Attain Essentials, Attain Objects for Dreamweaver, Authorware,
Authorware Attain, Authorware Interactive Studio, Authorware Star, Authorware Synergy, Backstage, Backstage Designer, Backstage
Desktop Studio, Backstage Enterprise Studio, Backstage Internet Studio, Design in Motion, Director, Director Multimedia Studio, Doc
Around the Clock, Dreamweaver, Dreamweaver Attain, Drumbeat, Drumbeat 2000, Extreme 3D, Fireworks, Flash, Fontographer,
FreeHand, FreeHand Graphics Studio, Generator, Generator Developer's Studio, Generator Dynamic Graphics Server, Knowledge
Objects, Knowledge Stream, Knowledge Track, Lingo, Live Effects, Macromedia, Macromedia M Logo & Design, Macromedia Flash,
Macromedia Xres, Macromind, Macromind Action, MAGIC, Mediamaker, Object Authoring, Power Applets, Priority Access, Roundtrip
HTML, Scriptlets, SoundEdit, ShockRave, Shockmachine, Shockwave, Shockwave Remote, Shockwave Internet Studio, Showcase, Tools
to Power Your Ideas, Universal Media, Virtuoso, Web Design 101, Whirlwind and Xtra are trademarks of Macromedia, Inc. and may be
registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words or
phrases mentioned within this publication may be trademarks, servicemarks, or tradenames of Macromedia, Inc. or other entities and
may be registered in certain jurisdictions including internationally.
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.


Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
Installing Director . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
What’s new in Director 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Resources for learning Director . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
Director Support Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Conventions used in Director Help and printed books . . . . . . . . . . . . .15

CHAPTER 1

Director 8 Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17

View the completed Shockwave version of GardenChat . . . . . . . . . . . .18
View the completed DIR version of GardenChat . . . . . . . . . . . . . . . . .19
Set up the movie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Create media in Director. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Import cast members. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
Create sprites from cast members . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Create simple tweening animation. . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Blend sprites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Create frame-by-frame animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
Attach behaviors to sprites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Add sound. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Control streaming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
Publish your movie for the Web in one step . . . . . . . . . . . . . . . . . . . . .46
Add multiuser chat functionality to GardenChat. . . . . . . . . . . . . . . . . .47
Create a Shockwave chat movie. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
Continue learning about Director . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54


Moving cast members within the Cast window . . . . . . . . . . . . . . . . . . .97
Organizing cast members within the Cast window . . . . . . . . . . . . . . . .99
Setting Cast window preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
Changing Cast properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102
Viewing and setting cast member properties . . . . . . . . . . . . . . . . . . . .103
Finding cast members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104
Importing cast members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
Launching external editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112
Managing external casts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114
Creating libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116
Setting cast member properties using Lingo . . . . . . . . . . . . . . . . . . . .116
Setting Xtra cast member properties . . . . . . . . . . . . . . . . . . . . . . . . . .117

Contents

3

CHAPTER 4

Sprites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119

Creating sprites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120
Changing sprite preferences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
Selecting sprites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
Layering sprites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
Displaying and editing sprite properties . . . . . . . . . . . . . . . . . . . . . . .125
Locking and unlocking sprites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132
Positioning sprites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Changing the appearance of sprites . . . . . . . . . . . . . . . . . . . . . . . . . . .142
Using sprite inks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150

Lingo syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184
Writing Lingo statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186
Using handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
Using lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194
About variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199
Expressing literal values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202
Using operators to manipulate values . . . . . . . . . . . . . . . . . . . . . . . . .207
Controlling flow in scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210
Creating and attaching scripts with the Script window . . . . . . . . . . . .213
Using linked scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217

CHAPTER 7

Color, Tempo, and Transitions . . . . . . . . . . . . . . . . . 219

Controlling color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220
About tempo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232
Using transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236

CHAPTER 8

Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

About tweening in Director. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240
Tweening the path of a sprite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .241
Accelerating and decelerating sprites . . . . . . . . . . . . . . . . . . . . . . . . . .243
Tweening other sprite properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244
Suggestions and shortcuts for tweening . . . . . . . . . . . . . . . . . . . . . . . .245
Changing tweening settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246
Switching a sprite’s cast members . . . . . . . . . . . . . . . . . . . . . . . . . . . .247


Movies in a Window . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

Creating a MIAW using Lingo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272
Opening and closing a MIAW. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273
Setting the window type for a MIAW . . . . . . . . . . . . . . . . . . . . . . . . .274
Setting the window size and location for a MIAW. . . . . . . . . . . . . . . .275
Cropping and scaling a MIAW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .275
Controlling the appearance of a MIAW. . . . . . . . . . . . . . . . . . . . . . . .276
Listing the current movies in windows . . . . . . . . . . . . . . . . . . . . . . . .276
Controlling interaction between MIAWs. . . . . . . . . . . . . . . . . . . . . . .277
Controlling events involving MIAWs . . . . . . . . . . . . . . . . . . . . . . . . .278

CHAPTER 11

Parent Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279

Similarity with other object-oriented languages. . . . . . . . . . . . . . . . . .280
Parent script and child object basics . . . . . . . . . . . . . . . . . . . . . . . . . .280
Ancestor basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281
Writing a parent script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282
Creating a child object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .285
Removing a child object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287
Using scriptInstanceList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287
Using actorList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288
Creating timeout objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289

Contents

6

Creating text cast members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338
Editing and formatting text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .339
Creating a hyperlink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346
Working with fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .347
Using editable text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .348
Converting text to a bitmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .348
Mapping fonts between platforms for field cast members . . . . . . . . . .349
Setting text or field cast member properties. . . . . . . . . . . . . . . . . . . . .350
Formatting chunks of text with Lingo . . . . . . . . . . . . . . . . . . . . . . . . .353
Formatting text or field cast members with Lingo . . . . . . . . . . . . . . . .354
Controlling scrolling text with Lingo . . . . . . . . . . . . . . . . . . . . . . . . .356
Checking for specific text with Lingo . . . . . . . . . . . . . . . . . . . . . . . . .356
Modifying strings with Lingo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357

Contents

7

CHAPTER 14

Sound, Video, and Synchronization . . . . . . . . . . . 359

Importing internal and linked sounds . . . . . . . . . . . . . . . . . . . . . . . . .360
Setting sound cast member properties . . . . . . . . . . . . . . . . . . . . . . . . .362
Controlling sound in the Score . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362
Looping a sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364
Using sound in Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364
Playing sounds with Lingo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365
About Shockwave Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .367
Compressing internal sounds with Shockwave Audio . . . . . . . . . . . . .368


Contents

8

CHAPTER 16

Playing Movies over the Internet . . . . . . . . . . . . . . . .411

About streaming movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .412
About network operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .413
Setting movie playback options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .414
Setting Shockwave playback options . . . . . . . . . . . . . . . . . . . . . . . . . .415
About creating multiuser applications . . . . . . . . . . . . . . . . . . . . . . . . .416
About streaming with the Score and behaviors . . . . . . . . . . . . . . . . . .423
Checking whether media elements are loaded with Lingo . . . . . . . . . .424
Downloading files from the Internet with Lingo . . . . . . . . . . . . . . . . .425
Retrieving network operation results with Lingo . . . . . . . . . . . . . . . . .427
Using Lingo in different Internet environments . . . . . . . . . . . . . . . . .428
Testing your movie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .431
About downloading speed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .432

CHAPTER 17

Packaging Movies for Distribution. . . . . . . . . . . . . 433

Shockwave browser compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . .433
Previewing a movie in a browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . .434
About Xtras. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .435
Managing Xtras for distributed movies . . . . . . . . . . . . . . . . . . . . . . . .437

for LANs and distribution through CD-ROM and DVD-ROM.

Introduction

10

System requirements

The following hardware and software is the minimum required to author
Director movies:



For Microsoft Windows



: An Intel Pentium

®

II 200 processor running
Windows 95/98 or NT version 4.0 or later; 32 MB of available RAM plus
100 MB of available disk space; a color monitor; and a CD-ROM drive.



For the Macintosh

®

4.5, or America Online 4.0 Web browser; and a color monitor.

Installing Director

Follow these steps to install Director on either a Windows or a
Macintosh computer.

To install Director on a Windows or a Macintosh computer:

1

Insert the Director CD into the computer’s CD-ROM drive.
In Windows, if the installation program doesn’t start automatically, choose Run
from the Windows Start menu, type

d:\setup.exe

(where

d

is your CD-ROM
drive letter), and click OK.

2

On the Macintosh, double-click the Director Installer icon.

3


Asset management fields

on the Cast window, including a comments field and
source control fields, are customizable for each cast member. See “Using Cast List
view” on page 94

Linked scripts

let you store scripts in external text files that can be edited separately
from a Director movie. See “Using linked scripts” on page 217.

Bitmap compression

allows JPEG compression for bitmap members in a DCR.
You can specify compression for individual bitmaps, or at the movie level for all
bitmaps in your DCR. An optimize in fireworks option lets you preview the JPEG
image at various quality settings. Bitmap compression offers a compression
strategy for 32-bit cast members with alpha channel data. See “Compressing
bitmaps” on page 332.

Lockable sprites

help prevent unintentional modifications during authoring. See
“Locking and unlocking sprites” on page 132.

Guides

on the Stage (in addition to the existing grid) help you place elements
precisely. See “Positioning sprites using guides, the grid, or the Align window” on
page 135.

and new parent-child scripting functionality. See
“Parent script and child object basics” on page 280.

Imaging Lingo

lets you create and manipulate bitmap images entirely in Lingo. See
“Controlling bitmap images with Lingo” on page 319.

Sound control Lingo

allows precise, professional quality control of sound
playback. See “Playing sounds with Lingo” on page 365.

Resources for learning Director

The Director package contains a variety of media to help you learn the program
quickly and become proficient in creating multimedia—including online help,
a multimedia Guided Tour, a tutorial, integrated tooltips, printed books, and a
regularly updated Web site.
Director includes the following main instructional components.

Director Help and the Guided Tour

Director Help is the comprehensive information source for all Director features.
The help includes complete conceptual overviews of all features, animated
examples, descriptions of all interface elements, and a reference of all Lingo
commands and elements. They are extensively cross-referenced and indexed to
make finding information and jumping to related topics quick and easy.
The best place to start learning Director is the Guided Tour included with
Director Help. The Guided Tour provides a quick conceptual overview of how to

When you place the pointer over a Director tool for a few seconds, a small tooltip
appears that explains the function of the tool. When a keyboard shortcut is
available, it is included in the tooltip.
In the following illustrations, Director is displaying tooltips for two different tools
in the Cast window.

Keyboard shortcuts

Many commands that are available from Director menus are also accessible
through the use of keyboard shortcuts. When you display a menu or submenu,
the appropriate key combinations are shown next to the commands for which
keyboard shortcuts are available.
The following illustration shows key board shortcuts for a variety of commands
on the Control menu. (The illustration shows Director running on Windows.
When Director is running on a Macintosh, the keyboard shortcuts reflect
Macintosh keys.)

Introduction

14

Director Support Center

The Director Support Center Web site (www.macromedia.com/support/director/)
contains the latest information on Director, plus additional topics, examples, tips,
and updates. Check the Web site often for the latest news on Director and how to
get the most out of the program.
For example, you can visit the Director Support Center for additional information
about these topics:


Specifying chunk expressions with dot syntax



Optimizing bitmaps in Fireworks



Creating Java applets with Director



Creating dialog boxes from the MUI Xtra



Director 8 keyboard shortcuts

Getting Started 15
Conventions used in Director Help and
printed books
The help system and printed books use the following conventions:

The terms Lingo and Director refer to version 8 of Director.

Within the text and in Lingo examples, Lingo elements and parts of actual
code are shown in
this
font. For example,
set answer = 2 + 2

You’re about to see how easy it is to master basic tasks necessary to create a movie
in Director 8. With a few more simple steps, you can add multiuser functionality
to a movie and export the entire project for distribution. By completing this
tutorial, you’ll learn Director fundamentals and acquire a basis for exploring more
advanced Director features.
For the tutorial, you’ll create a movie that plays in the Web page of an
organization called GardenChat. You’ll also take advantage of Director’s
multiuser behaviors to add chat functionality to the site, allowing members of
the organization to discuss gardening tips with each other in real time.
The tutorial assumes no prior knowledge of Director other than the information
provided in the Guided Tour. You should, however, be familiar with basic
computer operations such as using menus and selecting and dragging objects.
The tutorial takes approximately two hours to complete, and it focuses on many
Director processes, including the following:

Creating a new movie, cast members, and sprites

Using inks

Creating animation using tweening, frame-by-frame animation, and blends

Importing media

Synchronizing sound

Attaching behaviors

Controlling streaming over the Web

Publishing your movie for Web playback

2
Browse to your Director application folder, open the Learning folder and the
Completed_Tutorials folder, and then open fun.dir.
3
To play the movie, click Play on the Control Panel or the toolbar along the top
of the screen.
If the Control Panel and toolbar are not visible, you can select them from the
Window menu.
4
After viewing the movie, click Stop and look at the Stage, Score, Cast window,
and Property Inspector to get a sense of how the Director application and
movie are organized.
If the Stage, Score, Cast window, and Property Inspector are not visible, you
can select them from the Window menu.
Rewind Play
Stop
Chapter 120
Set up the movie
To begin your own version of GardenChat, you’ll create a new movie and set the
size of the Stage. You’ll also select an appropriate color palette.
1
Choose File > New > Movie.
2
If you’ve made changes to the Fun.dir movie, Director prompts you to save
them. Choose Don’t Save.
Note that the default Stage is a different size than the Stage in the completed
GardenChat movie.
3
To change your Stage size, click the Movie tab of the Property Inspector.
If the Property Inspector is not open, choose Window > Inspectors > Property.

Director lets you create multiple-curve vector shapes: mathematical descriptions
of shapes filled with color or gradient colors. A vector shape uses much less
memory than a comparable bitmap and downloads faster from the Internet.
You will create a vector shape filled with gradient colors to serve as your
movie’s background.
1
Choose Window > Vector Shape.
2
Click the Filled Rectangle tool and drag the cross hair from the upper left
corner of the Vector Shape window to the lower right corner, creating a
rectangle close to the size of your Stage.
Exact size is not important; you can resize the image later.
3
Click the rightmost Gradient Colors box and select a dark to medium shade of
blue from the Color menu.
4
Click the leftmost color box and select a light sky blue.
5
Click the Gradient button to create a smooth transition from light blue to
dark blue.
6
From the Gradient Type pop-up menu at the top of the window, select Radial.
Radial creates a circular, rather than linear, gradient effect.
Director 8 Tutorial 23
7
In the Y Offset box, type -70. (If you do not see the Y Offset box, make the
window larger.)
This offsets the center of the gradient by moving it up 70 pixels, creating a
sunlit sky effect.
You would use a positive number in the Y Offset box to move the


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status