Xtra Developer Kit Examples


About the Examples Folder

This XDK comes with skeleton (template) projects in the Examples folder for Interrogator, Transition, Sprite, Scripting, Filter, and Tool Xtras. These templates include projects for Visual C++, CodeWarrior and Xcode. The Xcode projects are setup to build universal binary targets - for both Intel and PPC processors. Note that xtras built with Xcode will not work with Director MX 2004 since they are Mach-O format rather than CFM format. The Codewarrior projects are setup to build for Macintosh Classic or OS X. The skeleton projects contain source with comments that briefly describe modifications to make to create your Xtra. There are also a number of working example projects that demonstrate various coding features described in this documentation. One way to begin Xtra development is to start with a working example that implements many of the features you plan to provide, and modify it to include your code.

IMPORTANT: You may freely change source files in the example projects. However, take care in modifying any project settings. These projects provide a number of standard settings required to make Xtras work correctly.

For information about development environments, please see the readme file that comes with the XDK.

This release of the XDK includes a folder in the Examples folder called XDKXtras. It contains prebuilt version of the example xtras that are included in the kit.

Xtra Syntax

The examples include a variety of different coding styles to implement Xtras:

Creating GUIDs

To create globally unique identifiers (GUIDs) for the classes you define in a Windows Xtra, you need to use the application GenUID.EXE, which is provided with the Microsoft Visual C++ development environment. For the Macintosh Classic, use the GenGuid.app file which is found in the Utility folder. For Macintosh OSX, just use the uuidgen command in the terminal window. Copy the GUID created by the utility into the class header file. You need to create a new GUID for each class in a project. (After copying, be sure to correctly redefine the class that existed in the same line the GUID line is on.)


Description of Examples


Filter Interrogate Script Sprite Tool Transition