Director Tutorials

 

Dean's Director FAQ - PROJECTORS

Another FAQ exists at MediaMacros, which is new and extensive.

Projectors and Display Options

Question: What is a stub projector and why should I use one?
Answer:
A stub projector is a projector (Director made self executable) that simply calls an external Director movie (DIR or DXR). The external movies contain all the content and thereby simplifies development. The stub movie sets up the Stage size, location, background colour and contains a behavior in the first frame opening the first movie similar to:

on exitFrame
  go to movie "FirstMovieName"
end


The resulting stub projector will be small in file size so will start quicker. A projector can open DIR files or DXR files (protected movies). An application made of many small files rather than few large ones is better for memory management.

A stub projector is also useful for making cross platform CDs where the data is shared but only need the front end projector is specific for each OS. Stubs are the most efficient way to start any Director presentation.

See my Creating a Stub Projector Tutorial for detailed information.

For other information, look at Zeus Tech Note Creating and Using Stub Projectors or Adobes Technote - Fast Start Stub Projectors

Black Border

Question: How do you get rid of the black border around the Stage when playing a movie as 'full screen'?
Answer:

1) From D10+, Director has the capability to remove the black border. In the Display Template, you can set the Border property to None.

For Director MX (v 9) or earlier:
1) With an Xtra
The WinShaper Xtra allows you to create a projector window of a non-rectangular shape with no border. So, what you do is create a small movie, 1 pixel by 1 pixel in Stage size with whatever colour you want for your background. Then, you use that movie to open a MIAW using the Winshaper Xtra to define the outline of the window. This Xtra is available at RaveWare.

There's another Xtra called the Border Xtra that removes the border.

2) Using a bitmap to define the outline of a MIAW
You can use an undocumented feature using a 1 bit bitmap to define your MIAW, following a similar process to the one I suggested using the WinShaper Xtra. This is can be used for Director 7.02 and above, using the following Lingo to define the MIAW
(window "window name").windowType = member("1 bit bitmap")

I found out that using the name of a non-existing member gives a window without border.
set newWindow.windowType to member("dummy")
where "dummy" doesn't exist in the cast window at all

You can download the following files and see the above at work:
caller1.dir -- This movie opens sets the background colour and opens "main" as a MIAW without a border. It uses a dummy cast member - the cast member to define the outline does not exist.
caller2.dir -- This movie is a variation of the above but has a cast member called "dummy". This member is non rectangular to show how you can create an odd shaped MIAW.
main.dir -- This is the movie to be opened as a MIAW.
Create a projector that is set to full screen and centred using either "caller1.dir" or "caller2.dir"

There is an article on DOUG about 'Non-rectangular MIAWs' which covers the above as well as a little about stub projectors.

Scaling to monitor sizes

Question: How do you get projectors to play full-screen (fill the monitor)?
Answer:
There are 2 ways to fill the monitor with your projector:
1. Resize the Stage to the monitor's size
With Director 7.02 and above, you can use Lingo ('drawRect of window' and 'rect') to resize the Stage to different monitor sizes.

on startMovie
  (the stage).rect = (the desktopRectList)[1]
  (the stage).drawRect = (the desktopRectList)[1]
end


The Movie will NOT play full screen if the In a window option is used in the Create Projector dialogue box. Play full screen has to be checked to use this full screen technique.

However, this will not provide reliable results in terms of quality and performance. Movies will generally play slower and some graphics may be not look good. You can find more detailed information Macromedia's technote on this question.

2. Resize the monitor to the Stage size
This can only be done with an Xtra. On Windows, changing monitor resolution is subject to limitations of the operating system version, system configuration or SVGA video device driver software. For example, Windows 95 may require Microsoft's free QuickRes utility to enable on-the-fly display settings. Windows 98, Windows NT4 and the Macintosh OS are normally able to reset monitor resolution without restarting the system. For more information, refer to Microsoft or the 3rd party Windows SVGA video card vendor.

The following Xtras resize the monitor at runtime:
DisplayRes Xtra
, BudyAPI Xtra and DM Change Res.

Projector Icons

Question: How can I change the icon for my Director projector?
Answer:

With Director MX, the publishing settings allows you to assign an icon to a projector. More info on this process can be found here. Otherwise, there are extral applications that will do this for you. On Windows, you can use a program like Microangelo to replace the Director icon with one of your own. On Mac environment you can swap icons by copying and pasting the icon in the File Info window.

There is a free Windows program called Versiown that allows you to replace the icon as well as a bunch of other info in the properties box for the projector. It used to be a for-pay program, but they recently released it as freeware. It is very easy to use.

Projector Title

Question: When I create a projector using the options 'In a Window' and 'Show Title Bar', the name in the title bar is the same as the projector's file name. Is there a way to change the window's title bar text without renaming the projector?
Answer:

Use the following in a movie script to give the projector window your own title:
on prepareMovie
  (the stage).title = "Title For Your Projector"
end


In Director MX 2004, you can set the titlebar text through the Display Template.

Projector Instrancing

Question: How do I prevent users from starting 2 (or multiple) instances of a projector?
Answer:

In the Projector tab of Publish Settings, there is a property Single Instance Only.

You can also use an .ini file. Create a text file called <projectorname>.ini that
contains the following 2 lines:
[Settings]
SingleInstance=1

Buddy API Xtra has a function to detect a previous running instance of the projector with baPrevious().