主题:  Quick tips for Director

Call Me Simon

职务:普通成员
等级:2
金币:2.0
发贴:646
#12001/3/13 12:28:10
Quick tips for Director (from macromedia.com)


Globals are maintained across movies. For example, a global variable can be used to maintain a record of which frame a movie was in when a user navigated from it.


Using externalParamvalue with the tag can only test for certain values: redirect, swURL, swText, swList, swPreloadTime, swVolume, swAudio, swSound, swBanner, swFrame, swColor, swName, swPassword, swForeColor, swBackColor, and sw1 through sw9.


When using externalEvent, the and tags need to have parameters to identify the movie to the browser. For it should be . For it should be .


A Director 7.02 projector can scale movies and sprites to fit different monitor sizes using the Lingo command, "drawRect". Refer to TechNote 12609, www.macromedia.com/support/director/ts/documents/stage_size_issues.htm.


For information on using the Lingo command, "externalEvent" with Shockwave, browsers, and javascript, refer to TechNote 14163, www.macromedia.com/support/director/Ts/documents/externalevent_samples.htm.


Make it a habit to always test projectors by playing them as users would.


Library behaviors must be dragged into the cast window before they can be applied to a sprite via the Behavior Inspector.


To speed a transition, consider enlarging the chunk size rather than reducing the duration.


With Director 7 you can specify the number of sprite channels. To improve performance, specify only the number of channels you are using.


Remember that setting the "visible" of a sprite turns everything in the sprite channel off. Consider setting the LocH or LocV of the sprite to location offstage.


One movie script per movie is sufficient.


Use the Watcher window for real time tracking of any variables, for sprite locations, or for any command that can be tested.


Use the "Print Screen" key on the keyboard to copy the contents of the screen. This can then be pasted into an empty cast member.


Use the "Lingo by Alphabet" button to avoid syntax errors. This button is located in the script window and in the Message window.


Use the "Categorize Lingo" button to find out other Lingo related commands. This button is located in the script window and in the Message window.


To avoid a Director 7 crash when using the Lingo command, "forget" with a MIAW, refer to TechNote 14069, www.macromedia.com/support/director/Ts/documents/d7_miaw_forget_crash.htm.


To create a custom text scroll bar, use the Text behavior in the Director 7 Library palette.


Director 7.02 projectors and Shockwave 7 can stream and play QuickTime media from a URL via Apple's QuickTime 4.0.3 system extensions. Refer to TechNotes 13324, www.macromedia.com/support/director/Ts/documents/dv_sw_faq.htm, and 14016, www.macromedia.com/support/director/Ts/documents/stream_qt_via_sw7_d702_qt4.htm.


Director 7.02 can play and stop regular sounds. Director can play, continue and stop Shockwave Audio and MP3 audio. Director can play, pause, continue, stop, rewind, fast forward, and randomly cue a QuickTime soundtrack.


To post data to a URL, use "postNetText" or "getNetText" together with a CGI or PERL script running on the server. Or, do this (and more) using Director 7's Multiuser Server and Xtra.


Projectors and Shockwave movies can save text to a user's system disk using "setPref". To read the text file use "getPref". Or, projectors can do this (and more) using the FileIO Xtra included with Director.


Looking for example behavior scripts, tutorials, articles, Xtras and so forth? Refer to TechNote 3104, www.macromedia.com/support/director/Ts/documents/tn3104-dirwebsites.html.


Confused about the difference between the Lingo commands, "go to the frame", "delay", and "repeat"? Refer to TechNote 12493, www.macromedia.com/support/director/Ts/documents/delay_is_for_playback_head.htm.


For techniques on creating Director 7.0.2 projectors that launch faster, refer to TechNote 13965, www.macromedia.com/support/director/Ts/documents/d7_fast_start_projector.htm.


A projector can launch a web browser using the Lingo command goToNetPage. You can target a window or frame; for example: goToNetPage "my_page.html", "_new".


To launch (run) an external application, use the Lingo command "open" or a third party Xtra. Use a full path to specify an application. Refer to TechNote 12265, www.macromedia.com/support/director/Ts/documents/open_app_or_projector.htm.


To keep a projector running, even when you've launched or switched to another application, use the projector option, "Animate in background".


To select all score notation, including markers, sprites, sounds, etc.: double-click and then drag the playback head (all in one gesture). Then copy the selection and paste into a new area of the score.


To play linked media in Shockwave, store the local media files in a folder named "dswmedia".


To insure that "safe for Shockwave" Xtra is available for use in Shockwave, use the "Download if needed" feature in the Modify menu > Movie > Xtras dialog. See also: TechNote 13653, www.macromedia.com/support/director/Ts/documents/sw7_xtras.htm.


Only the full, commercial version of Director is licensed to create projectors that play without displaying a "not for resale" splash screen.


To test or set monitor bit-depth, use "colorDepth". To test monitor resolution, use "deskTopRectList". To set monitor resolution, use a third party Xtra.



jerrowolf

职务:普通成员
等级:1
金币:0.0
发贴:83
#22001/3/13 22:43:13
好棒,有连载么?