Director Tutorials

 

ScrnXtra v2.0.4

Download here
New version 2.2.0 adapted by Pierre Luscher (pierre.luscher@free.fr) for Director 11+.

- add support for uft8 in pathname on both Macintosh and Windows versions
- can be used on Mac OSX 10.4 and more (even on Mac Intel). - add a new option in the ...ToMember functions to don't trimWhiteSpace like in previous version

Example :
ScreenToMember(left, top, right, bottom, memberNumOrName, *Optional_castNum,*Optional_TrimWhiteSpace)

put StageToMember(0,0,800,600, 5, 1, false)

 



ScrnXtra
v2.0.4 Docs

16-Feb-98

ScrnXtra v2 is a free extension for use with Director v5 or later that captures all or portions of the screen or stage. The capture can be sent to a cast member, the system clipboard or a disk file. The image can optionally be resized as well.

Documentation and program are written and copyright © 1996,97,98 by:

Kent Kersten (kent@littleplanet.com)
Little Planet Publishing
5045 Hillsboro Road
Nashville, TN 37215

Please be aware that the Xtras, sample movies and documentation are all provided “as-is”, without any kind of warranty or suitability statements whatsoever. You use them at your own risk and we are in no way responsible for any consequences.

If you find this Xtra useful and are feeling generous, I would personally be very grateful if you would make a contribution to the following non-profit organization:

Nashville Children’s Theatre
724 Second Avenue South
Nashville, TN 37210
(615) 254-9103

The NCT is in its 66th season of serving the children of Nashville with arts entertainment and education. I would suggest a donation of $20, but any amount would be appreciated. Please note that making a contribution is NOT a requirement to use this Xtra.

Target platforms:

Macintosh 68K
Macintosh PowerPC
Windows 3.1
Windows 95/NT

The Macintosh versions are combined in a single “FAT” binary Xtra named ScrnXtra. The Windows 3.1 version is named ScrnXtra.x16 (for 16-bit Windows platforms) and the Windows 95/NT version is named ScrnXtra.x32 (for 32-bit Windows platforms).

How to use it:

Simply drop it into the Xtras folder or directory that your copy of Director uses.

For authoring on the Macintosh, place the Xtra into the folder named “Xtras” that resides in the folder where the Director application is installed. For use with Macintosh projectors, create a folder named “Xtras” that resides in the folder where the projector is installed and place ScrnXtra there.

For authoring on the PC, place ScrnXtra.x16 into the directory named “Xtras” that resides in the directory where the 16-bit Director application is installed. For use with 16-bit PC projectors, create a directory named “Xtras” that resides in the directory where the projector is installed and place ScrnXtra.x16 there.

For the 32-bit PC version of Director, place ScrnXtra.x32 into the directory named “Xtras” that resides in the directory where the 32-bit Director application is installed. For use with 32-bit PC projectors, create a directory named “Xtras” that resides in the directory where the projector is installed and place ScrnXtra.x32 there.

To get a quick overview of the available functions, type the following into Director's Message window:

put mMessageList(xtraScrnXtra”)


Initialization:

There are no “initialization” or “mNew” calls to make if you place the Xtra into the proper directory (see above). The new handlers simply exist when Director is launched. Likewise, there is no cleanup or “mDispose” calling to do.


General notes:

1) If you have used Director v4 and are now using v5, one difference you will notice is that in v4, Director preserved “white space” surrounding pictures while v5 does not. For instance, if you use the Xtra to capture a portion of the stage or screen that has only white pixels on one or more sides, the resulting picture if imported into Director v5 will be smaller than the area you captured.

2) On the Macintosh it sometimes is necessary when installing new Xtras to delete the file “Director 5 Xtra Cache” that lives in the System Folder's “Preferences” folder. On occasion Director will fail to recognize new Xtras until you exit, delete the cache file, then restart Director.

3) ScrnXtra was formerly named “ScrnUtil”. Delete the older, less adequate version when installing.

4) On Macintosh captures to disk, a PICT-type file is created; on Windows, a BMP-type file is created.

5) On Windows captures to a disk file, remember to include the “.bmp” extension in your filenames, or else certain applications may not know how to deal with them.

6) Pass integers for the coordinates to capture and character strings for the filenames in the methods. Casts and their members can be referred to either by number (integer) or by name (character string).

7) On a PC, both the .x16 and .x32 files can be together. Depending upon whether you are running 16- or 32-bit Director, the correct file will be used automatically.

8) Please see the ScrnXtra.dir movie for specific examples.


Supported calls:

The “Stage” methods capture all or part of the Director stage, while the “Screen” methods capture all or part of the whole screen. Please note that the functions do not perform any bounds checking on the passed coordinates.

On “..Member” calls, the final two arguments are the name or number of the cast member and the name or number of the cast to use. Note that if you do not provide the cast name or number, the “Internal” cast is used. You must always supply a member name or number.

StageToMember(left, top, right, bottom, memberNumOrName, *)

Copy a region of the stage given by the bounding rectangle to a cast member with the given name or number. The * means that specifying the name or number of the cast is optional. If it is not supplied, the “Internal” cast is used (cast #1).

StageResizeToMember(left, top, right, bottom, newWidth, newHeight, memberNumOrName, *)

Copy a region of the stage given by the bounding rectangle to a cast member with the given name or number at the requested size. The * means that specifying the name or number of the cast is optional. If it is not supplied, the “Internal” cast is used (cast #1).

StageToClipboard(left, top, right, bottom)

Copy a region of the stage given by the bounding rectangle to the system's clipboard.

StageResizeToClipboard(left, top, right, bottom, newWidth, newHeight)

Copy a region of the stage given by the bounding rectangle to the system's clipboard at the requested size.

StageToFile(left, top, right, bottom, filename)

Copy a region of the stage given by the bounding rectangle to a disk file with the given name.

StageResizeToFile(left, top, right, bottom, newWidth, newHeight, filename)

Copy a region of the stage given by the bounding rectangle to a disk file with the given name at the requested size.

ScreenToMember(left, top, right, bottom, memberNumOrName, *)

Copy a region of the screen given by the bounding rectangle to a cast member with the given name or number. The * means that specifying the name or number of the cast is optional. If it is not supplied, the “Internal” cast is used (cast #1).

ScreenResizeToMember(left, top, right, bottom, newWidth, newHeight, memberNumOrName, *)

Copy a region of the screen given by the bounding rectangle to a cast member with the given name or number at the requested size. The * means that specifying the name or number of the cast is optional. If it is not supplied, the “Internal” cast is used (cast #1).

ScreenToClipboard(left, top, right, bottom)

Copy a region of the screen given by the bounding rectangle to the system's clipboard.

ScreenResizeToClipboard(left, top, right, bottom, newWidth, newHeight)

Copy a region of the screen given by the bounding rectangle to the system's clipboard at the requested size.

ScreenToFile(left, top, right, bottom, filename)

Copy a region of the screen given by the bounding rectangle to a disk file with the given name.

ScreenResizeToFile(left, top, right, bottom, newWidth, newHeight, filename)

Copy a region of the screen given by the bounding rectangle to a disk file with the given name at the requested size.


Error messages:

The Xtra returns status values from each of its callable functions to let you know if the operation was successful, and if not, why. The following table lists each error code returned by the Xtra.

return value

error explanation

0

Successful completion

-10

File open failure

-11

File write failure

-12

File close failure

-21

Specified cast name not found

-22

Cast argument must be an int or a string

-23

Specified cast number not found

-31

Specified member name not found

-32

Member argument must be an int or a string

-41

Could not create bitmap cast member

-42

NewMediaInfo failure

-43

Could not access created cast member

-44

SetMedia failure

-101

OpenPicture failure

-102

ZeroScrap failure

-103

PutScrap failure

-104

Could not allocate capture buffer

-105

Could not determine Mac GC type

-201

GetDC failure

-202

CreateCompatibleDC failure

-203

CreateCompatibleBitmap failure

-204

Could not access Windows system clipboard

-205

Could not EmptyClipboard() on Windows

-206

Could not SetClipboardData() on Windows

-207

Could not CloseClipboard() on Windows