background image

Chapter 20

524

Camera commands

These camera functions allow you to 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.

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 xy, and z values are relative to the position of the 
node. If they are world-relative, their xy, and z directions are relative to the world.

Vector math operations perform calculations using each of the xy, and 

z

 values. These 

calculations are useful for performing intelligent movement and rotation of models.

Function

Description

Returns

worldSpaceTo
SpriteSpace
(

vector

)

Returns the 2D sprite-space coordinates of a point from a 3D 
world vector.

A point.

spriteSpaceTo
WorldSpace
(

point

)

The opposite of the 

worldSpaceToSpriteSpace

(

vector

)

, this function returns a world-space vector on the 

camera’s projection plane from a sprite-space point.
Multiple world-space positions can map to the same sprite-
space point. A round-trip

y=worldSpaceToSpriteSpace(x)
z=worldSpaceToSpriteSpace(y)

won’t necessarily result in 

x=z

.

A vector.

modelUnder
Loc(point)

Returns the first model intersected by a ray from a location 

point

 

within the 

rect

 of the sprite using this camera. The 

location 

point

 

is relative to the upper left corner of the sprite, in 

pixels. The ray is cast forward in the direction the camera is 
looking.
This function is useful for picking in conjunction with an 

onMouseDown

 handler. For accuracy, be sure to subtract the 

upper left corner of the sprite’s 

loc

 from the 

mouseLoc

.

The first model 
intersected by the ray.
A value of 

void

 means 

there is no model under 
the ray.

modelsUnder
Loc(point, 
optionalMax
NumberOf
Models)

Returns a list of all models intersected by a ray from a location 

point

 

within the 

rect

 of the sprite using this camera. The 

location 

point

 

is relative to the upper left corner of the sprite, 

in pixels. The ray is cast forward in the direction the camera 
is looking.
This function is useful for picking in conjunction with an 

onMouseDown

 handler. For accuracy, be sure to subtract the 

upper left corner of the sprite’s 

loc

 from the 

mouseLoc

.

The first model 
intersected by the ray or 
a list of up to the 
specified maximum.
If no maximum is 
specified, the command 
returns all models under 
the ray.

A value of void

 

means there is no model 
under the ray.

modelsUnder
Ray(

location

Vector

,

direction
Vector

,

optionalMax
NumberOf
Models

)

Returns a list of models under the ray starting at the vector 

locationVector

 

and pointing down the vector 

directionVector

with both vectors specified in world-

relative coordinates.

The first model 
intersected by the ray 
plus a list of up to the 
specified maximum 
number of models.
If the maximum number 
of models isn’t specified, 
all models the ray 
intersects are returned.

Содержание Director MX

Страница 1: ...Using Director MX Macromedia Director MX ...

Страница 2: ...ide 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 responsibi...

Страница 3: ... in the Score 43 About adding interactivity with Lingo 44 Converting movies created in previous versions of Director 45 Managing the Director authoring environment 45 About using Xtra extensions to extend Director functionality 50 About distributing movies 51 Answers panel 52 CHAPTER 2 Director MX Basics Tutorial 53 What you ll learn 53 About the Director metaphor 54 View the completed movie 55 Op...

Страница 4: ...rs 111 View a 3D world 112 Use the camera 112 Set model rollover cursors 121 Use 3D behaviors for navigation 122 Play your completed movie 125 To learn more 126 CHAPTER 4 Cast Members and Cast Windows 127 Creating new casts 128 Creating cast members 130 Using the Cast window 131 Naming cast members 136 Using Cast List view 136 Using Cast Thumbnail view 137 Moving cast members within the Cast windo...

Страница 5: ...ing sprite frames 192 Frame by frame animation 193 Shortcuts for animating with multiple cast members 195 Using film loops 197 Setting film loop properties 198 Step recording animation 199 Real time recording animation 200 Linking a sequence with Paste Relative 201 Animating sprites with Lingo 201 CHAPTER 7 Bitmaps 203 About importing bitmaps 204 Using animated GIFs 205 Using the Paint window 206 ...

Страница 6: ...mpo and Transitions 255 Controlling color 255 Setting palette cast member properties 266 About tempo 267 Using transitions 270 CHAPTER 10 Text 273 Embedding fonts in movies 274 Creating text cast members 275 Editing and formatting text 276 Creating a hypertext link 282 Working with fields 282 Using editable text 283 Converting text to a bitmap 284 Mapping fonts between platforms for field cast mem...

Страница 7: ... internal and linked sounds 320 Setting sound cast member properties 321 Controlling sound in the Score 321 Looping a sound 322 Using sound in Windows 323 Playing sounds with Lingo 323 About Shockwave Audio 325 Compressing internal sounds with Shockwave Audio 326 Streaming linked Shockwave Audio and MP3 audio files 326 Playing Shockwave Audio and MP3 audio with Lingo 327 Synchronizing media 328 Sy...

Страница 8: ...with Lingo 375 Detecting mouse clicks with Lingo 377 Making sprites editable and draggable 377 Making sprites editable or moveable with Lingo 378 Checking which text is under the pointer with Lingo 379 Responding to rollovers with Lingo 379 Finding mouse pointer locations with Lingo 380 Checking keys with Lingo 380 Equivalent cross platform keys 380 Identifying keys on different keyboards 381 Abou...

Страница 9: ...e 3D cast member 455 Model resources 456 Models 458 Shaders 458 Textures 459 Motions 460 Lights 460 Cameras 461 Groups 462 Creating 3D text 462 Modifying 3D text 463 Lingo for 3D text 464 Using 3D behaviors 466 CHAPTER 19 Working with Models and Model Resources 473 About models and model resources 473 Model resources 473 Primitives 474 Cast member commands 481 Models 482 Shaders 487 Textures 494 G...

Страница 10: ...CHAPTER 22 Using the XML Parser Xtra 543 About XML 543 Using XML parser objects 544 Using XML document nodes 545 Accessing attributes 548 Parser objects and XML nodes 548 Treating white space 549 XML and character sets 549 CHAPTER 23 Making Director Movies Accessible 551 About government requirements 551 Making Director movies accessible 551 Using the Accessibility behavior library 552 Using acces...

Страница 11: ...nd frame by frame bitmaps 586 Setting QuickTime export options 588 About organizing movie files 590 CHAPTER 27 Using Shockwave Player 591 About streaming movies 591 About network operations 592 Setting movie playback options 592 Setting Shockwave playback options 593 About creating multiuser applications 594 About streaming with the Score and behaviors 594 Checking whether media elements are loade...

Страница 12: ...Contents 12 ...

Страница 13: ...0 processor running Windows 98 2000 or XP 128 MB of available RAM plus 100 MB of available disk space a color monitor and a CD ROM drive For the Macintosh A Power Macintosh G3 running System 10 1 or later 128 MB of available RAM plus 100 MB of available disk space a color monitor and a CD ROM drive The following hardware and software are the minimum required to play back Director movies For Micros...

Страница 14: ...the application s strong integration with Macromedia Flash MX ColdFusion MX Flash Communications Server MX and other Macromedia MX products The Macromedia MX workspace lets you organize and customize an environment that s shared among Dreamweaver MX Fireworks MX and Macromedia Flash MX The familiar and flexible working environment helps you maximize productivity Dockable panels can be grouped and ...

Страница 15: ...able accessible content that doesn t rely on screen readers Any user with Shockwave Player and an installed speech engine which ships with current operating systems can then use your accessible content Drag and drop accessibility behaviors in Director MX let you easily control speech and tab ordering as well as synchronize text with spoken words in order to repurpose existing Director applications...

Страница 16: ...ing the printed books Using Director MX and Director MX Lingo Dictionary both of which are also available as online help Using Director MX contains two tutorials The Director MX workspace contains tooltips and context sensitive help and additional help is available on the Director MX website at www macromedia com support director The new Answers panel in the Director workspace gives you a quick an...

Страница 17: ...f the item Keyboard shortcuts Many commands that are available from Director menus are also accessible through 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 Direct...

Страница 18: ...aight quotation marks rather than as curly quotation marks The continuation symbol which you enter by pressing Alt Enter Windows or Option Return Macintosh indicates that a long line of Lingo has been broken onto two or more lines Lines of Lingo that are broken this way are not separate lines of code When you see the continuation symbol in this book type the lines as one line when you enter them i...

Страница 19: ...ie can link to external media or be one of a series of movies that refer to one another Your users view completed Director movies in one of the following ways In the Macromedia Shockwave movie 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 fr...

Страница 20: ...ector The Stage If the Stage is not open select Window Stage The Stage is the visible portion of a movie on which you determine where your media elements appear During authoring you have the ability to define the properties of your Stage such as its size and color As you work on your movie you can use zooming to make the Stage either larger or smaller than the original movie while also scaling the...

Страница 21: ...y back in the authoring environment To go to a specific frame number in a movie enter the number in the frame counter and press Enter Windows or Return Macintosh You can also use the toolbar buttons or keyboard shortcuts to play a movie By default the Control panel is attached to the bottom of the Stage You can turn it into a floating panel by detaching it To detach the Control panel from the Stag...

Страница 22: ...ch the floating Control panel to the Stage do one of the following Right click Windows or Control click Macintosh the Control panel In the context menu select Attach Control Panel Right click Windows or Control click Macintosh the Property inspector or Tool palette In the context menu select Attach Control Panel The Score If the Score is not visible select Window Score The Score organizes and cont...

Страница 23: ...dow you can view your cast members which are the media in your movie such as sounds text graphics and other movies Cast members can also include assets that you use in your Score but not on the Stage such as scripts palettes fonts and transitions You can create cast members in Director and you can import existing media to include in your cast The Cast window lets you view your cast members as a li...

Страница 24: ...s of any selected object or multiple objects in your movie After you select an object relevant category tabs and associated fields appear in the Property inspector If you select multiple objects only the information that is common to all the selected objects appears The List View Mode icon in the Property inspector lets you toggle between a List and a Graphical view List View Mode icon ...

Страница 25: ...hat appears in the Property inspector depending on what is selected In the first illustration a sprite is selected In the second illustration a cast member is selected To show more or less information in the Property inspector Click the expander arrow in the Property inspector ...

Страница 26: ...Chapter 1 26 The following illustrations show different information appearing in the Property inspector depending on whether the expanded information is hidden or shown ...

Страница 27: ...he Stage during playback if the movie does not take up the full screen select an option from the Location pop up menu or enter values for Left and Top these values specify the number of pixels the Stage is placed from the upper left corner of the screen and they apply only if the Stage is smaller than the current monitor s screen size Centered places the Stage window in the center of your monitor ...

Страница 28: ...s Software specifies Director s built in software renderer that works with Macintosh and Windows platforms Auto specifies that the most suitable renderer should be selected This option is the default value for this property Note If the preferred renderer is not available on the client computer the movie selects the most suitable available renderer 10 To enter copyright and other information about ...

Страница 29: ...c Stage size To zoom in while selecting an area of the Stage to center within the zoomed window select the Magnifying Glass tool from the Tool palette Click a point on the Stage to zoom and center To zoom out while selecting an area of the Stage to center within the zoomed window select the Magnifying Glass tool from the Tool palette Press Alt Windows or Option Macintosh while clicking a point on ...

Страница 30: ...0 channels most movies use as few channels as possible to improve performance in the authoring environment and during playback Sprites in higher channels appear on the Stage in front of sprites in lower channels Use the Property inspector s Movie tab to control the number of channels in the Score for the current movie See Setting Stage and movie properties on page 27 Turning channels on and off To...

Страница 31: ...on To show or hide the special effects channels Click the Hide Show Effects Channels button in the upper right corner of the Score to change the display About Frames A frame in a movie represents a single point in time which is similar in theory to a frame in a celluloid film Numbers are listed horizontally in the sprite and special effects channels represent frames Setting the number of frames di...

Страница 32: ...e the playhead to that frame and you can drag the playhead backward or forward through frames Changing your view of the Score To narrow or widen the Score you change the zoom percentage Zooming in widens each frame which lets you see more data in a frame Zooming out shows more frames in less space and is useful when moving large blocks of Score data To change the zoom setting Select View Zoom and ...

Страница 33: ...e zoomed out to 50 Score at 100 Score zoomed in to 200 You can also display more frames in a Score without changing the zoom setting To do so place a sprite in the rightmost frame of the Score Director automatically displays additional frames in the current view of the Score Zoom pop up menu ...

Страница 34: ...ductivity You can group panels together in a tabbed view to form a panel group expand and collapse panels and panel groups and dock panels or panel groups to each other or to the Director application window Windows only You can dock panels to each other in the Macintosh and Windows versions of Director MX Window types There are two types of windows in Director MX document windows and tool windows ...

Страница 35: ...ndows Property inspector Tool palette Object inspector Library palette Behavior inspector Text inspector Memory inspector Control panel Onion Skin Align Color palettes Markers Tweak Managing panels and panel groups A panel is a window that you can group with other panels to form a panel group dock to other panels or Windows only to docking channels in the application window itself and collapse and...

Страница 36: ...he Options menu see Using panel Options menus on page 40 Right click Windows or Control click Macintosh on the panel group s header bar and select Close Panel Group Select the window name from the Window menu or use the keyboard shortcut for the window undocked panels only Docked panels will collapse rather than close if you perform this last option For more information on docking see Docking pane...

Страница 37: ...nter of the docking channel s separator bar Collapsing a docking channel increases the space allocated to the View Port To resize a docking channel Drag the docking channel s separator bar Panel docking is restricted by window type On both Macintosh and Windows versions of Director MX document windows can be docked together for example the Score window with the Cast window and utility windows can ...

Страница 38: ...mize button Windows only Note To return the document window to its original state double click the Title bar again or click the Restore Down button Windows only Working with panel groups You can combine individual panels to form a panel group or tabbed panels Windows that you can combine in a panel group are restricted by window type and functionality The following types of panel groupings are all...

Страница 39: ... new name for the panel in the Panel Group Name text box and click OK To rearrange the order of tabs within a panel group 1 Select a tab within a panel group 2 Select Group Panel Name With from the panel group s Options menu Then select the name of the panel group that contains the selected panel The tab is moved to the last right most position in the panel group Note Whenever you make changes to ...

Страница 40: ...rictions see Working with panel groups on page 38 Rename Panel Group opens the Rename Panel Group dialog where you can rename the panel or panel group If the current window cannot be renamed this item is dimmed For more information see Working with panel groups on page 38 Close Panel Group closes the panel group Saving panel layouts You can save the current panel layout as well as open or remove a...

Страница 41: ... To change Score settings 1 Select Edit Preferences Score 2 The Extended display option lets you display information within sprites in the Score See Displaying sprite labels in the Score on page 165 To specify what cast member information appears in numbered sprite channels when Extended display is on select from the following options Cast Member displays the cast member number name or both Behavi...

Страница 42: ...as navigation references than frame numbers which can change if you insert or delete frames in the Score You can use the Markers window to write comments that are associated with markers you set in the Score and to move the playhead to a particular marker To create a marker 1 Click the markers channel A text insertion point appears to the right of the marker 2 Type a short name for the marker To d...

Страница 43: ...arker name that appears in the comments column When the insertion point appears click again to deselect the marker name and press Control Enter Windows or Control Return Macintosh to start a new line Then start typing your comments 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 co...

Страница 44: ... the entire sprite can fit without being truncated or overwriting other sprites To add new frames 1 Select a frame in the Score 2 Select Insert Frames 3 Enter the number of frames to insert The new frames appear to the right of the selected frame Sprites in the frames you select are extended or tweened For more information about tweening see Chapter 6 Animation on page 185 About adding interactivi...

Страница 45: ...irector 8 or Director 8 5 for use in Director MX You can also update movies to Director MX by simply opening and saving them but the Update Movies command is faster for converting large projects It s also more effective for preserving links to external media See Processing movies with Update Movies on page 585 Note Macromedia Shockwave Player 8 5 can play Shockwave movies created with Director 5 6...

Страница 46: ...r depth of a movie on page 256 Animate in Background runs animation in the background while you work with other applications When you are running animation in the background the Stage remains on the screen and the active application window appears in front of the Stage 3 To set defaults for the Director user interface select User Interface options Dialogs Appear at Mouse Position displays dialog b...

Страница 47: ...ight 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 you are always viewing the most current version of a page 7 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 ...

Страница 48: ...xt cast art cast thumbnails and the comments in the Markers window The Scripts Cast Text Cast Art and Cast Thumbnails print options specify a range of casts and cast members internal or external Information that appears in the Print dialog box depends on the selection to be printed 3 To specify which frames of your movie are printed select one of the following Frames options Current Frame prints t...

Страница 49: ...y intensive operation Note The Memory inspector is not available on Macintosh To use the Memory inspector 1 Select Window Memory Inspector 2 Observe the following memory use indicators Total Memory displays the total system memory available including the amount of RAM installed on your computer and any available virtual memory Physical Memory shows the amount of actual RAM installed in the system ...

Страница 50: ...or displays a red X as a placeholder Types of Xtra extensions The following types of Xtra extensions are supplied with Director Cast member Xtra extensions provide new media types to Director They create or control a wide range of objects for use as cast members Some of the cast member types built into Director such as Shockwave Flash Vector Shape and Animated GIF are provided as Xtra extensions X...

Страница 51: ...ute the movie as a Shockwave movie that plays within a web page or as a projector that downloads to the user s computer or that you distribute on a disk A Shockwave movie is a compressed version of the movie data only A projector is a stand alone version of a movie You can include several movies in a single projector Projectors appear on the system desktop as applications For more information abou...

Страница 52: ...uick access to information that helps you work effectively with Director including TechNotes articles and other useful content To open the Answers panel Select Window Answers To get the latest Director information from macromedia com Click the Update button ...

Страница 53: ...on sound and video The movie you ll create is designed to suggest what is possible with Director rather than simulate a fully developed Director project What you ll learn This tutorial introduces you to the basic skills needed to build a Director movie These include the following Becoming familiar with Director windows Specifying movie properties Creating cast members within Director and from impo...

Страница 54: ...re However the score of a Director movie contains more than just music The Score window in Director contains information about when and where each of the cast members will appear on the Stage The Score describes the action that will happen in the movie 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 by creating ...

Страница 55: ...ntrol 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 sunset The third scene contains a digital video and buttons that control it Each of these scenes also contains navigation buttons 5 When you finish viewing the movie either click the Stop button on the ...

Страница 56: ...he List View Mode icon to deselect it The Property inspector lets you change attributes of a selected object 2 In the Stage Size pop up menu select 500 x 330 Note You can view tooltips for pop up menus and text boxes by moving the pointer over the icon next to the menu 3 If the Score is not open select Window Score In the Property inspector type 50 in the Channels text box and press Enter Windows ...

Страница 57: ...utorial 57 4 In the Property inspector select a dark orange color from the Stage Fill color picker 5 Save your movie by selecting File Save or clicking the Save button in the toolbar Window Toolbar Stage Fill color picker ...

Страница 58: ...oggle from List view to Thumbnail view click the Cast View Style button in the upper left corner of the Cast window The Cast window contains cast members that you can use in your movie The first is a text cast member It contains the text Director Basics 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 typ...

Страница 59: ...ociated windows that you can use to view and edit the cast member 2 If the text is not already selected select it then select 36 point from the Size pop up menu in the tool bar near the top of the window Note While completing the tutorial you might find it useful to undo a change you ve made To undo select Edit Undo or press Control Z Windows or Command Z Macintosh Conversely you can redo what you...

Страница 60: ...ols when where and how cast members appear in a movie You create sprites by placing cast members on the Stage or in the Score To build the first scene of the movie you place sprites of the TitleText cast member and two buttons on the Stage One of the buttons is already in the cast you ll create the other button Add sprites to the Stage To begin building the scene you drag the TitleText and button ...

Страница 61: ...e to select it On the Sprite tab in the Property inspector select Background Transparent from the Ink pop up menu Inks control the way a sprite color appears on the Stage Background Transparent ink makes the white background of the sprite appear transparent 4 To place the text precisely on the Stage in the Property inspector type 109 in the X text box and 38 in the Y text box to specify the Stage ...

Страница 62: ...lick the button cast member in cast slot two 2 Click the Cast Member Name text box at the top of the Cast window and type Animation Press Enter Windows or Return Macintosh 3 Drag the Animation button cast member from the Cast window to the Stage Place it on the left side of the Stage below the title text 4 Select the button sprite on the Stage In the Property inspector type 110 in the X text box a...

Страница 63: ...bers Cast members are often created in separate windows and then dragged from the Cast window to the Stage You create a button cast member directly on the Stage using the Tool palette You ll use the Button tool to create a new button 1 On the Tool palette Window Tool Palette click the Push Button tool 2 Drag a horizontal rectangle toward the right side of the Stage as shown in the following illust...

Страница 64: ...u learned earlier in this tutorial when you drag cast members onto the Stage you create sprites Sprites are instances of cast members that appear on the Stage and in the Score window The Score window displays the sprites on the Stage in each frame of your movie You can use the Score window to view information about sprites and edit them Sprites versus cast members Several sprites can refer to the ...

Страница 65: ...ify Extend Sprite The sprites shorten in length so they occupy only frames 1 through 10 You can use the Extend Sprite command to either lengthen or shorten sprites Change the default length of sprites You can change the default length of sprites that you drag to the Stage and Score by editing the Sprite Preferences You ll now change the default sprite length to 10 frames which makes it easier to c...

Страница 66: ...art in frame 15 you ll place a sprite of the mountain range on the Stage in frame 15 1 Open the Stage if it is not already open by selecting Window Stage 2 Open the Score if necessary and click frame 15 in the frame number bar above channel 1 The playhead moves to frame 15 Because there are no sprites in frame 15 the Stage appears empty 3 Drag the mountain cast member from slot 4 of the Cast windo...

Страница 67: ...n cast member in cast slot 4 Click the Name text box at the top of the Cast window and type Mountain Press Enter Windows or Return Macintosh Draw using the Paint window The animation of the sunset will also include an animated cloud You ll create the cloud in the Paint window which you can use to create and edit bitmap graphic cast members 1 To open the Paint window select Window Paint The Paint w...

Страница 68: ...t of line widths at the bottom of the left side Paint window toolbar 5 In the Paint window draw a small flat cloud with the pencil tool Be sure that the cloud has no gaps in the outline Use the Eraser tool if necessary to erase lines drawn in error Eraser tool Paint Bucket tool Pencil tool Foreground Color pop up menu Gradient start color Gradient end color One pixel line ...

Страница 69: ...to fill enclosed lines 2 Select an orange color from the Gradient Start color box This will be the starting color of your gradient Your cloud will look best if you select the same orange you used for the cloud outline 3 Select a darker orange or a red from the Gradient End color box This will be the ending color of your gradient 4 Select the Gradient ink from the Ink pop up menu at the bottom of t...

Страница 70: ...on as mathematical descriptions of an image Because of this difference vector cast members generally use less memory than comparable bitmap cast members There are some differences in the kinds of effects you can achieve and the methods used to create various shapes and fills for each of these cast member types By experimenting with both types of images you can determine if your art is better suite...

Страница 71: ...e of the window 2 Select 0 point from the Stroke Width pop up menu 3 Drag the pointer in the window to make a circle 4 Click the first Gradient Color box on the left and select a bright shade of yellow This will be the beginning color of the gradient on the sun Filled Ellipse tool Stroke Width pop up menu Gradient color boxes ...

Страница 72: ...or boxes 7 The gradient fill in the circle changes color from left to right To rotate the gradient so it changes from top to bottom enter 90 in the Angle text box at the top of the window 8 Click the Cast Member Name text box at the top of the window and type Sun Press Enter Windows or Return Macintosh 9 Save your movie and close the Vector Shape window Gradient ...

Страница 73: ... is not already on frame 15 the beginning of the second scene click frame 15 in the frame number bar at the top of the Score 2 Make sure the Cast and Stage windows are open Drag the Cloud cast member from the Cast window to the Stage window Place it near the top of the Stage window slightly to the right of center 3 Select the Cloud sprite on the Stage In the Property inspector Window Property Insp...

Страница 74: ...esent points in the sprite s animation path When you first drop a sprite on the Stage there is no animation so there s only one dot The line on the Stage that connects the dots represents the animation path of the Cloud By dragging the dots you are specifying the sprite s location on the Stage at the beginning and at the end of its sprite span in the Score The blue dot that remains in the middle o...

Страница 75: ...eed to lengthen the Mountain sprite to extend the duration of the entire animation scene 3 Click the end frame of the Mountain sprite in frame 24 of the Score and drag the end frame to frame 50 The next step in building this scene is to add the Sun sprite and animate the sunset Create a sunset animation To create the sunset animation you will use tweening animation again 1 Click frame 15 in the fr...

Страница 76: ...ountains because the stacking order of sprites on the Stage is from the lowest numbered Score channel to the highest numbered channel The sprites in lower numbered channels appear below sprites in higher numbered channels The solution is to move the sprites in the Score so the Sun sprite is in the lowest numbered channel This lets it appear beneath the other sprites in the scene To change the stac...

Страница 77: ...rns users to the first scene Later you ll add Lingo to these buttons to make them function Add an existing button First you add the Go to Sound and Video button that you created earlier for scene 1 1 Click frame 15 in the frame number bar in the Score 2 Drag the SoundVideo button cast member from the Cast window to the lower right side of the Stage window A new sprite appears in the Score beginnin...

Страница 78: ... 4 In the button text box type Go to Start and then click the Stage outside the button 5 In the Cast window select the new button cast member and type GoStart in the Cast Member Name text box at the top of the Cast window Press Enter Windows or Return Macintosh 6 Drag the end of the new button sprite in channel 5 from frame 24 to frame 50 7 Select the GoStart button on the Stage On the Sprite tab ...

Страница 79: ... sunset animation once before returning to frame 1 and playing again 4 If your movie plays only once turn on looping by clicking the Loop Playback icon on the Control panel or by selecting Control Loop Playback 5 When you finish viewing the movie either click the Stop button on the Control panel or select Control Stop Later in this tutorial you ll add Lingo scripts to make the buttons function and...

Страница 80: ...ference rather than fully import your media Referencing media offers greater flexibility in terms of how you manage and where you locate your media assets When the referenced file is edited using the Launch and Edit feature of Director there s no need to import the edited file again The first cast member you ll use in the sound and video scene is a QuickTime digital video file Digital video files ...

Страница 81: ...ause button reverts to a Play button The QuickTime window has its own playhead that moves to the right as the video plays You can use the playhead to jump to a specific point in the video or to scrub through the video To jump to a specific point in the video click in the bar to the right or left of the playhead The playhead moves to the point that you clicked in the bar and the window displays the...

Страница 82: ...o Stage option which lets the video play at the fastest possible speed However when Direct to Stage is selected for digital video the video appears in front of all other sprites regardless of the channel that contains the sprite To verify that Direct to Stage is selected for the Ouch sprite complete the following steps 1 Select the Ouch cast member in the Cast window not on the Stage 2 In the Prop...

Страница 83: ...em control the QuickTime sprite You ll put the buttons near the bottom of the QuickTime sprite allowing room on the Stage for the scene navigation buttons as well 1 To place the Play button on the Stage click frame 55 in the frame number bar in the Score if the frame is not already selected 2 Drag the Play button from the Cast window to the left side of the Stage directly beneath the QuickTime spr...

Страница 84: ...es at once by selecting them all in the Score or on the Stage and selecting the new ink in the Property inspector 5 In the Score or on the Stage Shift click the three buttons 6 Select Background Transparent from the Ink pop up menu on the Property inspector Sprite tab The white bounding boxes of the sprites become transparent 7 To place the buttons precisely select a button on the Stage and use th...

Страница 85: ...elect File Import In the Import dialog box navigate within your Director MX application folder to Tutorials Basics BasicsMedia folder and open the Sounds folder 2 Select the sound file named drumloop and click Add The drumloop file appears in the file list 3 Select Link to External File from the Media pop up menu at the bottom of the dialog box This tells Director to import only a reference to the...

Страница 86: ...t member from the Cast window to frame 55 in sound channel 1 The sound is now ready to play when frames 55 to 64 of your movie play 2 Rewind and play your movie The playhead moves through all the frames of your movie quickly Notice that there isn t enough time for the QuickTime sprite or the drumloop sound to play through before the playhead reaches frame 64 Later you ll add Lingo to solve this pr...

Страница 87: ...n the Score to the sound and video scene When you do this the button occupies the same space on the Stage in both scenes 1 Drag the end frame of the GoStart button sprite in frame 50 channel 6 to frame 64 channel 6 The sprite lengthens in the Score and appears at the lower left corner of the Stage in the sound and video scene Now you need to add the button that navigates to the animation scene Bec...

Страница 88: ...pts that control the playhead Loop the playhead with Lingo The scenes of your movie aren t much good as scenes if the playhead simply races through them without stopping to let the user absorb their content The playhead needs to stay in one scene until the user makes a decision to go to a different scene To make the playhead stay in one scene you loop it in a single frame or a series of frames For...

Страница 89: ...dow select the new script and type Loop in the Cast Member Name text box at the top of the window Press Enter Windows or Return Macintosh 6 Rewind and play your movie The movie plays to frame 10 and stops The movie still plays even though it stops at frame 10 Stop the movie The handler you ve written has three parts The first line on exitFrame me tells Director to run this script when the playhead...

Страница 90: ...the last frame of the animation scene However this new script will send the playhead to the first frame of the animation rather than to the frame where the script is located Because the first frame of the animation scene is frame 15 you can simply write a script that says go to frame 15 The problem with this script is that it s not too flexible If you decide to move the animation scene to a differ...

Страница 91: ...cript already entered 2 Inside the default script on line 2 type the following go to frame Animation 3 In the Name text box at the top of the window type AnimLoop and close the Script window The new script cast member appears in slot 14 of the Cast window and the new sprite appears in frame 50 of the script channel in the Score 4 Click frame 15 in the frame number bar in the Score and click the Pl...

Страница 92: ...ite 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 is 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 you wrote It sends the playhead to the frame that contains the marker named Animation The dif...

Страница 93: ... press Enter Windows or Return Macintosh Save your movie Write Lingo that refers to scenes You can write scripts that refer to any of the three scenes by name You ll now add a script to the Go to Sound and Video button in the start scene 1 In the Score right click Windows or Control click Macintosh the SoundVideo sprite in channel 3 frames 1 through 10 In the context menu select Script The Script ...

Страница 94: ...navigation buttons is to add the GoAnim script you ve already written to the Go to Animation button in the sound and video scene Add scripts to the sound and video scene You ve already added the navigation script to the Go to Start button in the sound and video scene To complete the navigation buttons you only need to add a script to the Go to Animation button After that you ll use Lingo commands ...

Страница 95: ...eo plays from start to finish once To play the video again without first leaving the scene you need to rewind it You rewind the video by setting its movieTime property The movieTime property indicates the time within the digital video that currently appears on the screen The movieTime is measured in ticks or 60ths of a second For example when the movie displays the very first frame of video the mo...

Страница 96: ... sprite with a dot or period The equal sign is sufficient to indicate that the property should be set to the specified value as in sprite 1 movieTime 0 7 Close the Script window Rewind and play your movie Click the Go to Sound and Video button in the start scene The movie jumps to the sound and video scene and the QuickTime sprite begins to play 8 When the QuickTime sprite finishes playing click t...

Страница 97: ...ou can also add Lingo to make a short sound effect play when the video control buttons are clicked Control sound with Lingo To control sound with Lingo you use commands that are specifically intended for use with sounds The first step is to add Lingo to play the drumloop sound when the video plays a second time For this task add the play command to the PlayScript Lingo you ve already written 1 In ...

Страница 98: ...he video will resume and the sound plays again Modify the script for the Rewind button You can modify the RewindScript Lingo so that the sound stops when the user clicks the Rewind button 1 In the Cast window select the RewindScript cast member and click the Cast Member Script button at the upper right of the window 2 In the Script window place the insertion point at the end of the third line of t...

Страница 99: ...e new line type the following Lingo sound 2 play member button The 2 specifies the second sound channel 4 Close the Script window and save your movie 5 Repeat steps 1 through 4 for the PlayScript and PauseScript cast members Play your completed Director movie You ve now completed authoring your Director movie You can play the movie and move from scene to scene with the navigation buttons you creat...

Страница 100: ...mode the files must be in a folder named dswmedia This is the only folder name that lets the Player access linked local files The file naming convention applies only to DCR movies that you play on your local computer if you upload your files to an Internet server your linked media does not need to reside in a folder named dswmedia Complete the following steps to create a copy of your movie within ...

Страница 101: ...essary a message appears that advises your user to update the Shockwave installation 1 Open the version of the My_Basic_start movie that resides on your desktop within the dswmedia folder 2 Select File Publish Settings 3 On the Formats tab of the Publish Settings dialog box select Detect Shockwave from the HTML Template pop up menu 4 Verify that View in Browser is selected and click OK 5 Save your...

Страница 102: ...e Score Use sounds Write simple Lingo scripts Publish your movie for web playback To learn more about using Lingo to create sophisticated Director movies see Chapter 16 Writing Scripts with Lingo on page 385 That chapter contains information about precisely controlling sound playback and other aspects of your Director projects For information on how to publish Director movies as standalone applica...

Страница 103: ... movie without using the Lingo scripting language directly Lingo enthusiasts can refer to 3D Lingo by Feature in the Lingo Dictionary for information on Lingo syntax in Director MX The tutorial takes approximately one hour to complete It covers 3D basics including creating 3D text and using behaviors to rotate a model change camera perspectives and enable navigation Additionally the tutorial expla...

Страница 104: ...e scene Press the Spacebar to return to the original view 5 When you finish viewing the movie either click Stop along the bottom of the Stage window or select Control Stop Open the tutorial movie To begin the tutorial you ll open a partially completed DIR file 1 Select File Open 2 Browse to the Director MX application folder and open Tutorials 3D Magic_start dir Note When you open this file Direct...

Страница 105: ...tle text is 2D text created in Director MX 3 In the Score Window Score select frame 1 in channel 3 4 Drag the Title text cast member from the Internal Cast window to the upper left area of the Stage as shown in the following illustration The placement doesn t need to be precise you will use the Property inspector to specify placement coordinates 5 If the Property inspector is not open select Windo...

Страница 106: ... Windows or Return Macintosh You use the X and Y text boxes to place the sprite precisely 7 Type 70 in the End frame text box and press Enter Windows or Return Macintosh to extend the Title text sprite to the end of the movie The Property inspector Text tab lets you specify 3D properties for the text 8 With the text still selected click the Property inspector Text tab End frame text box ...

Страница 107: ... 3D text by changing settings in the Property inspector 3D Extruder tab 1 Click the Property inspector 3D Extruder tab 2 Move the Tunnel Depth slider left and right to see the different effects When you release the mouse button the depth of the text changes 3 When you finish experimenting with the different tunnel depths move the slider to a value close to 20 ...

Страница 108: ...nsional objects in Director can use both ambient and directional lights By specifying Top Center as the light you re indicating where on the text it should appear as though a light is shining The Title text sprite changes to reflect the settings in the Property inspector ...

Страница 109: ...f 3D behaviors actions and triggers Actions specify what occurs in the movie such as a camera rotating around a model You ll learn more about actions and triggers later in the tutorial 2 Resize the Library palette to view all of the behaviors in the list Note If the Library palette is docked drag it out of the docking channel to resize it For more information about docking see Docking panels on pa...

Страница 110: ...al and vertical axes respectively the z axis refers to the depth of the model 6 To view the 3D text rotating play your movie The rotation speed seems a bit fast To avoid making your users dizzy you ll modify the behavior parameters 7 Stop and rewind the movie Note As you complete the tutorial remember to save your work frequently ...

Страница 111: ...k the Property inspector Behavior tab 2 With Automatic Model Rotation Internal selected in the Property inspector click the down arrow to the right of Rotation Speed and move the Rotation Speed slider from 10 to 3 3 Play the movie to view the text rotating at a slower speed When you finish stop and rewind the movie Note To return to the parameters dialog box for any behavior you can double click t...

Страница 112: ... axis such as when a camera turns from side to side on a tripod You use two panning behaviors in the Library palette to pan the camera up down left and right Specifying parameters for the panning behaviors gives you precise control over the camera movement 1 Verify that 3D action behaviors are still visible in the Library To effectively attach most 3D behaviors to a movie you work with action and ...

Страница 113: ...pan horizontally you still must identify how the user activates and controls panning during movie playback As you learned earlier Pan Camera Horizontal is an action behavior you apply a trigger behavior to control the action You ll now add a trigger behavior 1 In the Library List pop up menu select 3D Triggers 2 Drag the Keyboard Input behavior from the Library palette to the Magic trick sprite on...

Страница 114: ...Keyboard Input behavior once making it part of your cast Drag the Keyboard Input behavior from the Cast window to the Magic trick sprite on the Stage 2 In the Parameters for Keyboard Input dialog box specify the following In the Which Key Will Be Used pop up menu select Right Arrow Verify that the second text box is blank and that No Modifier Key appears in the third text box In the Select a Group...

Страница 115: ...iors stop and rewind the movie Apply an action behavior to pan the camera vertically Attaching the Pan Camera Vertical behavior is similar to attaching the Pan Camera Horizontal behavior 1 In the Library palette select 3D Actions from the Library List pop up menu 2 Drag the Pan Camera Vertical behavior from the Library palette to the Magic trick sprite on the Stage 3 In the Parameters for Pan Came...

Страница 116: ... appears in the third text box Confirm that Group Pan Pan Camera Up appears in the Select a Group and Its Action pop up menu Then click OK Add the panning trigger for the opposite direction You can probably guess how to establish downward panning 1 Again drag the Keyboard Input behavior from the Cast window to the Magic trick sprite 2 In the Parameters for Keyboard Input dialog box specify the fol...

Страница 117: ...orted forward and backward without turning on a tripod with wheels For dollying you will drag the behavior to the Score rather than the Stage although you could use either procedure 1 If the Score is not open select Window Score 2 In the Library palette verify that 3D Actions is selected 3 Drag the Dolly Camera action from the Library palette to the Magic trick sprite in the Score Release the mous...

Страница 118: ...h Key Will Be Used pop up menu select The Custom Key I ve Entered Below if it s not already selected In the If Using a Custom Key Enter It Here text box type f Verify that No Modifier Key is selected from the Which Modifier Key Will Be Used pop up menu Verify that Group Dolly Move Camera In is selected from the Select a Group and Its Action text box Then click OK You also want to offer the user th...

Страница 119: ... the Which Modifier Key Will Be Used pop up menu In the Select a Group and Its Action pop up menu select Dolly Move Camera Out Then click OK Note Remember to save your work frequently Dolly the camera 1 Play the movie and press the F key repeatedly or hold the F key down This dollies the camera in closer to the Magic trick world 2 Press the B repeatedly or hold the B key down to move the camera fa...

Страница 120: ... camera resets whenever the user presses the Spacebar 1 Drag the Keyboard Input behavior from the Cast window to the Magic trick sprite on the Stage 2 In the Parameters for Keyboard Input dialog box specify the following In the Which Key Will Be Used pop up menu verify that The Custom Key I ve Entered Below is selected With the insertion point in the If Using a Custom Key Enter It Here text box pr...

Страница 121: ...enu select Table 1 In the Which Cursor pop up menu verify that Finger is selected Then click OK Note Because the Model Rollover Cursor behavior is an independent action you do not need to assign a trigger behavior to it 3 Again drag the Model Rollover Cursor behavior from either the Library palette or the Cast window to the Magic trick sprite In the Parameter for Model Rollover Cursor dialog box t...

Страница 122: ...ise on the tables If you look in your Score you see that the text associated with the merchandise first appears in frame 10 of channel 1 A marker named Cards marks where the card text begins just as markers indicate where the hat and rings text begin You ll use a behavior to add navigation to your movie so that when the user sees the pointing finger and clicks the playhead moves to the specified m...

Страница 123: ...ards Then click OK Add the trigger behavior You ll now add a behavior that triggers the Click Model Go to Marker behavior when the user clicks the left mouse button Note When a movie with a Mouse Left behavior is played on a Macintosh computer with a single button mouse simply clicking the mouse initiates the trigger effect 1 In the Library List pop up menu select 3D Triggers and drag the Mouse Le...

Страница 124: ... select Table 2 In the Go to Which Marker pop up menu select Hat In the Which Group Does This Behavior Belong To text box type hat Then click OK 3 In Cast window drag the Mouse Left behavior to the Magic trick sprite 4 In the Parameters for Mouse Left dialog box specify the following In the When Does This Action Occur pop up menu verify that Anytime the Left Mouse Button Is Being Pressed is select...

Страница 125: ...om the Cast window to the Magic trick sprite Repeat the steps from the two previous times you ve applied this behavior except this time in the Select a Group and Its Action pop up menu select Group Rings Go to Marker Then click OK 3 Save your movie Play your completed movie When you play your movie you ll look at the Score to see the Click Model Go to Marker behaviors in action 1 Arrange the Score...

Страница 126: ... other tables to see where in the Score the playhead jumps 5 Use the arrow F and B keys to move the camera around the world Use the Spacebar to reset the camera 6 When you finish viewing your movie stop and rewind it To learn more Congratulations You ve learned how to maneuver in a 3D world including creating and rotating 3D text using action and trigger behaviors to change the camera perspective ...

Страница 127: ...le cast windows together in a tabbed panel layout Cast window with tabs in Thumbnail view You can create and edit cast members in Macromedia Director MX using basic tools and media editors such as the Paint and Text windows and you can also edit cast members using external editors In addition you can import cast members from nearly every popular media format into a movie file For some media types ...

Страница 128: ... text cast members in your movie from English to French by simply switching the cast the movie uses rather than each individual cast member Using external casts can keep the movie size small for downloading because an external cast can download separately from the movie file if or when it is needed Creating new casts Before assembling a large number of cast members it s good practice to create the...

Страница 129: ...makes the cast available for sharing with other movies For information about internal and external casts see Managing external casts on page 153 4 If you chose External and you don t want to use the cast in the current movie deselect the Use in Current Movie option Note You can link the external cast to your movie later See Managing external casts on page 153 5 Click Create The cast is created and...

Страница 130: ...Select Insert Media Element and then select the type of cast member to create For more information on each choice see the following sections Using the Paint window on page 206 Using the Color Palettes window on page 261 Streaming linked Shockwave Audio and MP3 audio files on page 326 Creating text cast members on page 275 Embedding fonts in movies on page 274 Creating an animated color cursor cast...

Страница 131: ...t member Note Cast members created on the Stage are automatically placed in the Score Using the Cast window In the Cast window you can view the cast in either the default List view or the Thumbnail view You can change the default so that the Cast window opens in Thumbnail view See Setting Cast window preferences on page 140 The Cast window lets you do the following actions Organize and display all...

Страница 132: ...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 Help launches the page in the help system that is relevant to the current panel Group Panel name With lets you group the currently selected tab in a panel grou...

Страница 133: ... group 1 Select a tab within the Cast panel group 2 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 Note Save your panel layout if you want to restore your Cast panel configuration the next time you open your file For more information abo...

Страница 134: ...h the Cast button and select a cast from the context menu A dialog box reminds you to save your panel layout if you want to restore your Cast panel configuration the next time you open your file For more information about panel layouts see Saving panel layouts on page 40 To select the previous or next cast member Click the Previous Cast Member or Next Cast Member button To move a selected cast mem...

Страница 135: ...the last cast member in the range To select multiple nonadjacent cast members In either List or Thumbnail view Control click Windows or Command click Macintosh each cast member that you want to select Copying cast members You can easily create multiple versions of a cast member in a single cast For example you might want several cast members to be identical except for color or size You can also co...

Страница 136: ...our additional columns are available in the Cast Window Preferences dialog box See Setting Cast window preferences on page 140 The additional columns that you can display are described in the following table Column Title Column Information Name The name of the cast member and an icon that describes the cast member type For information on what the icons represent see Using Cast Thumbnail view on pa...

Страница 137: ...llowing In List view Director places new cast members at the end of the list and the cast member number becomes the first available number after the current selection You can use Thumbnail view to reorder and renumber cast members by dragging them to different locations in the window you cannot reorder cast members by dragging in List view Using Cast Thumbnail view As the name suggests the Cast Th...

Страница 138: ...o your system s Clipboard You can copy the image from any bitmap editor including the Paint window The image can be any size but smaller images look better because they require less scaling 2 Using Thumbnail view place the pointer over the cast member for which you are creating a custom thumbnail 3 Right click Windows or Control click Macintosh and select Paste Bitmap from the context menu The ima...

Страница 139: ...g In Thumbnail view select an empty position in any open Cast window and then select Edit Paste In List view deselect all cast members by clicking anywhere in the window except on a cast member name Then select Edit Paste Note In either Thumbnail or List view if you paste cast members while other cast members are selected you will overwrite the selected cast members To move a cast member to a posi...

Страница 140: ...e largest files appearing first Empty at End places all empty cast positions in the selection at the end 4 Click Sort Director reorders the cast members according to the sorting method you selected The Score automatically adjusts to the new cast member numbers Setting Cast window preferences You use the Cast window preferences settings to control the appearance of the current Cast window or if des...

Страница 141: ... view The default is Fit to Window 8 To set the size of each cast thumbnail image that appears in the Cast window select one of the following options from the Thumbnail Size pop up menu Small 44 x 33 pixels Medium 56 x 42 pixels default Large 80 x 60 pixels Thumbnails always maintain the standard 4 3 aspect ratio If the thumbnails appear fuzzy they are probably displaying larger than their origina...

Страница 142: ... begin playing sooner This setting is the best choice when controlling cast members loading with Lingo After Frame One loads all cast members except those required for frame 1 when the movie exits frame 1 This setting can ensure that the first frame appears as quickly as possible and it might be the best choice if the first frame of the movie is designed to remain onscreen for a number of seconds ...

Страница 143: ...tems Editable fields to view or change the cast member s name the Name text box a Comments text box to enter text that appears in the Comments column of the Cast List window and an Unload pop up menu that lets you select how to remove a cast member from memory For more information on using the Unload pop up menu see Controlling cast member unloading on page 152 View only fields which indicate the ...

Страница 144: ... page 326 Launching cast member editors You can open any cast member in the appropriate editor directly from the Cast window You can use the Director internal media editors such as the Text Paint or Vector Shape window or you can specify external editors for certain types of cast members See Launching external editors on page 151 To launch an editor for a cast member do one of the following Double...

Страница 145: ...ird 2 and Bird 3 Select Type and select an option from the pop up menu to search for cast members by media type Select Palette and select an option from the pop up menu You can use this option to search for and resolve palette conflicts Select Usage to locate all cast members that aren t used in the Score Cast members that you find with this option might be used in the movie by a Lingo script Dire...

Страница 146: ... 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 For more information about linked files see About linking to files on page 149 Director can import cast members f...

Страница 147: ...Add Click Add All You can switch folders and import files from different folders at the same time 6 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 fro...

Страница 148: ... import options for PICS and Scrapbook files on page 150 8 When you finish selecting the files click Import If you ve imported a bitmap with a color depth or color palette that differs from the current movie the Image Options dialog box appears so you can enter additional information See Choosing import image options on page 150 For information on importing specific media see the following section...

Страница 149: ...t include all linked cast member files and they must be in their expected locations In addition the Xtra extensions that are used to import the media must be present when the movie runs either on the user s computer or included in your movie For more information see Setting Xtra cast member properties on page 155 When you link to media on the Internet the media must be present at the specified URL...

Страница 150: ...rs while you are importing a bitmap image using File Import select one of the following Color Depth options Image specifies the color depth and palette of the image Stage specifies the color depth of the current Stage 3 Select a Palette option to change palette settings for 2 4 or 8 bit images Import imports the image with its color palette The palette appears as a new cast member immediately foll...

Страница 151: ...og box After you set up an external editor for a particular media type Director launches the application when you edit a cast member of that type When you finish editing a cast member in an external editor and then save and close the file Director re imports the cast member media You can easily edit Flash cast members using the launch end edit feature in Director MX For more information see Editin...

Страница 152: ...are lost Director warns you of this possibility 3 Save and close the file Director re imports the cast member Controlling cast member unloading When Director runs low on memory it removes cast members from memory You use the Property inspector to specify the priority with which a cast member is removed from memory When a cast member is available in memory it appears almost instantly When it needs ...

Страница 153: ...ecify that the cast be stored as an external cast If you don t want to use the cast in the current movie deselect the Use in Current Movie option 4 Click Create The cast is created and a Cast window for the cast appears in List view See Using the Cast window on page 131 5 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...

Страница 154: ...ember properties using Lingo Lingo lets you control and edit cast members by setting their properties Some properties are available for every type of cast member and other properties are available only for specific cast member types See entries for individual properties in the Lingo Dictionary To specify the cast member s content Set the media cast member property To specify the cast member s name...

Страница 155: ...rmined by the developer of the Xtra For non Macromedia Xtra extensions refer to any documentation that the developer supplies To view or change Xtra cast member properties 1 Select an Xtra cast member 2 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 s...

Страница 156: ...Chapter 4 156 ...

Страница 157: ...racteristics that are related to the specific sprite type For example Lingo has several digital video properties that determine the contents of tracks in digital video sprites To control the way a sprite s colors appear on the Stage you use sprite inks By selecting Background Transparent ink in the Property inspector for example you turn all white pixels transparent and remove the white border the...

Страница 158: ... sprites must be manually tweened when new frames or keyframes are added to the sprite For additional information on tweening see Chapter 6 Animation on page 185 4 To determine the length of sprites measured in frames select the following Span Duration options Frames defines the default number of frames for sprites Width of Score Window sets the sprite span to the visible width of the Score window...

Страница 159: ...lect On the Stage click a sprite to select the entire sprite span You can change sprite preferences so that selecting a sprite on the Stage selects only the current frame instead of the entire sprite See Changing sprite preferences on page 158 In the Score click the horizontal line within a sprite bar do not click the keyframes the start frame or the end frame To select a contiguous range of sprit...

Страница 160: ...Windows or Command click Macintosh the keyframe and the desired sprites To select a frame within a sprite that isn t a keyframe do one of the following In the Score Alt click Windows or Option click Macintosh the frame within the sprite On the Stage Alt click Windows or Option click Macintosh to select only the current frame of the sprite The sprite appears on the Stage with a single border To sel...

Страница 161: ...change the order of sprites Drag the sprite in the Score from one channel to another If you selected a channel drag its contents to another channel 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 using one or more of the following The Property inspector...

Страница 162: ...dow Property Inspector The Property inspector opens with focus on the Sprite tab The Graphical view is the default view You can toggle to the List view by clicking the List View Mode icon The Property inspector displays settings for the current sprite If you select more than one sprite the Property inspector displays only their common settings A thumbnail image of the sprite s cast member appears ...

Страница 163: ...show the size of the sprite s bounding rectangle in pixels The Ink pop up menu displays the ink of the current sprite and lets you select a new ink color See Using sprite inks on page 180 Blend determines the blend percentage of the selected sprites See Setting blends on page 180 Start Frame and End Frame display the start and end frame numbers of the sprite Enter new values to adjust how long the...

Страница 164: ...or tab for a vector sprite the Text tab for a text sprite and so on To open the Sprite tab in the Property inspector click this icon To open the Behavior tab in the Property inspector click this icon See Chapter 14 Behaviors on page 357 To change the Sprite Overlay s appearance to suit your preferences 1 Select View Sprite Overlay Settings 2 Select a Display option to determine when sprite propert...

Страница 165: ...and quickly locate the problem in a sprite label You can change the information that appears in labels for example you can use the Extended display option to display the precise location of a sprite in every frame To display sprite labels 1 With the Score as the active window do one of the following Select View Sprite Labels Right click Windows or Control click Macintosh on any Score channel and s...

Страница 166: ...e 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 Score Editing sprite properties with Lingo You can use Lingo to check and edit sprite properties with scripts as the movie plays To check a property value Use the put command or check in the Watcher window See put in the L...

Страница 167: ...ck the padlock icon Right click Windows or Option click Macintosh and select Lock Sprite from the context menu In the Score a locked sprite appears with a padlock in front of its name On the Stage a locked sprite appears with a padlock in its upper right corner To select a locked sprite on the Stage Hold down the L key while selecting the sprite To unlock a sprite 1 In the Score or on the Stage se...

Страница 168: ...nstructions on changing a vector shape cast member s registration point see Editing vector shapes on page 249 Visually positioning sprites on the Stage You can position sprites on the Stage by dragging them or by using the arrow keys To visually position a sprite on the Stage 1 Select Window Stage to display the Stage 2 Do one of the following on the Stage Drag a sprite to a new position Hold down...

Страница 169: ...out resizing it adjust only the x and y coordinates Positioning sprites with the Tweak window You can use the Tweak window when you want to move sprites by a certain number of pixels To position sprites with the Tweak window 1 Select Modify Tweak 2 Select the sprite or sprites you want to move as described in Selecting sprites on page 158 3 In the Tweak window drag the point on the left side of th...

Страница 170: ... guide move the pointer over the guide When the sizing handle appears drag the guide to its new position 6 To remove a guide drag it off the Stage 7 To remove all guides click Remove All on the Guides tab in the Property inspector To display guides and align sprites 1 If guides do not appear on the Stage select View Guides and Grid Show Guides 2 If Snap to Guides is not selected select View Guides...

Страница 171: ...ft 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 Ver...

Страница 172: ...o determine whether a sprite s bounding rectangle touches the bounding rectangle of a second sprite Use the sprite within operator to determine whether a sprite is entirely within a second sprite See sprite intersects and sprite within in the Lingo Dictionary Changing when a sprite appears on the Stage A sprite controls where and when media appears on the Stage You change when a sprite appears on ...

Страница 173: ...rite a duration of 28 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 using the Extend command Director maintains the spacing proportions of keyframes when a sprite is lengthened For a description of keyframes see Chapter 6 Animation on page 185 To extend or shorten ...

Страница 174: ... animation as separate sprites and now want to move the entire sequence in the Score you would join the sprites Splitting and joining also lets you update movies created with older versions of Director that might have several fragmented sprites To split an existing sprite 1 In the Score click the frame within a sprite where you want the split to occur The playhead moves to the selected frame 2 Sel...

Страница 175: ...es can cause noticeable delays If a bitmap sprite must be a particular size make the cast members that appear in the sprite the proper size You can do this with Modify Transform Bitmap or in any image editing program Scaling and resizing sprites works best with vector shapes Note The procedure for resizing a rotated or skewed sprite is different from the following procedures See Rotating and skewi...

Страница 176: ...nd skew sprites on the Stage by dragging To rotate and skew sprites more precisely use Lingo or the Property inspector to enter degrees of rotation or skew The Property inspector is also useful for rotating and skewing several sprites at once by the same angle Director can rotate and skew bitmaps text vector shapes Flash movies QuickTime videos and animated GIFs Director rotates a sprite around it...

Страница 177: ...either of the following To rotate the sprite move the pointer inside the sprite and drag in the direction you want to rotate To skew the sprite move the pointer to the edge of the sprite until it changes to the skew pointer and then drag in the direction you want to skew To rotate or skew a sprite with the Property inspector 1 Select the sprite you want to rotate or skew and click the Sprite tab i...

Страница 178: ...ou resize Enter new values on the Sprite tab in the Property inspector Director resizes the sprite at the current skew or rotation angle To restore a skewed or rotated sprite to its original orientation Select Modify Transform Reset Rotation and Skew or Reset All To skew a sprite with Lingo Set the skew sprite property See skew in the Lingo Dictionary Flipping sprites Flipping a sprite creates a h...

Страница 179: ...background color changes white pixels within the sprite to the selected color and blends light colors with the new color Director can animate foreground and background color changes in sprites shifting gradually between the colors you specify in the start and end frames of a sprite See Tweening other sprite properties on page 188 To reverse the colors of an image change the foreground color to whi...

Страница 180: ...m the Blend pop up menu in the Property inspector or enter a blend percentage between 0 and 100 To set blending with Lingo Set the blend sprite property See blend in the Lingo Dictionary 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 the...

Страница 181: ...ge have been blended or are fuzzy applying these inks might create a halo effect Use the Paint window or an image editing program to change the background to true white and harden the edges You can also re create the image with an alpha channel transparency and reimport the image Using Mask ink to create transparency effects To reveal or tint certain parts of a sprite you use Mask ink Mask ink let...

Страница 182: ...rent invisible 4 Drag the original cast member to the Stage or Score to create a sprite 5 Make sure the new sprite is selected and select Mask ink from the Ink pop up menu on the Sprite tab in the Property inspector Only the parts of the sprite that are revealed by the mask are visible on the Stage About Darken and Lighten inks Darken and Lighten inks provide a great control over a sprite s RGB pr...

Страница 183: ...ng colors except nonoverlapping colors are transparent The sprite is not visible unless it is overlapping another sprite Not Copy reverses all the colors in an image to create a chromatic negative of the original Not Transparent Not Reverse and Not Ghost are all variations of other effects The foreground image is first reversed then the Copy Transparent Reverse or Ghost ink is applied These inks a...

Страница 184: ...and Lighten inks on page 182 Lighten changes the effect of the Foreground and Background color properties of a sprite so that it is easy to create dramatic color effects that generally lighten an image Lighten ink makes the colors in a sprite lighter as the background color gets darker The foreground color tints the image to the degree allowed by the lightening See About Darken and Lighten inks on...

Страница 185: ...ws the animation frames where major changes take place called keyframes Assistants draw the frames in between Frame by frame animation involves manually creating every frame in an animation whether that involves switching cast members for a sprite or manually changing settings for sprites on the Stage Other forms of animation include making a sprite change size rotate change colors or fade in and ...

Страница 186: ...ear for all sprites for selected sprites or only when the pointer rolls over a sprite See Using the Sprite Overlay on page 164 You can tween a sprite directly on the Stage by editing the sprite s path Director displays the path of the selected sprite directly on the Stage You can adjust the path by dragging keyframe indicators To tween the path of a sprite 1 Place a sprite on the Stage where you w...

Страница 187: ...e Alt key Windows or Option key Macintosh and move the pointer on the Stage over a tick mark When the pointer changes color drag the tick mark to a new location This creates a new keyframe and records the new location Repeat this step to create additional keyframes 7 To make the property changes defined by a keyframe occur at a different time drag the keyframe in the Score to a new frame within th...

Страница 188: ...n or deceleration of a sprite 1 Use one of the tweening methods to create a moving sprite 2 Turn on View Sprite Overlay Show Paths to see how far the sprite moves between each frame 3 Select the sprite and select Modify Sprite Tweening 4 Use the Ease In and Ease Out sliders to specify the percentage of the sprite s path through which the sprite should accelerate or decelerate 5 Select one of the f...

Страница 189: ...ng and skewing sprites on page 176 To tween color use the color boxes in the Property inspector to open the color palette for foreground and background color or enter the RGB values for a new color in the boxes at the right List view or left Graphical view 6 In the Score select the end frame of the sprite and select Insert Keyframe The end frame is not a keyframe unless you create one there 7 Make...

Страница 190: ...more information see Using film loops on page 197 To make a sprite jump instantly between settings in different keyframes turn off all tweening options 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 m...

Страница 191: ...se In defines the percentage of the sprite span through which the sprite accelerates Ease Out defines the percentage of the sprite span through which the sprite decelerates 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 ve tweened a sprite and you decide to...

Страница 192: ...uently it s especially useful for cell animation in which each frame contains a different cast member in a different position Ordinarily clicking a sprite on the Stage or in the Score selects the entire sprite 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 ...

Страница 193: ...proach sparingly for movies that will be downloaded from the Internet because all cast members must be downloaded before the animation can run As an alternative to this type of animation consider using vector shapes rotation and skewing on bitmap cast members or a Flash movie see Chapter 11 Using Flash and Other Interactive Media Types on page 293 You can create multiple cast member animations in ...

Страница 194: ...ier to select frames within a sprite See Editing sprite frames on page 192 6 Select the frames in the sprite where you want a different cast member to appear 7 Open the Cast window and select the cast member you want to use next in the animation 8 Select Edit Exchange Cast Members Director replaces the cast member in the selected frame with the cast member selected in the Cast window 9 Repeat step...

Страница 195: ...ckly place them in the Score as a single sprite The Director onion skinning feature is also useful for creating and aligning a series of images for use in animation For more information see Using onion skinning on page 234 Cast to Time places selected cast members in the Score as a single sprite To create a sprite from a sequence of cast members 1 Select the frame in the Score where you want to pl...

Страница 196: ...sprites 2 Select an empty frame in the Score This is usually at the end of the Score 3 Drag cast members onto the Stage to create sprites where you want them to appear in the animation As you position the sprites on the Stage Director places each sprite in a separate channel Make sure all the sprites are in consecutive channels 4 Select all the sprites that are part of the sequence in the Score or...

Страница 197: ...o a film loop Use sprites in as many channels as you need in film loops even in the sound channel Select sequences in all the channels you want to be part of the film loop You can select sprite fragments if you first select a sprite and select Edit Edit Sprite Frames Control click Windows or Command click Macintosh to select sequences that aren t in adjacent channels 2 Select Insert Film Loop A di...

Страница 198: ...obytes The cast member creation and edit dates The name of the last person who modified the cast member 4 To view or edit the cast member name use the Name field 5 To add comments about the cast member use the Comments field 6 To specify how Director removes the cast member from memory if memory is low select one of the following options from the Unload pop up menu 3 Normal sets the selected cast ...

Страница 199: ... begin 4 Select Control Step Recording The step recording indicator appears next to the channel numbers for the sprites being recorded and the selection border widens 5 Press 3 on the numeric keypad make sure Number Lock is off or click the Step Forward button in the Control panel Note You can display the Control panel at the bottom of the Stage or in a floating panel For more information about us...

Страница 200: ... To use real time recording 1 Select one or more sprites on the Stage or in the Score Recording will begin at the playhead It s 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 2 Select Control Real Time Recording The real time recordin...

Страница 201: ...of the pasted sprite where the previous sprite ends Repeat the process as many times as you need to create one continuous animation across the Stage Animating sprites with Lingo Lingo can create animation regardless of the settings in the Score This lets you create or modify animation depending on movie conditions To move a sprite on the Stage you use Lingo that controls the sprite s location See ...

Страница 202: ...Chapter 6 202 ...

Страница 203: ...pressed mathematically Bitmaps are suited for continuous tone images such as photographs You can easily make minute changes to a bitmap by editing single pixels but resizing the image can cause distortion as pixels are redistributed Anti aliasing is a Director feature that blends the bitmap s colors with background colors around the edges to make the edge appear smooth instead of jagged A vector s...

Страница 204: ...n generally 72 to 96 dots per inch Higher resolution images that you place on the Stage in Director might appear much larger than you expect Other applications particularly those focused on creating images for print let you work on the screen with high resolution images at reduced sizes Within Director you can scale high resolution images to the right size but this might reduce the quality of the ...

Страница 205: ...tead of being first composed in an offscreen buffer with other sprites A direct to Stage GIF takes less time to load but you cannot place other sprites in front of it or use any ink effect To set properties for an animated GIF 1 To specify how Director removes the cast member from memory if memory is low select an option from the Unload pop up menu on the Member tab of the Property inspector Graph...

Страница 206: ... click it and hold down the mouse button to display a pop up menu of options for that tool To select an irregular area do one of the following Click the Lasso tool in the Paint window and drag to enclose the pixels you want to select The Lasso selects only those pixels of a color that are different from the color the Lasso was on when you first started dragging it Press Alt Windows or Option Macin...

Страница 207: ... Shift click to zoom out See Zooming in and out in the Paint window on page 214 To select a color in a cast member 1 Click the Eyedropper tool 2 Do one of the following Click a color to select it as the foreground color Shift click a color to select it as the background color Alt click Windows or Option click Macintosh to select the destination color for a gradient Press the D key to temporarily a...

Страница 208: ...sing the Airbrush tool on page 212 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 Select Settings to change the selected brush See Using the Brush tool on ...

Страница 209: ...ackground colors Use the Foreground Color pop up menu to select the primary fill color used when the pattern is solid and the ink is Normal Use the Background Color pop up menu to select the secondary color the background color in a pattern or text 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 Pattern...

Страница 210: ... change the color depth of the current cast member Double click the Color Depth button to open the Transform Bitmap dialog box The button displays the color depth of the current cast member See Changing size color depth and color palette for bitmaps on page 220 To select a Paint window ink Select the type of ink from the Ink pop up menu at the lower left of the window See Using Paint window inks o...

Страница 211: ...e lasso to tighten around the selected object so that only the object is selected No shrink lets you select the entire area you drag around The lasso selects whatever is inside the selected area See Thru Lasso causes your selection to become transparent as if the Transparent ink effect were applied Using the Marquee tool The Marquee tool selects artwork in the Paint window After you select artwork...

Страница 212: ...hen the pointer is positioned on the Airbrush tool the Airbrush pop up menu appears Each of the five settings in the pop up menu can be defined so you can have several types of spray available without opening the Airbrush Settings dialog box To use the Airbrush tool Click the Airbrush tool and drag it in the Paint window To define airbrush settings 1 Click the Airbrush tool and hold down the mouse...

Страница 213: ...w the pop up menu 5 To create a new brush shape select Custom from the pop up menu and select the brush shape you want to modify from the chart below the pop up menu 6 Edit the current brush shape by clicking the magnified image of the brush shape Clicking a blank pixel fills it and clicking a filled pixel makes it blank Clicking outside the Brush Shapes dialog box places the pixels on the screen ...

Страница 214: ... 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 To reposition the selected area 1 Move the cross hair inside the selected area the cross hair becomes...

Страница 215: ...e selection is made with the Marquee tool Effects that change colors within the selection work with the Marquee and the Lasso tools Lingo flips and rotates bitmaps by flipping and rotating bitmap sprites See Rotating and skewing sprites on page 176 and Flipping sprites on page 178 Note To repeat any of these effects after using them press Control Y Windows or Command Y Macintosh To flip rotate ske...

Страница 216: ...tate handles in any direction You can rotate a sprite that contains a bitmap instead of the bitmap See Rotating and skewing sprites on page 176 To skew the selection click the Skew button and drag any of the skew handles To warp the shape of the selected area click the Warp button and drag any handle in any direction ...

Страница 217: ...e around the edges of the selected artwork click the Trace Edges button To apply color effects to a selected area 1 Select an area within a bitmap cast member using either the Marquee or the Lasso tool 2 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 ...

Страница 218: ...nation color click the Switch Colors button Using Auto Distort You can use Auto Distort to create animations that show bitmap cast members gradually changing from frame to frame Auto Distort generates intermediate cast members for any cast member that is free rotated made into a perspective slanted distorted or skewed Cast members created with Auto Distort after using the perspective effect To use...

Страница 219: ...tor assigns a registration point in the center of all bitmaps but for many types of animation you might want to move the registration point To do this you can use the Registration Point tool You can edit a bitmap s registration point in the Paint window or using Lingo Moving the registration point is useful for preparing a series of images for animation When you use Cast to Time or exchange cast m...

Страница 220: ... palette If you want to keep a cast member s original bitmap unchanged but temporarily apply a different palette use the Member tab in the cast member s Property inspector To change the size of only the sprite on the 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 d...

Страница 221: ...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 256 grays Remapped to closest colors in black and white Dithered in black and white 6 Click Transform to execute the cha...

Страница 222: ...member property to the Stage s picture property See picture cast member property in the Lingo Dictionary For example the member Archive picture the stage picture statement makes the current image of the Stage the image for the bitmap cast member Archive Creating image objects An image object can be either a self contained set of image data or a reference to the image data of a cast member or of th...

Страница 223: ...the color of an individual pixel of an image object or set that pixel s color Use the getPixel or setPixel command To copy part or all of an image object into a different image object Use the copyPixels command which requires you to specify the image from which you are copying the rectangle to which you are copying the pixels and the rectangle from which to copy the pixels in the source image The ...

Страница 224: ...t one side or the center of an image and another color the destination color at the other side or outside edge of the image Between the foreground and destination colors Director creates a blend of the two colors To use a gradient 1 Select the Brush tool the Bucket tool or one of the filled shape tools 2 Select the type of gradient from the Gradient pop up menu Selecting a gradient type automatica...

Страница 225: ...p up menus that control the style of your gradient fill Each choice you make is immediately previewed on the left To edit gradient settings 1 Select Gradient Settings from the Gradient Colors pop up menu 2 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 fol...

Страница 226: ...Transparent ignores the order of the colors in the palette and uses only colors that create a continuous blend of the foreground and background colors White pixels in patterns created with this method are transparent Adjacent Colors uses all the colors in the palette between the foreground and background colors for the gradient Adjacent Colors Transparent uses all the colors in the palette between...

Страница 227: ...the following list Equal provides even spacing of colors between the foreground and destination colors More Foreground increases the amount of the foreground color in the gradient More Middle increases the amount of the middle color in the gradient More Destination increases the amount of the destination color in the gradient 7 To determine whether the full range of the gradient is created over th...

Страница 228: ...of patterns or create a custom pattern 1 Select Pattern Settings from the bottom of the Patterns pop up menu 2 Select an option from the pop up menu at the top of the Pattern Settings dialog box To select one of the standard noneditable sets of patterns select QuickDraw Grays or Standard To edit a pattern select Custom Custom is an editable copy of the Standard palette set 3 Select the pattern to ...

Страница 229: ...it and click Built in 4 Click Cast Member The cast member appears in the box at the lower left The box at the right shows how the image appears when it is tiled The dotted rectangle inside the cast member image shows the area of the tile To select a different cast member for the tile use the arrow buttons to the right of the Cast Member button to move through the movie s cast members 5 Drag the do...

Страница 230: ...4 A gradient fill is one that progresses from one color called the foreground color to another color called the destination color You can paint with Gradient ink using the Brush tool the Bucket tool and the shape tools Reveal works indirectly with the art in the previous cast position Imagine the previous cast member s artwork covered with a white area Reveal ink erases the white area to show the ...

Страница 231: ...me as reducing a color s brightness with the controls in the Color Palettes window You can change the rate of this ink effect in the Paint Preferences dialog box Lighten makes colors lighter The more times you click with the Brush tool the lighter the area becomes The color of the foreground background and destination inks have no effect on Lighten Lighten creates an effect that is the same as inc...

Страница 232: ... a filter to several cast members at once by selecting them all in the Cast window To apply a filter to a selected portion of a cast member use the Marquee or the Lasso tool in the Paint window to select the part you want to change 2 Select Xtras Filter Bitmap 3 In the Filter Bitmap dialog box select a category on the left and a filter on the right To view all the filters at once select All from t...

Страница 233: ...p cast member use the Marquee or the Lasso tool in the Paint window to select the part you want to change 2 In the Auto Filter dialog box select a filter 3 Click Set Starting Values and use the filter controls to enter filter settings for the first cast member in the sequence When you finish working with the filter controls the Auto Filter dialog box reappears 4 Click Set Ending Values and use the...

Страница 234: ...rves as the background while you paint a series of foreground images Onion skinning uses registration points to align the current cast member with the previous ones you selected Be careful not to move registration points for cast members after onion skinning If you do the cast members might not line up the way you want See Changing registration points on page 219 You must have created some cast me...

Страница 235: ...he Onion Skin toolbar appears 2 In the Paint window open the cast member that you want to use as the reference image or background 3 If necessary click the Toggle Onion Skinning button on the Onion Skin toolbar to activate onion skinning 4 To set the background image click the Set Background button on the Onion Skin toolbar 5 To create a new cast member click the New Cast Member button in the Pain...

Страница 236: ...e Onion Skin toolbar 8 Paint the new cast member using the background image as a reference 9 When you finish drawing the cast member click the New Cast Member button again to create the next cast member When Track Background is enabled Director advances to the next background cast member in the series Its image appears in the background in the Paint window 10 Repeat step 8 until you finish drawing...

Страница 237: ...ap tab using the Graphical view 4 To invert the current cast member when the user clicks it select Highlight Use this option to create buttons Even if Highlight When Clicked is selected the cast member does not do anything unless it is controlled by a behavior or a Lingo script 5 To make Director approximate an original color in the bitmap if there is a palette problem select Dither When a color i...

Страница 238: ...ains selected for the next time you use the Brush or Airbrush tools Remember Ink remembers the last ink used with a tool which remains selected for the next time you use any tool 3 To control the way colors cycle when you draw with Cycle ink select one of the following options Repeat Sequence causes colors to cycle from the foreground color to the destination color and then repeat from foreground ...

Страница 239: ...ks in the Director Support Center website at www macromedia com support director vector d8 fw_bitmaps html To compress a bitmap at the cast member level 1 Select bitmap cast members or sprites and click the Bitmap tab in the Property inspector If you selected multiple cast members or sprites the Property inspector displays the compression setting if it is the same for each selected object If the c...

Страница 240: ...our bitmap is compressed that is 100 indicates no compression Note Director saves your publish settings when you save your movie 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 ima...

Страница 241: ...ayers exports each layer in the document Select this option if you are exporting layered content or an animation Fireworks Slices exports the slices in the document Select this option if you are exporting sliced or interactive content such as rollover images and buttons 5 Select Trim Images to automatically crop the exported images to fit the objects on each frame 6 Select Put Images in Subfolder ...

Страница 242: ... options if desired Color lets you specify a color depth for the imported graphics If the graphics contain transparency select 32 bit color Registration lets you set the registration point for the imported graphics Import Rollover Behaviors as Lingo converts Fireworks behaviors to Lingo code Import to Score places cast members into the Score when they re imported 4 Click Open The graphics and code...

Страница 243: ...xternal editor for bitmap graphic file types The file opens in Fireworks and the document window indicates that you are editing a file from Director 3 Make changes to the image and click Done when you finish Fireworks exports the new graphic to Director Optimizing cast members in Director You can launch Fireworks from Director to make quick optimization changes to selected cast members To launch F...

Страница 244: ...Chapter 7 244 ...

Страница 245: ...pe entirely with Lingo or modify an existing one as the movie plays Because vector shapes are stored as mathematical descriptions they require less RAM and disk space than an equivalent bitmap image and they download faster from the Internet Drawing vector shapes You create vector shapes with drawing tools in the Vector Shape window You can use the Pen tool to create irregular shapes or use shape ...

Страница 246: ...and then select the level of magnification Right click Windows or Control click Macintosh and select Zoom In or Zoom Out from the context menu Press Control the Plus key Windows or Command the Plus key Macintosh to zoom in or Control the Minus key Windows or Command the Minus key Macintosh to zoom out To return to normal view Select View Zoom 100 Using vector shape drawing tools You use the tools ...

Страница 247: ...t Member button 2 Select the Filled or Unfilled Rectangle Rounded Rectangle or Ellipse tool 3 Hold down the mouse button to start a shape drag to draw and release the mouse button to end the shape To constrain a rectangle to a square or to constrain an ellipse to a circle hold down Shift while dragging To select a vertex or vertices do one of the following To select one vertex select the Arrow too...

Страница 248: ...controls in the Vector Shape window or Lingo 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 Because a vector shape is a single object you don t need to select any part of the vector shape to make the following changes To select the fill and line settings 1 Open a ve...

Страница 249: ... curves You can also change the way a vector shape is placed on the Stage by moving its registration point using either the Vector Shape window or Lingo To adjust the outline of a vector shape 1 Open a vector shape in the Vector Shape window 2 Click the Arrow tool and make any of the following changes To move a curve or corner point drag it to any location To move multiple points Shift click or ma...

Страница 250: ...t curve 2 Select Modify Join Curves To split two curves Select two adjacent vertices and select Modify Split Curves To change the registration point 1 Click the Registration Point tool The dotted lines in the window intersect at the registration point The default registration point is the center of the cast member The pointer changes to a cross hair when you move it to the window 2 Click to set th...

Страница 251: ...ent 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 You can create linear or radial gradients Changes you make to vector shape gradients have no effect on gradients for bitmaps in the Paint window You can fill only closed vector shapes with gradients To define a gradient for a vec...

Страница 252: ...ontains the location of each vertex and control handle in a vector shape test the vertexList property To access a vertex directly use the vertex chunk expression To add or delete a vertex use the addVertex or deleteVertex command To move a vertex or a vertex handle use the moveVertex or moveVertexHandle command To display the vertex list for a vector shape test the curve property To add a new shap...

Страница 253: ...r how you resize the sprite even if it means cropping the vector shape 10 To change the size of the cast member either enter a percentage in the Percentage text box Graphical view or use the Scale slider List view to determine a percentage Using shapes Shape cast members are the same non anti aliased shapes that were available in older versions of Director Shapes are different cast member types th...

Страница 254: ...ctor removes the cast member from memory if memory is low select an option from the Unload pop up menu See Controlling cast member unloading on page 152 4 To change the type of shape click the Shape tab and select an option from the Shape pop up menu 5 To fill the shape with the current color and pattern select Filled To specify a shape s type with Lingo Set the shapeType cast member property See ...

Страница 255: ... Director controls color Director provides a variety of color controls The following list describes the most important Use the Movie tab in the Property inspector to change modes for selecting colors The modes are RGB values or palette index Use the pop up Color menu to select colors for movie elements The Color menu is available throughout the Director application for example in the Tool palette ...

Страница 256: ...est color in the current color palette to approximate the RGB color To choose the color mode for the current movie you use the color mode settings on the Movie tab of the Property inspector When you select RGB all the colors you select from the Color menu in Director are specified in RGB values When you select Index the colors you choose are specified according to their position in the current pal...

Страница 257: ...r from the Color menu specifies the RGB value of the color not its index value For an explanation of the difference between index and RGB color see Specifying palette index and RGB color on page 255 The bar at the top of the Color menu indicates whether the movie is set to RGB or index color If you want to select a color that is not in the current palette and therefore not available on the Color m...

Страница 258: ...B or index hold down the Alt key Windows or Option key Macintosh while clicking the color box To select colors not on the Color menu 1 Open the Color menu 2 Click Color Picker 3 Use the color picker that appears to select colors To edit the favorite colors on the Color menu 1 Open the Color menu 2 Select Edit Favorite Colors 3 Select the color box you want to change ...

Страница 259: ...is a viable option for displaying 8 bit graphics with the best possible colors If you place a cast member that has its own custom palette on the Stage and if it s the first cast member that has a different palette in the frame Director automatically assigns the new palette to the palette channel The new palette becomes the active palette unless you clear it from the palette channel or replace it w...

Страница 260: ...ol in the upper right of the score window 2 Select the options you want to use in the Frame Properties Palette dialog box Select a new palette Specify how you want Director to manage the palette change For example to hide a palette change within a fade first select a new palette from the pop up menu Select the Palette Transition option and then select Fade to Black or Fade to White Use the Rate sl...

Страница 261: ...olor Palettes window does not change the palette for the movie or any frame in the movie Use the Movie tab in the Property inspector to select the movie color palette or select Modify Frame Palette to change the color palette at a particular frame When you modify a palette all the cast members using the palette also change so make sure you always keep a copy of the original palette To open the Col...

Страница 262: ...indow If the selection arrow is not active click the Arrow tool at the bottom of the window 2 To select a range drag across colors or click the first color in the range and then Shift click the last 3 Control click Windows or Command click Macintosh to select multiple discontiguous colors To match the color of any pixel on the Stage with the same color in the palette 1 Click the Eyedropper tool 2 ...

Страница 263: ...ect the cast member 2 Select Window Color Palettes 3 Click the Select Used button in the Color Palettes window 4 In the Select Colors Used In Bitmap dialog box click Select To select all colors not currently selected Click the Invert Selection button in the Color Palettes window Select Used button Invert Selection button ...

Страница 264: ...trols click the arrows next to the controls Hue is the color that is created by mixing primary colors Saturation is a measure of how much white is mixed in with the color A fully saturated color is vivid a less saturated color is a washed out pastel or in the case of black a shade of gray Brightness controls how much black is mixed in with a color Colors that are very bright have little or no blac...

Страница 265: ...lette can be active Whenever it s necessary to display more than one 8 bit bitmap on the screen at one time as is often the case in Director movies all the images must refer to the same palette 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 ess...

Страница 266: ...mory To view or change color palette cast member properties 1 Select a color palette cast member 2 To display the Property inspector select Modify Cast Member Properties or select Window Property Inspector 3 If necessary click the Member tab and display the Graphical mode The following non editable settings appear The cast member size in kilobytes The cast member creation and edit dates The name o...

Страница 267: ...l tempo You can t make a movie go faster than the computer allows Many factors can make movies play more slowly than the specified tempo such as the following Playing the movie on a slower computer Making the movie wait for cast members to download from a slow Internet connection Animating several large sprites at the same time Animating stretched sprites Color depth differences between the movie ...

Страница 268: ...me Properties Tempo dialog box To set a new tempo for the movie select Tempo then use the Tempo arrows or drag the slider To pause the movie at the current frame for a certain length of time select Wait then use the Wait arrows or drag the slider To pause the movie until the user clicks the mouse or presses a key select Wait for Mouse Click or Key Press To pause the movie until a sound or digital ...

Страница 269: ...trol panel with the actual speed shown there If you haven t recorded the actual speed of a movie in a particular frame the actual tempo field displays two dashes Locking frame durations To make Director play a movie at the same tempo on all types of computers use the Lock Frame Durations option in the Movie Playback Properties dialog box see Setting movie playback options on page 592 For frames wi...

Страница 270: ... set If you want to create a dissolve between two scenes set the transition in the first frame of the second scene not in the last frame of the first scene To add a transition 1 In the transition channel select the frame in which you want the transition to occur 2 Select Modify Frame Transition or double click the frame in the transition channel 3 In the Frame Properties Transition dialog box sele...

Страница 271: ...tion Xtra extensions appear in the Frame Properties Transitions dialog box Transition Xtra extensions are often more complex than the transitions that are provided with Director and might include an additional dialog box for specialized settings To install a transition Xtra extension Place the transition Xtra extension in the Xtras folder in the Director application folder The transition Xtra exte...

Страница 272: ...ts about the cast member use the Comments field 6 To specify how Director removes the cast member from memory if memory is low select one of the following options from the Unload pop up menu 3 Normal sets the selected cast members to be removed from memory after any priority 2 cast members have been removed 2 Next sets the selected cast members to be among the first removed from memory 1 Last sets...

Страница 273: ...s After text is part of your movie you can format the text in a variety of ways using the Director formatting tools Director offers standard professional formatting functions including alignment tabs kerning spacing subscripts superscripts color and so on You can also create hypertext links for any text Text in Director is editable when you are working on your movie and optionally while a movie pl...

Страница 274: ...l font Director uses the embedded font for all the text in the movie that uses the original font This saves you the trouble of manually reapplying the font to all the text in existing movies After you embed a font in a movie file the font appears on all the movie s font menus and you can use it as you would any other font To embed a font in a movie 1 Select Insert Media Element Font 2 From the Ori...

Страница 275: ...oint The height adjusts automatically when you add text When you release the mouse button a text insertion point appears in the area you defined 3 Enter text The new text cast member appears in the first available position in the current cast and the sprite is placed in the first open cell in the current frame in the Score To create text cast members in the Text window 1 Select Insert Media Elemen...

Страница 276: ...n you import text from an RTF file Director recognizes most standard RTF formatting but it does not import pictures embedded in the file The amount of text in a cast member is limited only by the memory that is available in the playback system Importing text with Lingo Lingo can import text in several ways See individual entries in the Lingo Dictionary To import text from a URL use the getNetText ...

Страница 277: ...hat display the text cast member Note If you re changing the background color of text you have two options To change the background color of the cast member double click the text sprite on the Stage and assign a value from the Color box on the Tool palette You can also tint the sprite s background which blends the background color of the cast member with the background color of the sprite To apply...

Страница 278: ... increase or decrease the spacing with the Spacing option To specify kerning between selected characters use the Kerning option to specify the number of points This setting supplements the standard kerning that is applied to the entire cast member in the Text tab of the Property Inspector See About kerning on page 281 To change the text color click the Color box and select a color from the Color m...

Страница 279: ...adjusts line spacing to match the size of the text you are using If you change the line spacing setting Director stops making automatic adjustments To resume automatic adjustments of spacing enter 0 in the Line Spacing text box 7 To set paragraph alignment click one of the alignment buttons 8 To change the kerning of selected characters change the value of the Kerning option 9 Set spacing before a...

Страница 280: ...ls in a compact window for use on the Stage or with entire cast members in the Cast window Most of the formatting controls also appear at the top of the Text window and in the Font and Paragraph dialog boxes To display the Text inspector Select Window Text Inspector or press Control T Windows or Command T Macintosh About anti aliased text Anti aliased text is text that uses color variations to mak...

Страница 281: ...he characters in the cast member according to standard kerning tables see Setting text or field cast member properties on page 285 The setting you enter in the Kerning text box in the Text window or Font dialog box see Formatting characters on page 278 supplements the standard kerning Finding and replacing text You can use the Find Text command to quickly search for and replace text in the Text Fi...

Страница 282: ...s with blue underlining You can turn off this formatting in the Property inspector s Text tab See Setting text or field cast member properties on page 285 The following procedure describes how to add a hypertext link to selected text To make a hypertext link active you need to write an on hyperlinkClicked event handler See on hyperLinkClicked in the Lingo Dictionary You can enter any string in the...

Страница 283: ...window If necessary use the Previous Cast Member and Next Cast Member buttons to navigate to the field you want to edit See Setting text or field cast member properties on page 285 Using editable text Editable text lets users enter text on a web page customize a game and so on When text is editable editing the text changes the text cast member and all the text in the sprites where the cast member ...

Страница 284: ...indow After you convert a cast member to a bitmap graphic you cannot undo the change This command works only with text and field cast members You can t convert a shape to a bitmap To convert text to a bitmap 1 In the Cast window select the cast members to convert 2 Select Modify Convert to Bitmap Director converts the cast members to bitmaps Mapping fonts between platforms for field cast members D...

Страница 285: ...m one of the following actions Select Modify Cast Member Properties Select Window Property Inspector 3 Click the Member tab if it s not already selected using the Graphical view 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 4 To view or edit the cast member name use the Na...

Страница 286: ...int to the next editable sprite on the Stage when the user presses Tab DTS Direct to Stage text cast members only makes text display more quickly by rendering it directly to the Stage without composing it with other sprites Selecting the DTS option prevents other sprites from appearing over the text and limits the ink options to Copy Use Hypertext Styles text cast members only makes hypertext link...

Страница 287: ...Using the Save Bitmap feature for pre rendered text The Save Bitmap feature works with pre render options to display a buffer image of your text while your user waits for the actual text to load This feature is useful when you re working with a large amount of anti aliased text The Save Bitmap feature is different from the Convert to Bitmap menu command which converts a text cast member into a bit...

Страница 288: ...fontStyle property To specify the drop shadow size for the characters in a field cast member set the boxDropShadow property To specify additional spacing to be applied to a chunk expression in a text cast member set the charSpacing property To specify the foreground color for a field cast member set the foreColor property Applying paragraph formats with Lingo Lingo can control paragraph formatting...

Страница 289: ...ng text boxes with Lingo Lingo can specify the type of box that surrounds a text or field cast member For field cast members Lingo can also specify box characteristics such as borders margins drop shadows and height See entries for individual properties in the Lingo Dictionary To specify the type of box around a text or field set the boxType cast member property To specify the size of the border a...

Страница 290: ...ction To determine the number of the line that appears at a specific vertical position in a text or field cast member use the locVToLinePos function This measures the distance from the top of the cast member not what appears on the Stage To determine the point in a text or field cast member that is closest to a specific character use the charPosToLoc function To determine the character that is clo...

Страница 291: ...text The chunk can be a string or another text cast member To combine character strings use the and operators The operator attaches the second string to the end of the first string The operator includes a space between two strings when they are combined To insert a string of characters into another string use the put after put into or put before command The put before command places the string at ...

Страница 292: ...Chapter 10 292 ...

Страница 293: ...sing Flash Movies You can incorporate Flash vector based animation in your Director movies projectors and Macromedia Shockwave movies for the web simply by importing a Flash movie into Director and using it like any other cast member Effects that once required multiple versions of a bitmap cast member such as blending one shape into another can now be accomplished with a single small Flash movie D...

Страница 294: ...indow To add a Flash movie as a cast member 1 Select Insert Media Element Flash Movie 2 In the Flash Asset Properties dialog box select the Flash movie SWF file you want to add to your Director cast To add a file from your computer or from a network drive click Browse select the file and click Open Director creates a relative link to the file so it must maintain the same location relative to the D...

Страница 295: ... select Auto High to have Director start playing the movie with anti aliasing on but turn it off if it can t play the movie at the required frame rate Select a low quality setting to turn off anti aliasing but speed up performance select Auto Low to have Director start playing the movie without anti aliasing but turn on anti aliasing if it can do so and continue playing the movie at the required f...

Страница 296: ...ects will be ignored Only the Copy Transparent Background Transparent and Blend ink effects work with Flash movies and only when the sprite is not played Direct to Stage 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 installed you can launch the Flash authoring tool from within Director to edit...

Страница 297: ... member s properties Some cast member properties such as the flashRect and frameRate cast member properties are valid only after the Flash movie s header has streamed into memory Director provides the following Lingo that lets you manage how Director uses a Flash movie For more information see the Lingo Dictionary To control whether changes to a Flash movie cast member immediately appear in sprite...

Страница 298: ...e the Lingo Dictionary To specify the color of a Flash sprite Set the color sprite property To specify the blend for a Flash sprite Set the blend sprite property Scaling Flash movies You can use Lingo to scale Flash cast members and sprites For more information see the Lingo Dictionary To control the scaling of a Flash movie Set the scale and scaleMode properties To set the scale percentage of a F...

Страница 299: ...n point after resizing the cast member set the centerRegPoint property to TRUE Placing Flash movies on the Stage Lingo can set whether a Flash movie appears at the front of the Stage and whether specific areas of a Flash movie and the Stage overlap For more information see the Lingo Dictionary To determine whether a Flash movie plays in front of all other layers on the Stage and whether ink effect...

Страница 300: ...heck the current state of a streaming file test the state property To attempt to forcibly stream a specified number of bytes of a Flash movie use the stream command Playing back Flash movies with Lingo Lingo lets you control how a Flash movie plays back and whether the Flash movie retains its interactivity Controlling Flash movie playback with Lingo You can use Lingo to control a Flash movie s tem...

Страница 301: ...whether the mouse pointer is over a button in a Flash movie test the mouseOverButton property Using Lingo to set and test Flash variables Two sprite functions exist to support access to ActionScript variables in Flash sprites getVariable and setVariable For more information see the Lingo Dictionary To return a string that contains the current value of a Flash sprite variable use the following stat...

Страница 302: ...n or frame and then assign it a Get URL action in which you specify the Lingo that the Flash cast member sends To set up a Flash movie to generate an event 1 In Flash select a button 2 Select Window Actions 3 In the Actions pane click the Actions tab and select Browser Network getURL 4 Double click the getURL action to add it to the button instance 5 In the URL field enter the Lingo that you want ...

Страница 303: ... receives the getURL message from the Flash movie the movie immediately executes the Lingo statement In this case the movie jumps to the frame containing the marker Dali To send XML data from a Flash sprite or a global Flash object to Lingo use the XMLobject send ActionScript method It includes the parameters URL and targetWindow Then include an on sendXML handler in your Lingo This handler takes ...

Страница 304: ...mand myNewFlashObject sprite 1 newObject Array apple orange banana In this example the specified sprite sprite 1 is the Flash sprite The object is an array In Lingo arrays are called lists The array contains three strings apple orange and banana To create a global Flash object use the newObject command without a sprite reference When you do this Director loads a special instance of the Flash Playe...

Страница 305: ...s that need to be routed to an appropriate Lingo handler For example a Flash Communication Server connection object generates an event each time an incoming message is received from the server You can tell Lingo to route events like this to a specific handler in a specific Lingo script object by using the setCallback command To set up a callback for an event from a Flash object use Lingo similar t...

Страница 306: ...e local connection object Initialize properties The first thing to do is declare some properties that you will use throughout the local connection script to store references to the local connection object and 2 connections one outgoing and one incoming The property pCon_name stores the name of an outgoing connection The property pOtherCon_name stores the name of an incoming connection The property...

Страница 307: ...ins it is the same script object that contains this setCallback command referred to as me Note the quotes around the event name and the pound sign preceding the handler name The pound sign converts the handler name to a symbol The actual callback handlers such as the myOnStatus handler are illustrated later in this section 2 Set up the allowDomain callback An allowDomain event is generated each ti...

Страница 308: ... message is displayed in a chat input field If no error occurs a text output field is updated with the contents of the chat input field For more information about the Flash infoObject see the Flash Communication Server MX documentation The allowDomain event is generated each time the local connection object receives an incoming message This provides an opportunity for the myAllowDomain callback ha...

Страница 309: ...using the statement sendSprite 1 closeConnection You might also use the close method in an endSprite handler on endSprite me pLocalConn close end endSprite Now that the local connection object is set up and it has handlers for callbacks sending messages and closing the connection it is ready to be used by the movie Using Flash Communication Server MX Macromedia Flash Communication Server MX allows...

Страница 310: ...m object that does not require a sprite reference Use the newObject command and include the NetConnection object as a parameter and omit the sprite reference myStream newObject NetStream myNetConObject To send text messages with the NetStream object Use the send command myStream send handlerName p1 pN To send audio or video you need to associate a camera and microphone with the NetStream object To...

Страница 311: ...he Macromedia Flash Player Help section of the Macromedia website www macromedia com support flashplayer help Opening the Settings panel You must have a Flash sprite on the Stage to display the Settings panel The sprite must be at least as large as the Settings panel 214x137 pixels The Flash sprite s Direct to Stage property must be set to TRUE You can set this property in the Flash tab of the Pro...

Страница 312: ...e the following on mouseUp if the rightMouseDown or the controlDown then sprite 1 settingsPanel 0 end if end or on rightMouseUp sprite 1 settingsPanel 0 end You can also choose to use ActionScript in your Flash movie to enable the Settings panel For more information see the Macromedia Flash MX documentation Playback performance tips for Flash movies Performance of Flash movies can vary greatly dep...

Страница 313: ... member modifies values at the cast member level and broadcasts the change to all sprites on the Stage This overhead can affect performance If you have only a single sprite for the cast member modify the sprite property directly Avoid using more Flash sprites on the Stage at the same time than necessary Each Flash sprite loads its own instance of the Flash Asset Xtra into memory which can slow per...

Страница 314: ...ppears as a single cast member 5 Click Import To place a Director movie cast member in the current movie 1 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 2 Extend the sprite through all the frames in which you want it to appear 3 To change any of the movie s properties u...

Страница 315: ...ears within the sprite bounding rectangle select a Framing option Crop displays the movie image at its default size Any portions that extend beyond the sprite s rectangle are not visible Center is available only if Crop is selected It keeps the movie centered within the sprite s bounding rectangle if you resize the sprite Scale resizes the movie to fit inside the bounding rectangle 9 To determine ...

Страница 316: ...ia software Macromedia Technical Support does not support them Inserting an ActiveX control You can place ActiveX controls in a Director movie and have them function as sprites Note that this procedure is designed only for Director for Windows To insert an ActiveX control on the Stage 1 Make sure that the ActiveX control you want to use in Director is installed on your system Most controls have th...

Страница 317: ... value The generic Lingo syntax for getting an ActiveX control property is as follows value sprite X propertyName As an example if the Microsoft Access Calendar control is inserted into a Director movie as the second sprite on the score the following Lingo code sets the Year property of the Calendar control to a specific year sprite 2 year 1995 To get the Year property from the same Calendar contr...

Страница 318: ...ck event when the button is pressed and a calendar ActiveX control may generate a dateChanged event when the date within the calendar is changed Director converts any event generated by the ActiveX control to a sprite event that it can handle A list of the control s events appears in the Events tab of the ActiveX Control Properties window To respond to an event generated by the ActiveX control you...

Страница 319: ... Sound makes significant demands on a computer s processing power so you might need to manage sounds carefully to make sure they do not adversely affect your movie s performance Lingo gives Director more flexibility when playing sound and can help overcome performance concerns You can use it to play sound in ways not possible with the Score alone Using Lingo you can do the following Turn sound on ...

Страница 320: ...rest of the sound continues to load from its source whether on disk or over the Internet This can dramatically improve the downloading performance of large sounds Linked sounds are best for longer sounds such as voice overs or nonrepeating music Director can stream the following sounds QuickTime Shockwave Audio and MP3 sounds that are linked from a URL QuickTime Shockwave Audio MP3 AIFF and WAV so...

Страница 321: ...l sound file to which the cast member is linked if it is a linked sound enter a new path and file in the Filename text box You can also use the Browse button to select a new file 8 To specify how Director removes the cast member from memory if memory is low select an option from the Unload pop up menu See Controlling cast member unloading on page 152 Controlling sound in the Score You control soun...

Страница 322: ...tend the sound through as many frames as necessary New sounds are assigned the same number of frames as set for sprites in the Sprite Preferences dialog box You might need to adjust the number of frames to make the sound play completely or change a tempo setting to make the playhead wait for the sound to finish See Synchronizing media on page 328 Note Sound in the last frame of a movie continues t...

Страница 323: ...hat aren t cast members Using Lingo to play sounds lets you control the exact timing of when sounds start and stop Lingo also lets you play only part of a sound cast member or play several sounds in succession without interruption Sounds played by Director play at the volume that is set in the computer s sound level control You can use Lingo to modify the computer s sound level to suit the needs o...

Страница 324: ...ound playFile in the Lingo Dictionary Playing external sound files from disk minimizes the amount of RAM that is used to play sounds However because the computer can read only one item from disk at a time loading cast members or playing more than one sound from disk can cause unacceptable pauses when you use the sound playFile command Controlling sound channels You can use Lingo to make actions in...

Страница 325: ...ssing the same sound at several different bit rates to see how the sound changes Select the bit rate that is appropriate for the intended delivery system modem ISDN CD ROM hard disk and so on the type of movie and the nature of the sound Voice over sound quality for example might not need to be as high as that of music Test the sound on several systems to find the right balance between quality and...

Страница 326: ...pression Xtra is already included in the Shockwave player If you compress sounds in Shockwave format in a projector you must provide the SWA Decompression Xtra for the projector To have Director compress internal sound cast members when you create a projector save a movie as Shockwave or update the movie 1 Select File Publish Settings 2 Select the Compression tab 3 Select Compression Enabled to tu...

Страница 327: ...nel 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 See Synchronizing media on page 328 You cannot place streaming audio cast members in the sound channels The sound streams from the source location when the movie plays Playing Shockwave Audio and MP3 audio ...

Страница 328: ... video is reached you can use the Wait for Cue Point option in the Tempo dialog box You can also use this function to wait for the end of the sound or digital video even if it has no cue points Cue points can also be used to trigger events that Lingo can interpret See Synchronizing sound with Lingo on page 329 Note The methods discussed in this section for synchronizing media apply to sound and di...

Страница 329: ...e points When the movie plays the playhead pauses at the frame until the cue point passes Synchronizing sound with Lingo By writing Lingo 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 on each of these functions and properties see the Lingo Dictionary To set up Lingo that runs when the mo...

Страница 330: ...Chapter 12 330 ...

Страница 331: ...ckTime 3 or later QuickTime 6 or later is recommended from Apple The Director media synchronization features let you synchronize events in a movie to precise cue points embedded in digital video Video can make significant demands on a computer s processing power so you might need to manage video content carefully to make sure it does not adversely affect your movie s performance Lingo gives Direct...

Страница 332: ...more information see the Director Support Center website at www macromedia com support director To import a digital video 1 Select File Import 2 Select QuickTime AVI Windows only or RealMedia Windows only from the Files of Type pop up menu 3 Select the digital video files to import Because digital video is always imported as linked you do not have to select an option in the Media pop up menu 4 Cli...

Страница 333: ...g the properties for RealMedia cast members see The RealMedia tab in the Property inspector on page 349 7 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 For more information...

Страница 334: ...following options from the Rate pop up menu to set the rate at which a digital video plays Normal plays each frame at its normal rate and no frames are skipped Maximum plays the movie as fast as possible while still displaying each frame Fixed plays the movie using a specific frame rate Enter the number of frames per second in the field at the right Use this option only for digital videos that use...

Страница 335: ...g rectangle around the video use the Background Transparent ink to remove it Inks don t work if Direct to Stage is turned on see Playing digital video direct to Stage on page 334 Matte ink does not work for any type of digital video To create a digital video sprite 1 Drag a digital video cast member to any sprite channel in the Score 2 Extend the sprite through as many frames as necessary Playing ...

Страница 336: ...y to 1 To play a digital video sprite in reverse set the sprite s movieRate property to 1 To rewind a digital video sprite to the beginning set the sprite s movieTime property to 0 To control a digital video sprite s playback rate set the sprite s movieRate property to the desired rate To mix QuickTime audio tracks with internal Director sounds necessary only in Windows use the soundDevice system ...

Страница 337: ...e for AVI You can use Lingo to control a QuickTime video s appearance and sound volume For QuickTime VR you can use Lingo 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 For more information see the Lingo Dictionary To determ...

Страница 338: ...f the hotspot if any at a specific point on the Stage use the ptToHotSpotID function To specify the name of the handler that runs when the user clicks a hotspot in a QuickTime VR sprite set the triggerCallback sprite property 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 hotSpotExitCallback property To specify the...

Страница 339: ...me VR sprite property To swing a QuickTime VR sprite to a specific pan tilt or field of view set the swing function Cropping digital video Cropping a digital video means trimming the edges off the top or sides of the movie image Cropping doesn t permanently remove the portions you crop but it hides them To crop a digital video 1 Select the cast member in the Cast window 2 Click the QuickTime or AV...

Страница 340: ...owsers Director can handle digital video the same way it handles all other media or it can stream the digital video using QuickTime 4 or later You can link the digital video to a URL and the movie begins to download and play the digital video when its sprite first appears on the Stage In order for the digital video cast member to stream you must set its streaming property to TRUE QuickTime 4 or la...

Страница 341: ...fit into memory If this option is turned off Director does not load the movie into memory and instead plays it from disk This results in slower animation speeds since each frame must be retrieved from disk before it is played Synchronizing video and animation To pause the playhead until a specified cue point in digital video is reached you can use the Wait for Cue Point option in the Tempo dialog ...

Страница 342: ... available for download at www real com To view Shockwave movies containing RealMedia content the following software must be installed The Shockwave player RealPlayer 8 or RealOne Player If a user without RealPlayer 8 or RealOne Player attempts to play a Shockwave movie containing a RealMedia cast member a dialog box asks whether the user wants to go to the RealNetworks website and download RealPl...

Страница 343: ... system and are familiar with Director viewing and using RealMedia files in Director is incredibly quick and easy Before you begin reading this document please view the RealMedia sample file included on the Director MX CD or the videotest rm file included in the RealPlayer program installation folder To view the sample file 1 Launch Director 2 Select File Import 3 Browse to one of these test files...

Страница 344: ...bject RealVideo is fully integrated into the graphics capabilities of Director and you add RealMedia cast members containing RealVideo to a movie just as you would any other cast member The RealVideo content begins playing when the playhead reaches the frame containing the RealMedia content unless the pausedAtStart property of the sprite or cast member is set to TRUE RealMedia audio You can have t...

Страница 345: ...ding viewing and listening to video and audio content on the Internet Users can begin viewing content as soon as a small portion usually a few seconds of the file has downloaded As the stream plays the rest of the stream continues to download in the background If you understand how the streaming process works in Director and for RealMedia cast members in particular you can minimize the amount of t...

Страница 346: ...network congestion and rebuffering RealPlayer is not designed to play concurrent streams and since RealAudio and RealVideo files in Director movies are played by an embedded RealPlayer engine playing more than one RealMedia cast member at the same time is not supported If the RealMedia cast member in your movie references a local file instead of a remote URL be sure that the file path you specifie...

Страница 347: ...alMedia tab For details see The RealMedia tab in the Property inspector on page 349 To create a RealMedia cast member from a local file using File Import 1 Select File Import or press Control R to open the Import File dialog box 2 Navigate to the RealMedia file you want to import 3 Click Import The RealMedia cast member is now listed in the Cast window with a RealMedia icon The name of the cast me...

Страница 348: ...s you can adjust the height and width of RealMedia sprites on the Stage to fit your movie s proportions It is important to remember that the actual playback time of a stream can vary depending on the level of network congestion and stream rebuffering and that the duration value of a cast member referencing a live feed is always 0 To play RealMedia cast members To play the RealMedia cast member wit...

Страница 349: ...am plays TRUE or not FALSE The default setting is TRUE This property has no effect if realPlayerNativeAudio is enabled soundChannel RealMedia specifies the Director sound channel where the RealAudio plays The default setting is Any 0 which means the audio plays in the highest available channel This property has no effect if you enable realPlayerNativeAudio video RealMedia specifies whether the vid...

Страница 350: ...ible values see the state RealMedia entry This property cannot be set About RealMedia behaviors The RealMedia behaviors are designed to let you easily add playback controls for RealMedia streams in your movie using custom graphics The following RealMedia behaviors are listed in the Media RealMedia section of the Library palette RealMedia Target identifies a RealMedia sprite as the target for RealM...

Страница 351: ...t behavior to the RealMedia sprite on the Stage 4 Enter the number of milliseconds for a long and short seek operation and assign the behavior to a group or accept the defaults The number of milliseconds you specify for a long or short seek is the number that is used by the various forward and back options of the RealMedia Control Button behavior Be aware that short seeks are ineffective because t...

Страница 352: ...viewer has the following controls New Cast Member lets you create a new RealMedia cast member You need to open the Property inspector to specify the name and filename for the cast member Next Cast Member right arrow lets you view the next RealMedia cast member in the current cast in the viewer Previous Cast Member left arrow lets you view the previous RealMedia cast member in the current cast in t...

Страница 353: ...e current time and duration of the stream on the right in the format MM SS S or HH MM SS S If the stream is playing the status appears as Playing To view a RealMedia cast member in the RealMedia viewer 1 Select Window RealMedia to open the RealMedia viewer 2 Do one of the following Click the Play button to play the RealMedia cast member that is currently on the Stage or selected in the Cast window...

Страница 354: ...y Although you can use the following Lingo elements with a RealMedia cast member they cause problems when used on a sound channel For example you can use member Real stop but should not use sound whichChannel stop if the audio portion of a RealMedia cast member uses whichChannel member sound property pause play stop You can use the following property on a sound channel playing the audio portion of...

Страница 355: ... channels playing the audio portion of a RealMedia stream breakLoop channelCount endTime getPlayList loopCount loopEndTime loopsRemaining loopStartTime playNext puppetSound queue rewind sampleCount setPlayList soundClose obsolete sound playFile status use the state RealMedia or mediaStatus RealMedia cast member properties instead ...

Страница 356: ...Chapter 13 356 ...

Страница 357: ...ors on the Director Support Center at www macromedia com support director lingo d8 d8behaviors html Attaching behaviors You use the Library palette to display behaviors included in Director Director allows you to attach the same behavior to several sprites or several frames at the same time You can attach as many behaviors as you want to a sprite but you can attach only one behavior to a frame If ...

Страница 358: ...r over a behavior icon If the behavior includes a longer description you can view it in the Behavior inspector See Getting information about behaviors on page 361 The behaviors included with Director come with descriptions Behaviors from other sources may not Select Show Names from the Library pop up menu to turn the display of behavior names on or off 4 To attach a behavior to a single sprite dra...

Страница 359: ...or is copied to an internal cast to prevent you from accidentally changing the original behavior To attach the same behavior to several sprites at once using the Library palette Select the sprites on the Stage or in the Score and drag a behavior to any one of them To attach behaviors that are already attached to a sprite or frame 1 Select Window Behavior Inspector to open the Behavior inspector 2 ...

Страница 360: ...The Behavior tab has the same fields for the behavior as those in the Parameters dialog box 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 s sometimes necessary to change the sequence of behaviors so that actions occur in the proper order To change...

Страница 361: ...ehavior description 1 Open the Behavior inspector 2 Select a sprite or frame to which a behavior has been attached 3 Click the arrow that expands the Behavior inspector s description pane You can leave the description pane expanded and select different behaviors to see their descriptions All of the behaviors included in the Director library have descriptions Behaviors from other developers may not...

Страница 362: ...shortcut for writing simple scripts Note To always edit behaviors in the Script window instead of the Behavior inspector select Edit Preferences Editors In the Editors Preferences dialog box select Behaviors from the list and then click Edit In the Select Editor box select Script Window To create or modify a behavior 1 Do one of the following To create a new behavior click the Behaviors pop up men...

Страница 363: ...e 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 To lock the current selection so nothing changes in the Behavior inspector when new sprites are selected click the Lock Selection button in the lower left of the expanded Behavio...

Страница 364: ...the specified frame Go to Movie opens and plays the specified movie 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 Wait until Key Press waits at the current frame ...

Страница 365: ...e variety of actions you want The behavior can have parameters that users edit from the Parameters dialog box The optional on getPropertyDescriptionList handler sets up the Parameters dialog box See on getPropertyDescriptionList in the Lingo Dictionary A description of the behavior can be added to the Behavior inspector The optional on getBehaviorDescription handler displays a description of the b...

Страница 366: ...ng a behavior s property If a behavior s script includes an on getPropertyDescriptionList handler Director lets users 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 When the user double clicks the behavior in the Behavior inspector dialog box When the user clicks...

Страница 367: ...maximum or minimum number the Parameters dialog box provides a slider that sets the value To specify no range omit the range parameter If the property s definition doesn t include range a text entry field appears for the user to enter a value in the Parameters dialog box To specify a set of possible choices use a linear list For example the list mouseUp mouseDown keyUp keyDown makes these four eve...

Страница 368: ... to do the same as the previous handler on getPropertyDescriptionList return Movement default 5 format integer comment Set motion to the right range min 1 max 10 noise default format sound comment Sound cast member name end Including a description for the Behavior inspector An on getBehaviorDescription handler in a behavior s script provides a description that appears in the bottom pane of the Beh...

Страница 369: ...he stageRight then set the locH of sprite the spriteNum of me the stageLeft else set the locH of sprite the spriteNum of me to the locH of sprite the spriteNum of me movement end if end When this behavior is attached to a sprite each time the playhead enters a frame the sprite moves to the right by the amount the user specifies When the user clicks a sprite its color changes and a specified sound ...

Страница 370: ... behaviors Unlike the sendSprite command the call command doesn t pass the message to frame scripts scripts of the cast member or movie scripts Before sending a message to a specific behavior check the scriptInstanceList sprite property to find a behavior script reference to use with the call command The scriptInstanceList property provides a list of references for the behaviors attached to a spri...

Страница 371: ...tance see Using parent scripts and child objects on page 417 To make a script an ancestor do one of the following Declare that ancestor is a property in the property statement at the beginning of the behavior s Score script For example the statement property ancestor declares that ancestor is a property Include a statement that specifies which script is the ancestor Put the statement in an on begi...

Страница 372: ...Chapter 14 372 ...

Страница 373: ...uch as buttons There are several other interactive features that you can add to your movie Draggable sprites give your audience the ability to move sprites anywhere on the Stage You can also create boundaries beyond which sprites cannot move Editable fields are fields in which your audience can enter or edit information Rollovers make certain sprites change in appearance when the mouse pointer pas...

Страница 374: ...ed the behavior Notice that the movie is still playing but the playhead remains on the single frame Use the Go Next Button behavior to send the playhead to a new frame and continue playing as described in the following steps 5 Stop the movie 6 Drag the Go Next Button behavior from the Library palette to the sprite in frame 1 7 Rewind and play the movie again The playhead is again stopped in the fi...

Страница 375: ...o other frames to other movies or to Internet movies and web pages You can also use Lingo to make a movie appear to pause by looping in one frame or a group of frames For details about specifying the locations of frames markers and movies see Identifying frames and movies on page 406 Jumping to a different frame Lingo lets you jump to a different frame in the current movie or in another movie To j...

Страница 376: ...e but keep it playing so the movie can react to events use the statement go to the frame to loop in the current frame To resume playing a movie that is looping in one frame use the go to the frame 1 statement 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...

Страница 377: ... the mouse button is pressed check the mouseDown property To determine whether the mouse button is released check the mouseUp property To determine whether the user presses the right mouse button Windows or Control click Macintosh check the rightMouseDown property To determine whether the user releases the right mouse button Windows or Control click Macintosh check the rightMouseUp property For ex...

Страница 378: ...a text sprite editable with Lingo set the text sprite s editable property to TRUE For best results set this property in a script that is attached to the sprite or the frame where the sprite is located To make a sprite moveable with Lingo set the moveableSprite sprite property to TRUE For best results set this property in a script that is attached to the sprite or the frame where the sprite is loca...

Страница 379: ... function Responding to rollovers with Lingo You often want some action to occur when the user rolls the mouse pointer over a sprite or a particular place on the Stage You can use Lingo to specify how the movie responds to such rollovers Director provides several event handlers that run when the pointer rolls over a sprite Messages for each of these events are sent to the sprite script the script ...

Страница 380: ... functions in the Lingo Dictionary To obtain the ANSI value of the last key that was pressed use the key function To obtain the keyboard s numerical or ASCII value for the last key pressed use the keyCode function A common place for using key and keyCode is in an on keyDown handler which instructs Lingo to check the value of key only when a key is actually pressed For example the following handler...

Страница 381: ...cursor consists of a series of bitmap cast members Each bitmap cast member is a frame of the cursor You can control the rate at which Director plays the frames of an animated cursor Using the Cursor Properties Editor you designate one or more bitmap cast members as frames of a single cursor cast member Xtra extensions that support animated cursors The Director installation program places two anima...

Страница 382: ...t ratio as it scales them If you specify a cast member smaller than the maximum size Director displays the cast member at its original size without scaling For example if you select a maximum size of 16 x 16 pixels and specify a cursor that is 12 x 14 pixels Director displays the cursor at 12 x 14 pixels Creating an animated color cursor cast member Before creating an animated color cursor cast me...

Страница 383: ...ition fields specify the location of the mouse pointer s active point Director uses this point to track the mouse pointer s position on the screen For example Director uses this point s location when it returns values for the mouseH and mouseV functions The hotspot also determines the point where a rollover occurs The first field specifies the horizontal x location and the second field specifies t...

Страница 384: ...astMember substitute a cast member name surrounded by quotation marks or a cast member number For example the following sprite script changes the cursor to the cast member named myCursor when the cursor is over the sprite on mouseEnter cursor member myCursor end To reset the cursor to the regular arrow cursor specify a cursor type of 1 and do not use parentheses The following sample sprite script ...

Страница 385: ... in this chapter the term behavior refers to any Lingo script that you attach to a sprite or a frame This differs from the behaviors that come in the Director Library Palette For more information about the behaviors built in to Director see Chapter 14 Behaviors on page 357 All behaviors that have been added to the cast appear in the Behavior inspector s Behavior pop up menu Other types of scripts ...

Страница 386: ... repeat loop structures For example you can create an if then structure that tests whether text has finished downloading from the Internet and if it has then attempts to format the text See Controlling flow in scripts on page 410 The order in which statements are executed affects the order in which you should place statements For example if you write a statement that requires some calculated value...

Страница 387: ...behavior channel in the frame that you want to attach a behavior to When you create a new behavior the behavior receives the cast number of the first available location in the current Cast window When you create a new frame behavior the Script window opens and already contains the line on exitFrame followed by a line with a blinking insertion point and then a line with the word end This makes it e...

Страница 388: ...ior Alternatively you can open the Script window and cycle through the scripts until you reach the behavior To remove a behavior from a Score location Select the location and then delete the script from the list displayed in the Property inspector Behavior tab To attach existing behaviors to sprites or frames do one of the following Drag a behavior from a cast to a sprite or frame in the Score or ...

Страница 389: ... click the Cast Member Script button in the Cast window Lingo terminology Like any programming language Lingo uses specific terminology and has rules of grammar and punctuation that you must follow This information is summarized in this section Important Lingo terms are listed here in alphabetical order References are included for terms that are discussed in more detail elsewhere in this chapter A...

Страница 390: ...om one or more values For example the addition operator adds two or more values together to produce a new value Properties are attributes that define an object For example picture is a property of a bitmap cast member Statements are valid instructions that Director can execute see Writing Lingo statements on page 392 For example go to frame 23 is a statement Variables are elements used to store an...

Страница 391: ...re used in this book to make it is easier to identify names of handlers variables and cast members when reading Lingo code Literal strings are case sensitive See Writing strings on page 405 Comments Comments in scripts are preceded by double hyphens You can place a comment on its own line or after any statement Lingo ignores any text following the double hyphen on the same line Comments can consis...

Страница 392: ... statements in a Lingo script you can choose between two types of syntax verbose syntax and dot syntax Verbose syntax Verbose syntax is similar to English Because of this verbose syntax is an excellent way to learn to program for the first time as a new programmer you can read verbose Lingo and get a fairly good idea of what it is doing Most users will start out writing Lingo exclusively with verb...

Страница 393: ...d to an object or to specify a chunk of text within a text object A dot syntax expression begins with the name of the object followed by a period dot and then the property function or text chunk that you want to specify For example the loc of sprite property indicates a sprite s horizontal and vertical position on the Stage The expression sprite 15 loc refers to the loc of sprite property of sprit...

Страница 394: ... Movie in a window MIAW events Movie events Synchronizing media events Idle events Timeout events Authoring behavior events Defining custom messages In addition to using built in message names you can define your own messages and corresponding handler names A custom message can call another script another handler or the statement s own handler When the called handler stops executing the handler th...

Страница 395: ...ly after the prepareFrame event Director plays sounds draws sprites and performs any transitions or palette effects This event occurs before the enterFrame event An on prepareFrame handler is a good location for Lingo that you want to run before the frame draws 4 startMovie This event occurs in the first frame that plays When Director plays a frame events occur in the following order 1 beginSprite...

Страница 396: ...equired depending on the situation To create arguments for a handler Put the arguments after the handler name Use commas to separate multiple arguments For example the following handler called addThem adds two values it receives in the arguments a and b stores the result in local variable c and uses the Lingo term return to send the result back to the original handler on addThem a b a and b are ar...

Страница 397: ...er in a behavior attached to the frame For example to have a handler respond to a mouse click while the playhead is in a frame regardless of where the click occurs place an on mouseDown or on mouseUp handler in the frame behavior rather than in a sprite behavior To set up a handler that runs in response to messages about events anywhere in the movie put the handler in a movie script To set up a ha...

Страница 398: ... property list each element contains two values separated by a colon One value is a property name always preceded by a pound sign the other value is the value associated with that property For example the following statement sets the variable myList to a property list containing values for the properties speed direction and weight These could be the properties of an asteroid myList speed 155 direc...

Страница 399: ...t 100 top 150 right 300 bottom 350 sprite2Location left 400 top 550 right 500 bottom 750 To create an empty property list Set the list to Setting and retrieving items in a list Lingo lets you set and retrieve individual items in a list The syntax differs for linear and property lists To set a value in a linear list Use the equals operator You can also use the setAt command introduced in earlier ve...

Страница 400: ... the property list foodList breakfast Waffles lunch Tofu Burger dinner Hungarian Goulash the expression foodList breakfast represents the value associated with the property breakfast The value is Waffles Use dot syntax For example using the foodList property list above foodList breakfast represents the value Waffles Checking items in a list You can determine the characteristics of a list and the n...

Страница 401: ...es of two continents The statement continentList landList assigns the same list to the variable continentList However adding Australia to landList using the statement add landList Australia automatically adds Australia to continentList also This happens because both variable names point to the same object in memory To create a copy of a list that is independent of the first list Use the duplicate ...

Страница 402: ...from other languages such as Java in which a variable s type cannot be changed For example the statement x 1 creates the variable x which is an integer variable because you assigned the variable an integer If you subsequently use the statement x one the variable x becomes a string variable because the variable now contains a string You can convert a string to a number or a number to a string with ...

Страница 403: ...ed by the goToNetPage command Every handler that declares a variable as global can use the variable s current value If the handler changes the variable s value the new value is available to every other handler that treats the variable as global It s good practice to start the names of all global variables with a lowercase g This helps identify which variables are global when you examine Lingo code...

Страница 404: ...e Assign the variable a value using the equals operator or the set variableName value command Unless the handler uses the term global to declare that a variable is global the variable is automatically a local variable To display all current local variables in the handler Use the showLocals command You can use this command in the Message window or in handlers to help with debugging The result appea...

Страница 405: ...s An integer is a whole number without any fractions or decimal places Director works with integers between 2 147 483 648 and 2 147 483 647 For numbers outside this range use decimal numbers sometimes called floating point numbers Enter integers without using commas Use a minus sign for negative numbers You can convert a decimal number to an integer by using the integer function For example the st...

Страница 406: ...al To specify a cast without parentheses when using member include the term of castLib followed by the cast s name or number When the cast member s name is unique in the movie the cast s name or number isn t required but you can include it for clarity For example the following statements refer to cast member 50 which is named Hammer in castLib 4 which is named Tools member 50 4 member 50 of castLi...

Страница 407: ...ker after the current frame If the frame is marked marker 0 returns the frame number of the current frame if not marker 0 gives the frame number of the previous marker The term movie followed by the movie name refers to the beginning of another movie For example movie Navigation refers to the beginning of the movie called Navigation The word frame plus a frame identifier the word of the word movie...

Страница 408: ...ingo follows to determine which operators to execute first This is called the operators precedence order For example multiplication is always performed before addition However items in parentheses take precedence over multiplication For example without parentheses Lingo performs the multiplication in this statement first total 2 4 3 The result is 14 When parentheses surround the addition operation...

Страница 409: ...are the comparison operators available in Lingo Logical operators Logical operators test whether two logical expressions are true or false These are the logical operators available in Lingo The not operator is useful for toggling a TRUE or FALSE value to its opposite For example the following statement turns on the sound if it s currently off and turns off the sound if it s currently on set the so...

Страница 410: ...atement following then in the same line as then or you can place it on its own line by inserting a carriage return after then If you insert a carriage return you must also include an end if statement at the end of the if then structure For example the following statements are equivalent if the mouseMember member map 1 then go to Cairo if the mouseMember member map 1 then go to Cairo end if For mor...

Страница 411: ...ition exists To repeat an action a specified number of times Use a repeat with structure Specify the number of times to repeat as a range following repeat with This structure is useful for performing the same operation on a series of objects For example the following repeat loop makes Background Transparent the ink for sprites 2 through 10 repeat with n 2 to 10 set the ink of sprite n 36 end repea...

Страница 412: ...he Script window To open the Script window do one of the following Select Window Script Double click a script cast member in the Cast window For more ways to create and open scripts see Performing common tasks on page 387 You can change the font of text in the Script window and define different colors for various code components See the next section Setting Script window preferences To change the ...

Страница 413: ...op right or bottom from the Debugger Panes menu Inserting common Lingo terms The Script window provides pop up menus of common Lingo terms that you can use to insert Lingo in a script The same menus also appear in the Message window The Alphabetical Lingo menu lists every element in alphabetical order except 3D Lingo The Categorized Lingo menu lists categories of elements according to the features...

Страница 414: ...Windows or Option Return Macintosh where you want to insert a soft line break The continuation symbol that appears indicates that the statement continues on the next line Director 7 and earlier used a different continuation symbol instead To locate a handler in the current script select the handler s name from the Handler pop up menu in the Script window To compile the Lingo you have written click...

Страница 415: ... you want to find 3 Click Find The handler appears in the Script window The title bar at the top of the Script window indicates the script s type To find text in scripts 1 Make the Script window active 2 Select Edit Find Text The Find Text dialog box appears 3 Enter text that you want to find in the Find field and then click Find Find is not case sensitive ThisHandler thisHandler and THISHANDLER a...

Страница 416: ...t runtime Director projectors and Shockwave use a special internal copy of the script data stored in the movie This way your linked scripts need not be distributed with your movies and cannot be copied by end users To import a script as a linked text file 1 Select File Import 2 Select Script as the type of file to import 3 Select the script file s you want to import You can import files with the f...

Страница 417: ... created from the same parent script You can create as many child objects as the computer s memory can support Director can create multiple child objects from the same parent script just as Director can create multiple instances of a behavior for different sprites You can think of a parent script as a template and of child objects as implementations of the parent template This section describes th...

Страница 418: ...ng the other child objects based on the same parent script Similarly a child object can have a property set to either TRUE or FALSE regardless of that property s setting in sibling child objects Differences between child objects and behaviors While child objects and behaviors are similar in that they both can have multiple instances they have some important differences as well The main difference ...

Страница 419: ...ty variables these variables represent properties for which each child object can contain a value independent of other child objects See Parent script and child object basics on page 418 Sets up the initial values of the child objects properties and variables in the on new handler Contains additional handlers that control the child objects actions Declaring property variables Each child object cre...

Страница 420: ...s behavior by including in the parent script the handlers that produce the desired behavior For example you could add a handler to the code above to make the sprite change color The following parent script defines a value for the property spriteNum and contains a second handler that will change the forecolor property of the sprite property spriteNum on new me aSpriteNum spriteNum aSpriteNum return...

Страница 421: ... child object s on new handler The new function creates a child object whose ancestor is scriptName It then calls the on new handler in the child object with the specified arguments You can issue a new statement from anywhere in a movie You can customize the child object s initial settings by changing the values of the arguments passed with the new statement Each child object requires only enough ...

Страница 422: ...heck whether the object car1 was created from the parent script named Car if car1 script script Car then beep end if You can also get a list of the handlers in a child object by using the handlers function or check whether a particular handler exists in a child object by using the handler function This statement places a list of the handlers in the child object car1 into the variable myHandlerList...

Страница 423: ...ild objects Using actorList Lingo can set up a special list of child objects or any other objects that receives its own message each time the playhead enters a frame or the updateStage command updates the Stage The special list is actorList which contains only objects that have been explicitly added to the list See actorList in the Lingo Dictionary The message is the stepFrame message that is sent...

Страница 424: ...lled and the frequency with which you want the handler to be called Once a timeout object is created Director keeps a list of currently active timeout objects called timeOutList To create timeout objects Use the syntax variableName timeOut theName new integerMilliseconds handlerName targetObject This statement uses the following elements variableName is the variable you are placing the timeout obj...

Страница 425: ...o an individual timeout object by its number in the list The following statement deletes the second timeout object in timeOutList See forget in the Lingo Dictionary timeOut 2 forget Relaying system events with timeout objects When you create timeout objects that target specific child objects you enable those child objects to receive system events Timeout objects relay these events to their target ...

Страница 426: ...t is currently running the sequence of handlers that Lingo ran to get to its current point and the value of variables and expressions that you select The Script window lets you enter comments insert stopping points in the script and select variables whose value is displayed in the Object inspector The Object inspector lets you view and set the values of objects and properties you select Good scrip...

Страница 427: ...start locating a problem Think backwards through the chain to identify where the unexpected started to happen Use the Message window to trace which frames the movie goes through and the handlers that Lingo runs Determine what the Lingo should be doing and consider what in these statements relates to the problem For example if a text cast member isn t editable when you expect it to be where in the ...

Страница 428: ...are spelled correctly spaces are in the correct places and necessary punctuation is used Lingo can t interpret incorrect syntax Quotation marks surround the names of cast members labels and strings within the statement All necessary parameters are present The specific parameters depend on the individual element See the Lingo Dictionary to determine any additional parameters an element requires If ...

Страница 429: ...orizontal divider to a new position To hide the Output pane completely Click the Collapse Expand button in the center of the horizontal divider When the Output pane is hidden output from Lingo that executes is displayed in the Input pane To display the Output pane if it is hidden Click the Collapse Expand button again To clear the contents of the Message window Click the Clear button If the Output...

Страница 430: ...go all at once by copying and pasting Lingo statements into the Message window or by pressing Shift Return after each line of Lingo To execute multiple lines of Lingo by copying and pasting 1 Copy the lines of Lingo to the clipboard 2 Enter a blank line in the Message window 3 Paste the Lingo into the input pane of the Message window 4 Place the insertion point at the end of the last line of Lingo...

Страница 431: ...l Lingo includes all Lingo except 3D Lingo presented in an alphabetical list Categorized Lingo includes all Lingo except 3D Lingo presented in a categorized list Alphabetical 3D Lingo includes all 3D Lingo presented in an alphabetical list Categorized 3D Lingo includes all 3D Lingo presented in a categorized list Scripting Xtras contains Lingo terms that are provided by any third party Xtra extens...

Страница 432: ...r where its value is displayed and updated as the movie plays For more information about the Object inspector see Using the Object inspector on page 433 When you are in debugging mode you can follow how a variable changes by selecting it in the Message window and then clicking the Watch Expression button Director then adds the variable to the Watcher pane in the Debugger window where its value is ...

Страница 433: ...e where the two differ You can also copy the section into the original piece and see whether this corrects the problem Using the Object inspector With the Object inspector you can view and set properties of many kinds of objects that are not displayed in the Property inspector These include Lingo objects such as global variables lists child objects from parent scripts all 3D cast member properties...

Страница 434: ...ector Sprites sprite 3 Cast members member 2 Global variables gMyList Child objects gMyChild Flash objects gMyFlashObject For more information about using Flash objects in Director see Using Flash objects in Lingo on page 304 Lingo expressions sprite 7 blend You can also navigate the contents of the Object inspector with the arrow keys on your keyboard To move up or down in the list of items Use t...

Страница 435: ... you entered in the Object inspector remain This makes it easy to compare different versions of the same movie When you exit Director the items in the Object inspector are lost Using the Debugger window The Debugger window is a special mode of the Script window It provides several tools for finding the causes of problems in your Lingo scripts By using the Debugger you can quickly locate the parts ...

Страница 436: ...u use the Debugger to tell Director how to proceed If you have multiple Script windows open Director searches for one containing the script where the breakpoint occurred and changes that window to debugging mode To add a breakpoint that will open the Debugger window 1 Double click on the script that you want to contain the breakpoint 2 Click in the left margin of the Script window next to the line...

Страница 437: ...ence is called the call stack Use the call stack to keep track of the structure of your Lingo while you are debugging You can view the variables associated with a specific handler by clicking the handler name in the Call Stack pane The variables are displayed in the Variable pane Viewing variables in the Variable pane The Variable pane displays the variables associated with the current handler The...

Страница 438: ...the new value for the variable 3 Press Enter Window or Return Macintosh Viewing objects in the Watcher pane With the Watcher pane in the Debugger window you can view variables and other data objects associated with the current handler as well as objects associated with other handlers By adding objects to the Watcher pane you can keep track of their values as they change because of Lingo scripts Wh...

Страница 439: ...o in the current handler When you are confident that nested handlers are performing as expected and want to concentrate on Lingo in the current handler the Debugger window can step over nested handlers and go directly to the next line of Lingo in the current handler When the Debugger steps over a nested handler it executes the handler but does not display the handler s code or pause within the nes...

Страница 440: ...o To Handler button 3 When you are finished debugging and editing scripts click the Stop Debugging button The Script window returns to Script mode 4 Click the Recompile All Modified Scripts button Using the Script window Several buttons in the Script window help debug scripts The script window buttons have the following functions To go to the handler selected in the Script window Click Go To Handl...

Страница 441: ...Writing Scripts with Lingo 441 To add the selected expression or variable to the Object inspector Click Inspect Object To recompile the movie s scripts Click Recompile All Modified Scripts ...

Страница 442: ...Chapter 16 442 ...

Страница 443: ...ctor If you re not familiar with Director you should gain at least a basic knowledge before using 3D in Director MX The Director MX documentation and help files included with Director MX are the place to start You can perform many basic 3D operations using the built in 3D behaviors in Director For more information see Using 3D behaviors on page 466 Most complex 3D operations however are performed ...

Страница 444: ... are stored Cast members are the media in your movies such as sounds text graphics and 3D scenes Sprites are instances of cast members that appear on the Stage with individual properties and attributes A sprite of a 3D cast member displays a particular camera s view into the 3D world The 3D cast member contains models which are individual objects inside the 3D cast member For more information abou...

Страница 445: ...ore information see Creating 3D text on page 462 Lingo is the Director scripting language It can be used to create movies that are more complex and interactive For detailed Lingo information see About the 3D cast member on page 455 Chapter 19 Working with Models and Model Resources on page 473 About lights and cameras on page 511 and Chapter 20 Controlling the 3D World on page 521 3D Lingo command...

Страница 446: ...e W3D Web 3D format which Director supports Typically each rendering application requires its own specific file converter to create W3D files See the documentation for your 3D modeling software for information about creating W3D files 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 ...

Страница 447: ...mera Transform buttons let you set and undo the changes you make to camera angles Set Camera Transform remembers the current camera position Reset Camera Transform restores the camera to the previously remembered position The Root Lock button fixes an animation in place so that it doesn t change its position on the Stage while playing The field at the top of the Shockwave 3D window shows the name ...

Страница 448: ...ical The Property inspector s 3D Model tab provides several options The fields at the top of the tab show the initial position and orientation of the default camera The default 0 0 0 represents a vantage point looking up the z axis through the middle of the screen The values you enter in these fields replace the displayed values and move the camera The Direct to Stage DTS option controls whether r...

Страница 449: ... assign a texture to a shader You can also control its specular highlight color its diffuse overall color and its reflectivity For more information see The 3D world on page 452 and Chapter 19 Working with Models and Model Resources on page 473 Using rendering methods The rendering method refers to the specific way Director displays 3D images on the Stage The methods available depend on the type of...

Страница 450: ...oother against each other and against the background Anti aliasing of 3D sprites is particularly well suited for merchandise demos and other e commerce applications because its image quality is high and it can be turned on and off as needed in real time Effects of anti aliasing An anti aliased 3D sprite uses more processor power and memory than one that is not anti aliased resulting in lower frame...

Страница 451: ...ain Lingo as shown in the following example on beginSprite check whether anti aliasing is supported by the current 3D renderer if sprite 5 antiAliasingSupported TRUE then if it is turn on anti aliasing for the sprite sprite 5 antiAliasingEnabled TRUE end if end beginSprite Turning off anti aliasing If you plan to animate any part of a 3D sprite you might want to turn anti aliasing off temporarily ...

Страница 452: ...nu on the Text tab of the Property inspector 3 Set properties of the 3D text using the 3D Text tab to manipulate the specific properties of the 3D text You can also manipulate the text cast member with Lingo or a behavior For more information see the Chapter 3 Director MX 3D Tutorial on page 103 and Creating 3D text on page 462 The 3D world This section provides a brief overview of the contents of...

Страница 453: ...dels don t appear in and can t be controlled from the Score For example a 3D cast member might contain two model resources One could be the geometry for a car body and the other could be the geometry for a car wheel In order for a complete car to appear visibly in the 3D scene the model resource for the car body would be used once and the model resource for the wheel would be used four times once ...

Страница 454: ...an have one or more children It has no other properties The highest level group is the group called world which is essentially synonymous with the 3D cast member For more information see Groups on page 462 Shaders and textures A model s surface color is determined by its shader or shaders You can draw images on the surface of a model by applying one or more textures to each shader For more informa...

Страница 455: ... objects include the following Model resources are elements of 3D geometry used to render models The same model resource can be used by several models in the 3D world Models are visible objects in the 3D cast member that use a model resource geometry For more information on models see Chapter 19 Working with Models and Model Resources on page 473 Shaders are methods of displaying the surface of a ...

Страница 456: ...lowing figures show the relationships between cameras lights and models within the 3D cast member as well as the relation of a model to a model resource and of a model to shaders textures and motion Although the elements of a 3D scene can be modified and manipulated with 3D behaviors complex work requires Lingo scripting For more information on behaviors see 3D behaviors on page 452 The following ...

Страница 457: ... point of a triangle numTextureCoordinates is the number of user specified texture coordinates Enter 0 or omit this step to get the default coordinates Returns a new mesh model resource with a unique name If the name isn t unique returns a Lingo error newModel Resource name type Creates a new model resource and adds it to the model resource object list The type can be plane box sphere cylinder ext...

Страница 458: ...it exists Returns void if the object does not exist at that index number newModel name modelResource Creates a new model named name and adds it to the world Fails if a model by that name already exists The modelResource argument is optional and can be set at a later time If supplied this second argument must be an existing model resource object Returns a new model with a unique name If the name is...

Страница 459: ...of the cast member Integer texture name Returns the texture object named name Returns the texture object named name if it exists Returns void if the object does not exist texture index Returns the texture at the designated position in the index The index number can change if textures are added or deleted Returns the texture object at that index number if it exists Returns void if the object does n...

Страница 460: ...turns the motion object at that index number if it exists Returns void if the object does not exist at that index number newMotion name Creates a new motion object Returns a new motion object with a unique name If the name isn t unique returns a Lingo error deleteMotion name Deletes the motion named name Lingo references to this motion persist but return void TRUE 1 if the motion named name exists...

Страница 461: ...cast member Integer camera name Returns the camera named name Returns the camera object named name if it exists Returns void if the object does not exist camera index Returns the camera at the designated position in the index The index number can change if cameras are added or deleted Returns the camera object at that index number if it exists Returns void if the object does not exist at that inde...

Страница 462: ...ag the Drag Cast Member button next to the Name text box in the Text window 5 Click the Property Inspector button in the Director toolbar 6 Click the Text tab in the Property inspector Command Function Returns group count Returns the number of group objects included in the cast member Integer group name Returns the group named name Returns the group object named name if it exists Returns void if t...

Страница 463: ...tation with the values that you enter in the text boxes at the top of the pane The default camera position represents a vantage point looking up through the middle of the scene Note You might prefer to define these settings using the Shockwave 3D window instead of the Property inspector 3 Select from among the Front Face Back Face and Tunnel check boxes These options control which sides of the tex...

Страница 464: ...vity As with any model you can apply a texture that uses a bitmap cast member You can import a bitmap cast member or create a new one in the Paint window Be sure to give your bitmap cast member a name if doesn t already have one To assign this bitmap as the texture specify it in the Property inspector Select Member from the Shader Texture menu and enter the name of the member you want to use in th...

Страница 465: ...DTextProperty For example to set the bevelDepth property of the first model in cast member 1 to a value of 25 use the following syntax member 1 model 1 resource bevelDepth 25 Member command scrollByLine Member function charPosToLoc Member function linePosToLocV Member function locToCharPos Member function locVToLinePos Sprite property editable Sprite function pointInHyperLink Sprite function point...

Страница 466: ...ith different triggers These behaviors can be used with any 3D cast member displayFace Get and set Faces of shape to display front tunnel back Default is to show all three faces displayMode Get and set Specifies how the text appears modeNormal Mode3D Default is modeNormal which is 2D text member 1 extrude3d member 2 Not applicable Creates a new model resource in member 2 by extruding the text in m...

Страница 467: ...as separate triggers To view 3D action behaviors 1 Click the Library Palette button on the Director toolbar 2 Click the Library List button and select 3D 3 Select Actions from the 3D submenu 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 Windows only Triggers action when user presses h...

Страница 468: ...ds a sphere to the 3D world each time the trigger action occurs The author can set the diameter and texture Drag Camera Camera Provides full camera control including panning changing the direction in which the camera is pointing dollying moving and rotating through a single behavior Use separate mouse triggers for panning zooming and rotating Drag Model Model Lets users move a model in any directi...

Страница 469: ...es the camera around the z axis by a specified number of degrees each time its trigger is activated This makes the 3D scene appear to rotate and turn upside down Toggle Redraw Drawing Toggles the redraw mode on or off Turning redraw off produces visible trails as a model moves through space Turning redraw on causes the trails to disappear Name Effect Description Automatic Model Rotation Motion Aut...

Страница 470: ...ve a unique trigger to activate it To apply a 3D behavior 1 Open the Library palette 2 Open the 3D library 3 Attach an action behavior to the sprite either on the Stage or in the Score The Parameters dialog box appears You can use this dialog box to control the behavior Depending on the behavior you select the dialog box might have many options or only a few 4 Specify options in the Parameters dia...

Страница 471: ...e About groups on page 471 7 Specify options in the Parameters dialog box 8 Click OK About groups The Parameters dialog boxes of the local and public action behaviors give you the option to assign the behavior to a group Groups let a single trigger initiate actions across multiple sprites To establish a group select a name for the group and enter that name in the Parameters dialog box of each beha...

Страница 472: ...Chapter 18 472 ...

Страница 473: ...so use the Director 3D behaviors or Lingo to manipulate camera positions About models and model resources Models are the objects you see in the 3D world You can create models within Macromedia Director MX Spheres boxes planes cylinders and particle systems can be created either with Lingo or with Director MX behaviors These simple shapes are called primitives They are the basic shapes from which m...

Страница 474: ...on page 498 for more information Primitives Each type of primitive has its own set of Lingo commands and properties used to define its appearance Use the newModelResource command to create new primitives at runtime Property Name Access Description Range or Default name Get Unique string naming model resource If imported the name of the model If created in Lingo the assigned name in the constructor...

Страница 475: ... sphere surface The higher the value the smoother the surface An integer value of 1 or greater The default is 20 startAngle Get and set Starting angle of the sweep Floating point value of from 0 0 to 360 0 The default is 0 0 endAngle Get and set Ending angle of the sweep Floating point value of from 0 0 to 360 0 The default is 360 0 Property Access Description Value Range topRadius Get and set Rad...

Страница 476: ...whether the front of the box is closed or open TRUE 1 closed TRUE 1 or FALSE 0 The default is TRUE 1 back Get and set Value indicating whether the back of the cylinder is closed or open TRUE 1 closed TRUE 1 or FALSE 0 The default is TRUE 1 left Get and set Value indicating whether the left end of the box is closed or open TRUE 1 closed TRUE 1 or FALSE 0 The default is TRUE 1 right Get and set Valu...

Страница 477: ...Number of vertices along the length of the plane 2 or more The default is 2 width Vertices Get and set Number of vertices along the width of the plane 2 or more The default is 2 Property Access Description Value Range vertexList Get and set Lingo vector values for each vertex in the mesh Several faces may share a single vertex Set the value to the number of vectors specified in your newMesh call n...

Страница 478: ...tegers specifying the indexes of the normals in the normalList that each point of the triangle should use Don t set a value if you aren t defining your own normals face index textureCoord inates face index texcoords Get and set List indicating which texture coordinates to use for faces at designated index points Set the value to a list of three integers specifying the indexes of the texture coordi...

Страница 479: ...iption Value Range lifetime Get and set Lifetime of all particles emitted in milliseconds Positive integer The default is 10 000 ms colorRange end Get and set Color value of a particle at the end of its life Any color value The default is rgb 255 255 255 colorRange start Get and set Color value of a particle at the start of its life Any color value The default is rgb 255 255 255 tweenMode Get and ...

Страница 480: ... set Point line or region from which particles are emitted Possible values single vector for point source two vectors for line segment four vectors for quadrilateral emitter distribution Get and set Half the angle over which particles are distributed measured from the top of the screen 0 to 180 emitter path Get and set Vector positions that define the path the particles follow Vector list emitter ...

Страница 481: ...els as children of the world and updates all palettes You can call this function only if the cast member s state property is either 1 meaning that an error occurred during a previous attempt to load the file or 4 meaning that media loading is complete If an attempt is made to call loadFile while the cast member is streaming media in a Lingo error is generated Overwrite is an optional variable that...

Страница 482: ... 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 A node can have any number of children A model for example can be the child of a light and the parent of a group cloneMotion FromCastM...

Страница 483: ...e get and set properties on this list The default list includes the properties assigned in the 3D modeling tool Additional properties may also be added resource Get and set Model resource object defining model s geometry Model resource object shaderList Get and set List of all shaders used by the model Setting this property to a single shader sets every element of the shaderList to that shader Lis...

Страница 484: ...n around the model TRUE 1 or FALSE 0 The default is FALSE 0 bounding Sphere Get A list containing a vector and a floating point value The vector represents the position of the model in world space and the floating point value represents the radius of the bounding sphere that contains the model and its children bounding Sphere world Position Get Position of the model in world coordinates A quick sh...

Страница 485: ...mmand Nothing getWorld Transform Sets this model s position and orientation relative to the world model s position and orientation Nothing remove FromWorld For models whose parent hierarchy terminates in the world this sets their parent to void and removes them from the world Otherwise it does nothing Nothing isInWorld For models whose parent hierarchy terminates in the world the value is TRUE 1 a...

Страница 486: ... Rotates the model by x around the x axis y around the y axis and z around the z axis The relativeTo argument is optional and defaults to self If included it defines the coordinate space of the axes This command can also be written as rotate vector x y z relativeTo Nothing rotate position axis angle relativeTo Rotates the model around the axis vector in the specified position the specified number ...

Страница 487: ...otate 0 10 0 or car child 1 rotate 0 10 0 self where the fourth parameter of the rotate command is the object the rotation should be relative to Parent relative A model s transform property expresses its position and rotation relative to 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 or car child ...

Страница 488: ...ct seems to give off This does not turn the surface using this shader into a light source it just gives it the appearance of being one rgb 0 0 0 blend Get and set An integer between 0 and 100 indicating how transparent 0 or opaque 100 this surfaces is Unlike with a texture that includes alpha information this setting affects the entire surface uniformly 100 transparent Get and set This property co...

Страница 489: ...layer Set Specifies a texture to be used in the third layer and applies the following values textureModeList 3 reflection blendFunctionList 3 blend blendSourceList 3 constant blendConstantList 3 50 0 void diffuseLightMap Get and set Get Returns the texture associated with the second layer Set Specifies a texture to be used in the second layer and applies the following values textureModeList 2 diff...

Страница 490: ...seLight specularLight none textureMode Get and set Access to the texture coordinate generation function for the first layer Possible values are as follows none wrapPlanar wrapCylindrical wrapSpherical reflection diffuseLight specularLight none wrapTransform List index Get and set Access to the texture coordinate generation transform associated with a specified layer This transformation has effect ...

Страница 491: ... regardless of the textureMode property setting This is the last modification of the texture coordinates before they are sent to the renderer Allows you to manipulate the scale orientation and positional offsets of the source image before it s wrapped WrapTransformList changes the projection of the transformed texture The textureTransform matrix operates on the texture in textureImage space which ...

Страница 492: ...g ratio The blending ratio in this case is the value of blendConstant for layer index For example if the layer at that index position s blendConstant value is 0 9 the resultant texture will be 90 of the texture at that index position and 10 of the result of the previous texture layers Possible values are constant and alpha constant blendSource List Get and set Access to the blending sources for ea...

Страница 493: ...is set to FALSE 0 the border of the texture is extended past the unit UV coordinate range TRUE 1 textureRepeat List Get and set Access to the list of texture clamping behaviors one per layer When set to FALSE 0 the border of the texture is extended past the unit UV coordinate range Get Returns a list of texture clamping behaviors one per layer Set Specifies a texture clamping behavior to be applie...

Страница 494: ...video RAM at the same time If not Director switches to software rendering which slows performance Be aware of the limitations of your video RAM and that of your intended audience Some video cards have as little as 4 megabytes of video RAM Carefully budget your total texture size when designing your 3D world highlight Percentage Get and set Percentage of lighting steps to be treated as highlight 50...

Страница 495: ...quality Get and set Property with the following possible values low texture is not mipmapped medium mipmapping is at a low bilinear setting default high the mipmapping is at a high trilinear setting For more information see quality in the Lingo Dictionary medium nearFiltering Get and set Determines whether bilinear filtering is used when rendering a projected texture map that covers more screen sp...

Страница 496: ...d orientation transform position gives the relative position transform rotation gives the relative rotation Set a transform object Get reference to a transform object userData Get and set A property list containing all properties assigned to the group Users can add remove get and set properties on this list The default list includes the properties assigned in the 3D modeling tool User properties a...

Страница 497: ...rary group instances Lingo group object cloneDeep name Clones both the group and the parent used by the group s children Modifications to the clones resource don t affect the parent This is a more memory intensive operation than clone name Lingo group object addtoWorld Adds the group to the currently active 3D world setting its parent as world Equivalent to group parent member scene group world Al...

Страница 498: ...he vector directionVector The relativeTo argument is optional and defaults to self Nothing translate x y z relativeTo Moves the group distance x along the x axis distance y along the y axis and distance z along the z axis The relativeTo argument is optional and defaults to self This command can also be written as translate vector x y z relativeTo Nothing rotate x y z relativeTo Rotates the group b...

Страница 499: ...tic mode A value of 0 0 is most aggressive and removes all polygons A value of 100 00 should result in no visible degradation of the geometry A middle level can be used to remove polygons at runtime that were not removed during authoring A value between 0 0 and 100 0 The default is 100 0 whichModel lod level Get and set The percentage of the model resource mesh resolution to use when the automatic...

Страница 500: ... silhouettes Get and set TRUE 1 or FALSE 0 value indicating presence or absence of lines around silhouettes TRUE 1 whichModel toon creases Get and set TRUE 1 or FALSE 0 value indicating whether lines are drawn when mesh boundaries meet at a crease TRUE 1 whichModel toon creaseAngle Get and set A floating point value controlling crease angle detection 0 01 whichModel toon boundary Get and set TRUE ...

Страница 501: ... to TRUE and set the resolve property to FALSE Use these properties to work with the collision modifier Property Access Description Default whichModel sds enable d Get and set Enables disables subdivision surfaces modifier functionality TRUE 1 whichModel sds subdivision Get and set The following are the possible values uniform mesh is uniformly scaled up in detail with each face subdivided the sam...

Страница 502: ...nal contact TRUE 1 whichModel collision immovable Get and set TRUE 1 or FALSE 0 value indicating 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 immovable property set to TRUE FALSE 0 Command Description Returns whichModel collision setCollisionCallback handlerName scriptObjectName If colli...

Страница 503: ...t to the end of the list Using the play command starts the motion immediately The motion previously at the beginning of the play list is halted unless autoBlend is turned on When you use queue the motion is added to the end of the play list Motions are removed from the play list automatically when they are complete or you can remove them explicitly using bonesPlayer playNext Motion blending If aut...

Страница 504: ...nabled blending begins the instant play is called Nothing whichModel bonesPlayer playNext Ends the currently playing motion removes it from the play list and begins the next motion if blending is enabled blending begins the instant playNext is called Nothing whichModel bonesPlayer queue name looped startTime endTime playRate Adds the specified motion to the end of the play list The parameters are ...

Страница 505: ...lendTime Get and set Length in milliseconds of the period when blending takes place between motions The blendTime property is linked to motion duration Motion blending is disabled if blendTime 0 and autoBlend TRUE 500 whichModel bonesPlayer autoBlend Get and set If TRUE automatic linear blending from 0 0 to 100 0 is applied over the blend time Otherwise blendTime is ignored and the amount of blend...

Страница 506: ... the top pointing along the z axis set lockTranslation to z lockTranslation all is equivalent to rootLock TRUE 1 none Event name Description animation Started This is a system defined notification event triggered when a motion begins playing If looping is on this event is triggered only by the first playthrough During a blend of two animations this event is triggered as the blend begins animation ...

Страница 507: ...s called Nothing whichModel keyframePlayer playNex t Ends the currently playing motion removes it from the play list and begins the next motion If blending is enabled blending begins the instant playNext is called Nothing whichModel keyframePlayer queue n ame looped startTime endTime playRate Adds the specified motion to the end of the play list The parameters are same as those for the play comman...

Страница 508: ...seconds of the period when blending takes place between motions The blendTime property is linked to motion duration Motion blending is disabled if blendTime 0 and autoBlend TRUE 500 whichModel keyframePlayer autoBlend Get and set If TRUE automatic linear blending from 0 0 to 100 0 is applied over the blend time Otherwise blendTime is ignored and the amount of blending is user determined by the ble...

Страница 509: ...roperty maintains any or all of the rotational changes after playing is complete The values are as follows none x y z xy xz all all whichModel keyframePlayer lockTranslation Get and set Defines the axis of translation to ignore when playing back a motion The values are as follows none x y z xy xz all To keep a model locked to a ground plane with the top pointing along the z axis set lockTranslatio...

Страница 510: ...ied mesh whichModel meshDeform mesh index face count Get Returns the number of triangular faces in a given mesh whichModel meshDeform mesh index face index Get Returns a list of three indexes into the vertex normal texture coordinate and color lists These indexes correspond to the corners of the face for the specified mesh whichModel meshDeform mesh index face index neighbor index Get Returns a li...

Страница 511: ...about behaviors see Chapter 18 The 3D Cast Member 3D Text and 3D Behaviors on page 455 More complex manipulations require the use of Lingo commands and properties These are detailed here and in the Lingo Dictionary Help Lingo Dictionary Accessing the properties and commands of a light or camera requires that the light or camera be on the Stage or explicitly loaded with the preLoad or loadFile comm...

Страница 512: ...ng ambient applied to all sides of the model directional applied to those parts of the light facing the light s direction Distance to the light isn t important point Like a bare light bulb omnidirectional and illuminating all parts of the model facing the light spot Like a spotlight casting light on model parts that face it with brighter illumination the closer the model is Similar to directional ...

Страница 513: ...sform is interpreted as remaining parent relative Nothing child index Returns the child at the specified position in the index Lingo light object child name Returns a reference to the named child Lingo light object clone name Clones a light named name adds it to light s parent s child list and adds it to the world All children of the light are automatically cloned This can be avoided by removing t...

Страница 514: ...al and defaults to self Nothing translate x y z relativeTo Moves the light distance x along the x axis distance y along the y axis and distance z along the z axis The relativeTo argument is optional and defaults to self This command can also be written as translate vector x y z relativeTo Nothing rotate x y z relativeTo Rotates the light by x degrees around the x axis y degrees around the y axis a...

Страница 515: ...r group that is this light s parent If the camera has no parent it cannot contribute light group world child count Get Number of immediate children no grandchildren the camera has 0 transform Get and set Lingo transform object representing camera s position relative to its parent s transform The transform position property gives the relative position transform rotation gives the relative rotation ...

Страница 516: ...xponential projection Get and set Method of determining the vertical field of view which must be of type perspective or orthographic perspective fieldOfView Get and set A floating point value specifying the vertical projection angle in degrees 30 0 orthoheight Get and set The number of perpendicular world units that fit vertically into the sprite 200 0 rootNode Get and set Property controlling whi...

Страница 517: ...t Scale value used by a specific backdrop in the camera s list of backdrops 1 0 backdrop index rot ation Get and set Rotation value used by a specific backdrop in the camera s list of backdrops 0 0 backdrop index reg Point Get and set Texture relative rotation point similar to a sprite s regPoint point O O backdrop index ble nd Get and set Blend value used by a specific backdrop in the camera s li...

Страница 518: ...his option lets you quickly create temporary camera instances Lingo camera object cloneDeep name Clones both the camera and all resources used by the camera s children Lingo camera object addtoWorld Adds a camera to the currently active 3D world setting its parent as world Equivalent to camera parent member scene camera world All newly created cameras are added to the world by default without it b...

Страница 519: ...eTo argument is optional and defaults to self This command can also be written as translate vector x y z relativeTo Nothing rotate x y z relativeTo Rotates the camera by x degrees around the x axis y degrees around the y axis and z degrees around the z axis The relativeTo argument is optional and defaults to self If included it defines the coordinate space of the axes This command can also be writ...

Страница 520: ...Chapter 19 520 ...

Страница 521: ...yback You can also find the commands and properties given here in tabular form in alphabetical form with accompanying syntax definitions and examples in the Lingo Dictionary Help Lingo Dictionary 3D Lingo events Event handling lets you use the registerForEvent command to specify a handler to run when a particular event occurs within a specific cast member With the registerForEvent command you spec...

Страница 522: ...mplicitly registered when setCollisionCallback is called Equivalent to calling model collision setCollision Callback timeMS Sets up a time based simulation callback using the format registerForEvent timeMS handlerName scriptInstance begin period repetitions The begin and period arguments are in milliseconds If repetitions is set to 0 the simulation continues indefinitely animationStarted Called wh...

Страница 523: ...that an action such as a button being pushed or a door being opened has taken place Picking can be accomplished using cast member or camera commands pointOf Contact Get Vector describing world space location of collision Available only if the collision has been resolved Occurs if the model s collision modifier resolve property is TRUE 1 or either the collisionData resolveA or collisionData resolve...

Страница 524: ...nt within the rect of the sprite using this camera The location point is relative to the upper left corner of the sprite in pixels The ray is cast forward in the direction the camera is looking This function is useful for picking in conjunction with an onMouseDown handler For accuracy be sure to subtract the upper left corner of the sprite s loc from the mouseLoc The first model intersected by the...

Страница 525: ... in an index between 1 and 3 x Get and set The x component of a vector y Get and set The y component of a vector z Get and set The z component of a vector Command Description Returns normalize Normalizes the vector by modifying it into a unit vector of length 1 This is done by dividing each component of the vector by the vector s original length That original length is the square root of the sum o...

Страница 526: ...r x equaling 1 through 3 A new vector object vector1 vector2 Returns the product of the two vectors A floating point value vector1 vector2 Not supported 0 vector2 scalar Returns a new vector equaling vector2 scalar for x equaling 1 through 3 A new vector object vector2 scalar Returns a new vector equaling vector2 scalar A new vector object transform vector Returns a new vector resulting from apply...

Страница 527: ... vary because of the permissible types of transform operation For example translate followed by rotate gives a different value than rotate followed by translate and the results can t be differentiated after the fact from the rotational information alone The rotate and preRotate commands are the preferred way to modify a transform s orientation Rotation is generally relative to the object s origina...

Страница 528: ...e 0 0 90 After this series of transformations performed in this order the model s local origin will be at 100 0 0 assuming the model s parent is the world Nothing rotate point vector angle Similar to transform rotate xAngle yAngle zAngle except that the arguments are two vectors specifying an axis of rotation as a point and a vector plus an angle specifying the clockwise rotation around that axis ...

Страница 529: ...sform2 Alters the original transform by preapplying the positional rotational scaling effects of transform2 to the original transform If transform2 describes a rotation of 90 around the x axis and this transform describes a translation of 100 units in the y axis transform preMultiply transform2 alters this transform so that it describes a rotation followed by a translation Nothing interpolate oTra...

Страница 530: ...draw themselves This property must be set before any 3D sprite comes into existence Its default value is determined by the preferredRenderer property of the first cast member loaded from file This is a run time property that is not saved Possible values are as follows openGL openGL drivers for a hardware accelerator directX7_0 DirectX7_0 drivers for a hardware accelerator directX5_2 DirectX5_2 dri...

Страница 531: ... You can fit twice as many 16 bit textures as 32 bit textures in the same space If a movie tries to use more textures than will fit on a card at a single time Director switches to software rendering Possible values are as follows rgba8888 one byte for red green blue and alpha rgba8880 same as above without alpha opacity rgba5650 16 bit color with no alpha 5 bits for red 6 for green 5 for blue rgba...

Страница 532: ...pthBufferRange list of bit depth resolutions available colorBufferRange list of bit depth resolutions Property Access Description the preferred3d Renderer Get and set The renderer a particular movie prefers The default value is auto which allows the movie to pick the best available renderer This property is not the same as the currentRenderer property The preferred3dRenderer property stipulates wh...

Страница 533: ...with values ranging from Float_Min to Float_Max vector 0 0 0 0 250 0 camera Rotation Get and set Independent x y z rotation transforms for the default camera with values ranging from Float_Min to Float_Max vector 0 0 0 0 0 0 ambient Color Get and set Light applied to entire scene rgb 0 0 0 backColor Get and set Background color in all views rgb 0 0 0 directional Color Get and set Color of single d...

Страница 534: ...es are as follows 0 unloaded 1 headerLoading 2 headerLoaded 3 mediaLoading 4 mediaLoaded 1 error Once state 3 or 4 has been reached it s safe to execute Lingo that manipulates the 3D world Before then access to particular models may fail because those model definitions may not have been downloaded Also the loadFile cast member method fails except at states 0 or 4 None Command Description Returns r...

Страница 535: ...ested addCamera camera index Adds a camera named camera at the specified index number If the index number is greater than the number of cameras in the sprite s camera count or if there is no index the camera is added to the end of the list An error if a camera of that name can t be found deleteCamera cameraOrIndex If cameraOrIndex is a camera the camera by that name is deleted If cameraOrIndex is ...

Страница 536: ...Chapter 20 536 ...

Страница 537: ...ovie to the window Open the window and play the movie Delete the window when the reason for playing the movie no longer applies When you create a MIAW decide how you want it to function For example decide how you want to display it how users should be able to move the window around the screen and dismiss it and how the window should appear You can specify the window s size and whether the window i...

Страница 538: ...e and the Open Window command Use the following Lingo on beginNewMovie theMovie global newWindow set newWindow to window theMovie set newWindow titleVisible to FALSE open newWindow end beginNewMovie This version of the handler allows the window newWindow to use the default setting for its rect property The default is to use the rect property of the movie that is being opened in the window You can ...

Страница 539: ...rom memory performance slows down if the window is reopened because the movie has to reload however it doesn t consume memory until the movie is reloaded You might want to use this option if you don t expect a MIAW to be reopened after it initially runs or if you want to optimize memory on the computer running the MIAW To close a MIAW but keep it in memory Use the close window command After the wi...

Страница 540: ...s controls the initial position of the window setting them after the window appears moves the window To specify the screen coordinates for a MIAW Set the rect property to the coordinates of the location where you want the window to appear selecting from the following options Define the coordinates as a rectangle in this order left top right and bottom as shown in the following statement set window...

Страница 541: ...ehind other windows and has a title For more information see the Lingo Dictionary To specify whether the window is visible Set the window s visible window property To avoid a potential time lag when the window opens use the preLoadMovie command to preload the movie before it s needed and then open the window when it needs to be visible See visible window property in the Lingo Dictionary To control...

Страница 542: ...ted When you want a MIAW to send a Lingo message to the main movie use the stage to refer to the main movie For example the statement tell the stage to go to Help instructs the main movie to go to the frame marked Help in the main movie To have a MIAW open another MIAW In Lingo only the main movie the Stage can open a MIAW Therefore to have one MIAW open another MIAW you must use the tell command ...

Страница 543: ...t any data Any application that reads HTML must understand the meaning of tags such as TITLE P and BODY HTML tags also describe how information appears on the screen XML on the other hand consists of a set of rules that let you define custom tags and the type of data they can contain and it has no visual component With XML there is no predefined way to display any given type of data such as molecu...

Страница 544: ...ra create a parser object by using Lingo to assign a new instance of the Xtra to a variable This variable now contains the parser object Use a global variable if you need to access the XML data from anywhere in the Director movie global gParserObject gParserObject new xtra xmlparser The next step is to parse the XML data using the parseString command The data can come from the text of a cast membe...

Страница 545: ...e previous XML example would look like the following code ROOT OF XML DOCUMENT ATTRIBUTES e1 ATTRIBUTES tagName ATTRIBUTES attr1 val1 attr2 val2 e2 ATTRIBUTES CHARDATA element 2 e3 ATTRIBUTES CHARDATA element 3 The following example is the same property list with its nested structure shown more clearly ROOT OF XML DOCUMENT ATTRIBUTES e1 ATTRIBUTES tagName ATTRIBUTES attr1 val1 attr2 val2 e2 ATTRIB...

Страница 546: ...lue if text Return value if Processing Instruction type element text procInst name String representing the name of the element VOID String representing the name of the processing instruction child N N is an integer The Nth child node of the node VOID is returned if no Nth child exists or there is a script error VOID VOID attributeName N N is an integer String representing the name of the Nth attri...

Страница 547: ...n this example the gParserObject variable refers to the root node of the XML The child 1 refers to the e1 tag which occupies the first level down in the XML s nested structure The child 2 refers to the second tag within the e1 tag which is the e2 tag The last child 1 refers to the text within the e2 tag which is element 2 Finally the text property is specified so Lingo returns the text of the node...

Страница 548: ...ion with the attributeName property to return the number of attributes in the first child of the e1 tag put gParserObject child 1 child 1 attributeName count 2 Parser objects and XML nodes As described in earlier sections the parser object in the gParserObject variable stores the root of the parsed tree of the XML document An XML node is a node within the tree The root node is like an XML node bec...

Страница 549: ...UTES The following Lingo statements set ignoreWhiteSpace to FALSE and parse the given XML into a list The sample element now has a child that contains one space character XMLtext sample sample parserObj ignoreWhiteSpace FALSE parserObj parseString XMLtext theList parserObj makelist put theList ROOT OF XML DOCUMENT ATTRIBUTES sample ATTRIBUTES CHARDATA If there are non white space characters in a C...

Страница 550: ...r sets commonly used in most non Western countries The first 127 characters binary codes 1 127 are the same in most countries UTF 8 An 8 bit encoding of the Unicode character set This is the XML default character set US ASCII Supports only 7 bit characters EUC JP The EUC character set used widely in Japan SHIFT_JIS Also used widely in Japan Shift JIS is the character set used by default in Japanes...

Страница 551: ...d accessibility behaviors or special Lingo commands The text to speech behaviors and Lingo require the Speech Xtra If you use text to speech in your movie you need to add the Speech Xtra to your movie s Xtra list This is discussed in detail in this chapter About government requirements The U S government has stated that multimedia created for the purpose of fulfilling a government contract must be...

Страница 552: ...vie Testing the Speech Xtra To verify that your computer is configured correctly to let the Speech Xtra work you can perform a simple test To test the Speech Xtra type the following Lingo into the Message window put voiceInitialize If the result is 1 then the Speech Xtra is working If the result is 0 then you might not have text to speech software installed on your computer For more information ab...

Страница 553: ...cessibility Target Accessibility Item Accessibility Text Edit Item Accessibility Group Order and Accessibility Keyboard Controller behaviors together To apply the Accessibility Target behavior 1 Create a shape sprite on the Stage using the Rectangle tool in the Tools panel The accessibility behaviors use this sprite to create a focus ring around other sprites you define as navigable with the keybo...

Страница 554: ...ely below the Stage You can expand the Stage window to display more of this area if necessary 3 Drag the Accessibility Keyboard Controller behavior from the Library palette to the sprite 4 In the dialog box that appears select the accessibility group name for the scene such as Accessibility_Scene_1 5 Click OK 6 Select the editable text sprite if it is not still selected 7 Using the arrow keys move...

Страница 555: ... the other accessibility behaviors in the scene such as Accessibility_Scene_1 3 Enter the tab order for the sprite This is the order in which the sprites are selected when the user presses the Tab key Be sure to number each sprite consecutively and to use each number only once When the movie begins playing the focus ring automatically goes to the sprite whose group order is 1 4 Click OK 5 Repeat t...

Страница 556: ...en by using the Accessibility Speak Member Text behavior To apply the Accessibility Speak Member Text behavior 1 Apply the keyboard navigation behaviors to sprites in your scene For more information see Enabling keyboard navigation on page 553 Drag the Accessibility Speak Member Text behavior from the Library palette to the sprite that you designate to trigger the spoken text when the user navigat...

Страница 557: ...aying 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 There are two captioning behaviors that are designed to be used together Each is designed to be used with the keyboard navigation and text to speech behaviors For informat...

Страница 558: ... number that you selected in the previous step This is the number of words that can appear in the captioning sprite when the captioning begins For example if you want the first section of text to begin at the first word and end at word 15 enter 1 in the previous step and 15 in the Initial Words text box These words are replaced in the captioning display sprite by later sections of the text being s...

Страница 559: ...xt to speech is not available end if end To determine the number of available voices Use the voiceCount function To return a property list that describes the name gender age and index number of the current voice Use the voiceGet function To return a list of property lists that describes all the available voices Use the voiceGetAll function To set a particular voice as the current voice Use the voi...

Страница 560: ... Lingo by Feature section of the Lingo Dictionary Deploying accessible movies To successfully deploy an accessible movie you become familiar with the Speech Xtra s system requirements and download procedure as well as the experience users will have with your accessible movie in real world situations Adding the Speech Xtra If you use the text to speech feature in a projector you need to include the...

Страница 561: ...default It can be downloaded from the Microsoft website at www microsoft com speech A separate screen reader application is not necessary 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 ...

Страница 562: ...Chapter 23 562 ...

Страница 563: ...can make intelligent choices about when and how to perform memory management tasks yourself if necessary A cast member is automatically loaded into memory when Director needs to draw a sprite of it on the Stage Immediately after being drawn each cast member is dealt with according to the value of its purgePriority Lingo property The default value of this property is 3 You can set this property in ...

Страница 564: ...pt in the same frame as a cast member is used the cast member will be treated as if it had its old priority because all drawing on the screen is done before any enterFrame or exitFrame scripts are performed Loading and unloading individual cast members There are several Lingo commands you can use to force specific cast members to load into memory or unload from memory By using these commands you c...

Страница 565: ...core 2 Begin the sprite one or two frames before the frame where you want to display the video 3 Locate this sprite off the Stage except for at least one pixel of one corner of the sprite This is so the user won t notice it 4 Set the sprite s movieRate property to 0 which prevents the movie from playing when first loaded 5 In the frame where you want the video to appear use Lingo to set the sprite...

Страница 566: ...Chapter 24 566 ...

Страница 567: ...s linked media The following guidelines can help make your project go smoothly Before you begin a project plan where media should be located when you deploy your movie and replicate that organization at the beginning of your project This prevents the links between your Director movies and external media files from being broken when you move the project to a different location on a disk or to a dif...

Страница 568: ...frame and use the marker name as in the following Lingo go to frame Main_menu During work sessions save your movie file often Save a copy of the movie after each milestone such as a day of work or after adding a significant new feature or section This way if problems arise you can easily compare the current version of the file to a slightly older version to locate the source of the problem Keep se...

Страница 569: ...screen resolution and available memory in your testing This approach can help you find problems that are specific to an operating system or configuration which are distinct from authoring errors Testing strategies You can use the following strategies to test your movies effectively Be sure to use the Control Preview in browser command Testing in Director is different from testing a Director movie ...

Страница 570: ...ve information about debugging Lingo scripts Index of Director testing and troubleshooting TechNotes at www macromedia com support director troubleshoot html TechNote 13872 General troubleshooting tips at www macromedia com support general ts documents troubleshooting_pt87 htm TechNote 3508 Troubleshooting and developing your logic at www macromedia com support general ts documents tn3508 html ...

Страница 571: ... and protect them from being edited Shockwave browser compatibility Shockwave works with Netscape Navigator as a plug in with Microsoft Internet Explorer for Windows 95 98 ME NT 2000 XP as an ActiveX control and with Microsoft Internet Explorer for Mac OS as a plug in Shockwave can play Director movies in the following browsers When it first encounters an HTML page that references Shockwave Intern...

Страница 572: ...preview a movie in a browser Select File Preview in Browser or press F12 About Xtra extensions All Xtra extensions a movie requires must be installed on your user s system when the movie runs When you distribute a movie you must either include these Xtra extensions or provide the user with the means to download them Using the Movie Xtras dialog box you can specify the Xtra extensions to include in...

Страница 573: ... installation programs or other means of modifying Xtrainfo txt automatically If a user chooses to download an Xtra extension Director retrieves the Xtra extension from the URL specified in Xtrainfo txt using the Verisign download security system Verisign is a standard means of downloading software from secure sources For more information on making Xtra extensions secure for download see Using the...

Страница 574: ...n Third party Xtra extensions often include some explanations and information about the developers Note Another way to include Xtra extensions with a movie is to create an Xtras folder containing all required Xtra extensions in the same folder as a projector file This allows you to see which Xtra extensions are included without opening the movie If you use this method you cannot include Xtra exten...

Страница 575: ... play faster than Shockwave movies from a disk because they do not need to be decompressed These movies are preferable if disk space isn t limited Like Shockwave movies protected movies do not include the information necessary to edit the movie or the software that plays the movie They can be played only by a projector a movie in a window or the Shockwave player Note To edit a movie packaged for d...

Страница 576: ...cify a different file location hold Alt Windows or Option Macintosh when you select File Publish Continue to hold the key for access to dialog boxes that let you specify new paths for both your DCR and CCT files Gives both your DCR and HTML files the same name as your DIR file with the appropriate extensions for example MyMovie dcr and MyMovie html Sets the DCR movie s width and height to match th...

Страница 577: ...elect Fill Browser Window To play a loader movie while the Shockwave file downloads select Loader Movie To display a game with a progress bar while the Shockwave file loads select Loader Game To display a progress bar and image while the Shockwave file downloads select Progress Bar with Image If you select the Shockwave with Image template the template automatically detects the Shockwave player or...

Страница 578: ...u can disable zooming with Lingo by setting the allowZooming property For more information see the Lingo Dictionary Save Local determines if the movie can be saved to Shockmachine Display Progress Bar and Display Logo determine if the progress bar and logo respectively appear while the movie loads in the browser For more information see Setting Shockwave playback options on page 593 To specify how...

Страница 579: ...ovie select Compression Enabled and select the level of compression from the kBits second pop up menu For more information about sound compression see Compressing internal sounds with Shockwave Audio on page 326 To convert stereo sounds to monaural select Convert Stereo to Mono To include comments you might have entered in the Comments field of the Property inspector for your cast members select I...

Страница 580: ...ss the image is compressed To specify that the image download as a progressive JPEG select Progressive The JPEG will then display at low resolution and increase in quality as it continues to download Making a JPEG progressive also reduces its file size Setting movie options for browser resizing If users view your movie in browsers chances are they will resize their browsers How your movie behaves ...

Страница 581: ...that you specify in step 4 To change the size of the movie to fit the size of the browser select Stretch to Fill Any browser resizing stretches the movie to fill the width and height parameters Note however that if the aspect ratio of the movie changes sprites on the Stage could appear distorted If you select Stretch to Fill Director ignores the align tags that you specify in step 4 To let users r...

Страница 582: ...t include Xtra extensions inside the projector itself so there s nothing to unpack Creating projectors When creating a projector place the starting movie at the top of the list of files in the Create Projector dialog box If the Play Every Movie option is selected in the Projector Options dialog box movies play in the order they appear in the list If this option is off only the first movie plays If...

Страница 583: ...f colors the monitor automatically switches to thousands of colors 6 To determine how the projector appears on the screen make an Options selection Full Screen displays the movie in the entire screen placing the menu bar if there is one at the top of the screen and hiding all of the desktop If there s a menu it overlays the top of the Stage In a Window displays the movie in a normal window without...

Страница 584: ...for the projector To avoid problems with linked media create the new projector in its final folder location and do not move it to a different folder Director turns the movies casts and included Xtra extensions into a single projector To create a fast start projector 1 Create a new folder on your computer desktop It does not matter what you name the folder 2 In Director select Modify Movie Xtras Th...

Страница 585: ...te and compress movies and casts 1 Select Xtras Update Movies The Update Movies dialog box appears 2 Select one of the Action options Update converts movies from Director 5 or later versions to the latest file format As it updates movies Director consolidates and removes fragmented data just as when you use Save As To update movies from older versions you must first convert them to the Director 5 ...

Страница 586: ...n to external casts in the Shockwave format Protected movies have the DXR extension and protected casts have the CXT extension Exporting digital video and frame by frame bitmaps You can export all or part of a movie as a digital video You can use this digital video in other applications or import it back into Director Any interactivity in the movie is lost when it is exported as a digital video Yo...

Страница 587: ...uickTime Movie MOV Macintosh PICT Scrapbook PICS or QuickTime Movie BMP is the standard format for a Windows bitmap series PICT Scrapbook and PICS are all Macintosh bitmap file formats 5 If you are exporting in PICS format click Use Frame Differencing to create smaller files This option is dimmed unless you select PICS from the Format pop up menu 6 If you are exporting video click the Options butt...

Страница 588: ...he more frames per second 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 Other frames later in the movie could be set to a tempo of 1 frame per second when the movie is exp...

Страница 589: ...ses the size of the file 7 To determine the color depth the number of colors of your artwork select a setting from the Color Depth pop up menu The compression method you select determines the color depth options available to you in this pop up menu 8 To determine the method by which the exported QuickTime movie is resized select values for Scale You can select a percentage from the Scale pop up me...

Страница 590: ...otected movies This saves you the trouble of re creating the projector every time you change one part of a movie A typical file organization for a distributed movie This approach also makes sense for movies on the Internet but for different reasons If the first movie is small users don t have to wait as long for something to happen Branching to a series of smaller movies also enables users to avoi...

Страница 591: ...e and to use the behaviors that are built in to Director to make the movie wait while certain cast members download Controls and Lingo commands offer methods for sending and retrieving media and other information interacting with a browser and monitoring downloading About streaming movies When you distribute a movie on the Internet streaming provides an immediate and satisfying experience for your...

Страница 592: ...as background loading lets Director perform multiple operations while loading files Because something else is happening while files are loading the user doesn t perceive the wait Note Loading data from a network is different from loading cast members in Director Loading from a network loads data to the local disk Loading cast members in Director means loading cast members into memory It s a good i...

Страница 593: ... not been downloaded select Show Placeholders The placeholders appear as rectangles when the movie plays 5 To lock the movie to its current tempo settings select Lock Frame Durations See Locking frame durations on page 269 6 To make the movie pause when its window is deactivated turn on Pause When Window Inactive To set Shockwave playback options see the next section Setting Shockwave playback opt...

Страница 594: ...t Flash Communication server functionality entirely in Director For more information about using Flash Communication Server MX in Director see Chapter 11 Using Flash and Other Interactive Media Types on page 293 For information about using the Director Multiuser Server see the Multiuser section of the Director Support Center www macromedia com support director multiuser html About streaming with t...

Страница 595: ... the playhead to the specified frame after a certain cast member has been downloaded Jump When Media in Frame is Available moves the playhead to the specified frame after the media elements for a particular frame have been downloaded Jump When Media in Marker is Available moves the playhead to the specified frame after the media elements for the frame at a particular marker have been downloaded Ch...

Страница 596: ...mpacts performance When using network Lingo the current handler must finish before an operation s result can return For best results place Lingo that initiates a network operation and Lingo that uses the operation s result in different handlers An on exitFrame handler is a good location for checking whether an operation is complete To execute a network Lingo operation 1 Start the operation For exa...

Страница 597: ...the page The gotoNetPage command is similar to the Director open command It doesn t return a value To preload a file from the server into the cache Use the preloadNetThing function See preLoadNetThing in the Lingo Dictionary The preloadNetThing function initiates downloading a linked movie asset into the cache where it is available for later use Director can later preload the asset into memory wit...

Страница 598: ...ith Internet security restrictions Because of security issues for movies that play back in browsers the following Lingo features are unsupported for Shockwave movies playing in a browser Many of these restrictions are imposed by the Internet environment For details about security concerns when playing a movie on the Internet see Director and Internet Security on the Director Support Center website...

Страница 599: ...ts can use URLs to Shockwave Audio SWA sound files as file references streamName URL cast member property The following Lingo elements can use URLs as file references only during authoring or in projectors getNthFileNameInFolder searchCurrentFolder The following elements don t work in Shockwave movies because Shockwave doesn t support movies in windows MIAWs open window forget window close window ...

Страница 600: ... for Windows and Macintosh are described in the following list Windows The Macromed Shockwave 8 subfolder of the system folder the system folder is typically c winnt system32 or c windows system Macintosh The System Folder Extensions Macromedia Shockwave 8 folder The setPref command can t write to a file that is on a CD For more information see Director and Internet Security on the Director Suppor...

Страница 601: ...vie uses nonstandard fonts use embedded fonts See Embedding fonts in movies on page 274 Check for sound problems particularly if you stream sounds with SWA About downloading speed Developers distributing multimedia over the Internet usually limit file size primarily because most users connect at relatively slow speeds At 28 800 bps it takes 30 seconds to 1 minute to download a 60K file Using strea...

Страница 602: ...Chapter 27 602 ...

Страница 603: ...s independent 466 469 local 466 468 public 466 469 viewing 467 actions Behavior inspector Beep 364 Change Cast Member 364 Change Cursor 364 Change Ink 364 Change Location 364 Change Palette 364 Change Tempo 364 Go to Frame 364 Go to Marker 364 Go to Movie 364 Go to Net Page 364 New Action 365 Perform Transition 364 Play Cast Member 364 Play External File 364 Restore Cursor 364 Set Volume 364 Wait ...

Страница 604: ...g line spacing 279 AVI Video for Windows See digital video axis and camera movement 447 and model generation 475 and model movement 486 487 498 camera movement 469 colors 469 in animation 491 506 509 B background color 179 color chip 253 lighting 449 background operations See network operations 592 Background Transparent ink 183 Beep action 364 Behavior inspector 362 445 Behavior library 3D 445 46...

Страница 605: ...w in 572 status area text 600 Bucket tool Paint window 207 button cast member properties 375 button tool palette 253 C cache clearing 47 call command 370 cameras commands 518 524 defined 454 515 manipulating 447 448 468 469 overview 511 position and rotation 463 469 properties 515 resetting 469 canonical x axis 527 canonical y axis 528 canonical z axis 528 canvas area defined 28 captioning 557 cas...

Страница 606: ...al and external 128 managing external 153 casts continued opening in new window 134 preferences 138 saving 153 saving as libraries 154 centering the Stage 46 centimeters specifying as unit of measure 278 Change Cast Member action 364 Change Cursor action 364 Change Ink action 364 Change Location action 364 Change Palette action 364 Change Tempo action 364 Changes Only option 165 channels defined 3...

Страница 607: ...597 puppetTransition 271 showGlobals 403 showLocals 404 comments Lingo scripts 391 uses for 426 comparison operators 409 compressing bitmaps 579 movies 576 sounds See Shockwave for Audio concatenating strings 410 conditions describing 392 in a movie 392 setting 402 testing and setting 409 constants definition of 389 using in Lingo 408 contains function 290 context menus 34 continuation symbol crea...

Страница 608: ...mproving playback performance 341 preloading 341 synchronizing with cue points 328 341 turning tracks on and off with Lingo 337 using on the Internet 340 Video window 332 digital video cast member properties 333 Direct to Stage digital video property 334 Direct to Stage Flash movie 295 directional light 449 Director 5 and later movies updating 45 Director 8 similarities to 444 Disk Cache Size opti...

Страница 609: ... option 191 extruder model resource 481 Eyedropper tool 262 Eyedropper tool Paint window 207 F facets text 463 Fade to Black White 260 fading sprites 180 188 FALSE keyword definition of 392 testing for 409 favorite colors editing 258 field cast member properties 285 Field window 283 fields checking content of 290 checking for user clicks with Lingo 379 creating 282 modifying 291 file references UR...

Страница 610: ...e 31 jumping to with Lingo 375 looping 376 moving sprites in 172 printing 48 selecting within a sprite 160 start and end 163 Full Screen projector option 583 functions charToNum 381 contains 290 definition of 390 getError 328 getErrorString 328 getVariable 301 hitTest 301 key 380 keyCode 380 netDone 596 netError 596 netLastModDate 597 netMime 598 netStatus 600 netTextResult 597 numToChar 381 retur...

Страница 611: ...6 cast members 146 color palette requirements 266 digital video 332 image options 150 JPEG files 204 importing continued linking to files 149 PICS and Scrapbook 150 Preserve Original Data for External Editing option 148 151 sound 320 supported file types 149 text 276 text with Lingo 276 Xtra extensions 50 In a Window projector option 583 inches specifying as unit of measure 278 Include Original Da...

Страница 612: ... model resources 474 modifier 469 level of detail LOD modifier automatic assignment of settings 474 properties 474 libraries creating new 154 Library palette Behavior library 467 Lighten button Paint window 218 Lighten ink 184 Lightest ink 183 lights 511 and text 464 commands 460 defined 454 manipulating through Property inspector 449 overview 511 properties 512 line settings for vector shapes 248...

Страница 613: ...or 595 looping and frames containing transitions 271 animation 449 frames 376 sound 322 lowercase letters using in Lingo 391 405 M Macromedia Director cast members 243 exporting to 241 placing Fireworks files in 240 Magnifying Glass tool 29 Magnifying Glass tool Paint window 207 Maintain Outdated Ink Mode Limitations option 45 managing projects 567 mapping fonts and special characters 284 285 mark...

Страница 614: ... Within event 364 Movie Casts command 153 movie in a window closing 539 controlling appearance 541 controlling interaction with other movies 542 movie in a window continued creating with Lingo 538 cropping 540 events involving 542 handlers for 542 listing 541 memory and 539 opening 538 overview removing from memory 539 scaling 540 setting size and location 540 setting window type 539 Movie Palette...

Страница 615: ...Not Copy ink 183 Not Ghost ink 183 Not Reverse ink 183 Not Transparent ink 183 Novell networks movies on 575 numbers decimal 405 floating point 405 numToChar function 381 O object relative model movement 487 obtaining data from a network 596 on new handler creating 420 one frame sprites stretching 173 onion skinning description of 234 registration points for 234 toolbar for 234 opacity of particle...

Страница 616: ...ng 523 524 PICS import 150 PICT Cast Member Properties 238 pixels specifying as unit of measure 278 placing handlers 397 planes 477 Play Animation option in Property inspector 449 Play Cast Member action 364 play command 376 play done command 376 Play Every Frame digital video property 335 Play Every Movie projector option 583 Play External File action 364 Play While Downloading Movie playback pro...

Страница 617: ...reating interaction with Lingo 338 exporting options 588 importing files 147 masks 337 rotating and scaling with Lingo 338 See also digital video QuickTime VR 335 337 interaction 338 panning 339 R radius of cylinder 475 of sphere 475 real time recording 200 Rectangle tool 247 rectangles drawing 247 reflectivity 449 464 Reg Point Horizontal and Vertical option 163 registration onion skinning 234 se...

Страница 618: ...5 scaling movie in a window 540 sprites 175 vector shapes 251 Score 20 444 adding frames 33 basics of 22 Blend display 166 channels 27 Score continued digital video in 335 displaying sprite information in 41 editing frames 43 Extended display 166 frames 31 Ink display 166 markers 42 Member display 166 Motion display 166 number of channels 27 30 playhead 32 preferences 41 Script display 166 searchi...

Страница 619: ...rties 254 shape drawing tools Paint window 208 shapes 253 creating with Tool palette 253 Sharp Changes tweening option 188 191 shocked fonts 274 Shockmachine exporting movies for 579 Shockwave and global variables 403 backward compatibility 45 description of 19 linking to local media 332 playback options 593 projector 575 Shockwave 3D window 446 Shockwave Audio compressing internal sounds 326 cont...

Страница 620: ...66 creating 157 defined 29 displaying and editing properties 162 displaying Sprite toolbar 163 displaying the Sprite Overlay 164 editing frames 192 editing properties with Lingo 166 sprites continued extending 174 fading 188 finding location with Lingo 380 flipping 178 foreground and background color 179 info panels 164 joining 174 label options 166 labels 165 layering 161 locking and unlocking 16...

Страница 621: ...r decimal and floating point numbers 405 for frames and movies 406 for integers 405 syntax continued for lists 398 for strings 405 of Lingo elements 390 troubleshooting 426 system events relaying to child objects 425 system requirements 13 T Tab key using to reformat script 414 tempo comparing actual 269 controlling 269 controlling from Lingo 269 for animated GIFs 205 making consistent across diff...

Страница 622: ...form operator 530 transforms 487 commands 528 defined 526 functions for creating 526 properties 527 transition cast member properties 272 transition Xtra extensions 51 transitions adding 270 channel 270 controlling with Lingo 271 differences between platforms 271 overview 270 tips for using 271 transition Xtra extensions 270 271 Transparent ink 183 Transport Control ShockMachine option 578 594 tri...

Страница 623: ...t for with Lingo 252 vectors 524 binary operations 526 commands 525 functions for creating 525 manipulating with transform functions 526 properties 525 verbose syntax in Lingo 392 Verisign Xtra downloading 573 vertex defined 245 selecting 247 vertices in mesh 477 478 of box 476 of plane 477 Video for Windows AVI See digital video video See digital video Video window 332 View menu Display commands ...

Страница 624: ...ommand 232 importing 50 installing 51 managing for distributed movies 572 scripting 50 tool 51 transition 51 270 271 viewing properties 142 143 Xtras Cast Member Properties dialog box 155 Z z axis and camera movement 469 and model movement 486 zero point moving for paint rulers 213 Zoom pop up menu in Score 33 zooming Paint window 214 Stage 28 Vector Shape window 246 Zooming ShockMachine option 57...

Отзывы: