Database Xtras

While there are a few different methods you could use to implement a database, including using text files, you'll be using an Xtra for this project. One reason to use an Xtra is speed. Xtras are written in C++ and execute much faster than the equivalent Lingo code. Another reason is that it saves you from reinventing the wheel. All the work of programming the database engine has already been done and packaged into the Xtra.

It's up to you to interact with the Xtra through the Xtra's Application Programming Interface (API). The API is simply the set of methods and properties that the Xtra makes available to you, the developer. The API will normally be detailed in the Xtra's documentation.

There are actually quite a few different database Xtras available for Director, and all of them are up to the task of this project. However, I had one criteria that eliminated a few of the contenders right away: the Xtra must provide SQL support.

SQL stands for Structured Query Language and is pronounced as "S-Q-L" or as "Sequel." You may have heard the term Sequel Server tossed about in some IT departments, without knowing exactly what they were referring to. Well, now you know they were referring to the company database.

Because you already used the Mpeg Advance Xtra from Tabuleiro, you'll be using the Arca Database Xtra available from them as well. Arca is fast, easy to work with, and provides SQL support in the form of SQLite. SQLite is an open-source database engine that is very fast, stable, and used by a wide variety of applications. For more info on SQLite visit .

For a complete list of database and other Xtras available for Director, visit the Director Exchange, available from the Director Developer Center at:

One great thing about using a standard such as SQL is that once you're familiar with it you can more easily work with other Xtras that support it, as well as use database packages that also use SQL, including Microsoft Access, Oracle, and MySQL.

Before continuing with this lesson, you should quit Director and install the Arca Database Xtra now.


From the Lesson07\Xtras folder on the CD-ROM run the appropriate installer for your platform, and follow the instructions to install the Xtra.

Once the Xtra has been installed you can restart Director and make sure the Xtra is available. Note that the Arca version supplied on the CD is a demo version only, and can't be used for commercial purposes. It is, however, fully functional in Authoring, and will work in a projector, which is perfect for what we need it forlearning.


Start Director and open mytrainer from the list of Recent Items on the Start page. Next, open the Message window and select the Scripting Xtra button at the top of the window as shown. If Arca has been installed properly you will see an entry for it in the list and be able to see the available methods.

If you choose the put interface option, a list of the methods, along with a brief description of each will be output to the Message window.

Now that you're certain the Xtra is installed properly, let's get started using it within the training log application.

Macromedia Director MX 2004. Training from the Source
Macromedia Director MX 2004: Training from the Source
ISBN: 0321223659
EAN: 2147483647
Year: 2003
Pages: 166
Authors: Dave Mennenoh

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: