Script Library GraphicAre you new to Macromedia Director?

These scripts solve a few common problems that we'd like to help you overcome. (For example - how to send an e-mail without opening that "page not found" browser window!)

You can place this in Director's library folder (found at "C:\Program Files\Macromedia\Director 8\Libs") and it will appear in the "Library Palette" every time you start Director.

Script Cast Members Screen ShotSee explanation of scripts below...

 

 

 

 

 

 

 

 

 

Explanation of included scripts:

Startmovie-
The "Startmovie" script is the second script Director runs when your movie is played. Here are some settings that I use in almost every project.
--append the searchpath-- This forces Director to search a subdirectory for any files that it cannot find. This allows you to place subsequent Director files, video, other media and HTML files in a sub-directory. Keep your root directory clean by using a "stub" projector to lead to your main movie.
--set the exitlock = 1-- Locks the user into your presentation so he/she can not use the "Esc" key to exit. Force them to view the entire presentation or use your own custom "Exit" button.
--set the soundDevice = "DirectSound" -- Director will try and use this sound driver first. This is the best driver to use on the PC (May not be applicable to Mac users)

Hold-
Loops the playback head on the current frame. Macromedia also provides the same script in their "Navigation" library palette.

Go To Marker-
Drop this behavior on a sprite and specify a marker. It will move the playback head to that marker when the sprite is clicked. Macromedia provided this as a "Go To Frame" behavior in their "Navigation" library palette. I modified it very slightly to allow use of markers.

Rollover Next Member-
Set up your cast with your "normal" button followed by the "over" button. This script will exchange the 2 when the cursor moves over or off of the button.

Close Hand-
Creates a closed hand when the user clicks on a button. I use this with sliders to create a more intuitive interface. I use this along with a slider script that is provided at http://www.director-online.com. It is not included here because of the copyright.

Hide Cursor-
When presenting video, I notice that most people leave the cursor where it is for the duration of the video. If you'd wanted a white arrow in the middle of your video, I'm sure you would have edited it that way. Use this to get rid of it.

Show Cursor-
Don't forget to return the cursor when the video is over.

SoundEnabled-
For use on PC systems when switching between MPEG audio and WAV audio. Some systems have trouble playing an MPG video file and WAV audio (in the sound channels) simultaneously. Also, some systems have trouble switching between the two. Use these 2 scripts to turn the sound off and then back on before and after playing an MPEG video. This problem occurs most on NT systems and laptops.

MPEGpass-
Director allows you to "pause" the playback head for the duration of the video through the "Tempo Channel", but this also stops other buttons and animation! Place this in the script channel above the last frame that your video appears in. The playback head will loop on that frame until the video is done. For authoring purposes, you can skip the video by pressing the space bar (You don't have to watch the entire video yet again to test other aspects of your presentation!)

Pause, Play and Stop-
Controls for your digital video. Stop can also be used for a "rewind" button, since it return the video to frame 1.

Timer-
Usefull for timing events to your digital video, or otherwise "pausing" the playback head for a few moments without adding many frames.

LocalHTML-
This script allows you to open a .htm file from the CD. This is very useful for "hiding" that confusing "Error - Page Not Found" browser window that opens when sending an e-mail from director.

CuePassed-
Place in the Score Script channel to pause the playback head while an audio file is playing. Use this script when creating slide shows.

E-Mail Example-
A simple example of a script to send an email. The comments also explain how to use this script with "LocalHTML" to "hide" the "Error - Page Not Found" browser window that opens when sending an e-mail from director.

Checkloaded-
When creating a slideshow to be run from CD-Rom, you may want to load all of the slides before playing the show. Running large slides and audio simultaneously can make the presentation "skip" if it can't load the data from disc fast enough. (This is usually only a problem on laptops with CD drives that spin down.)

Quit-
Place in the Script Channel or on a button to end the presentation.



Download Script Library Download Library now!
wsmc_partial_library(44k)

 

If you use any of these scripts in your presentations, please send a note and let us know that you found them useful. Also, if you have ideas for improving a script or feel that some of these are a little confusing, please let us know and we will try to improve the collection for others.

info@websitemechanics.com