|
Layout Information Format
Following is the format description of the layout information as exported from Director Scores. To help illustrate, examine the actual output from the Sample Score that is included with the Xtra.
You may wish to download the Sample Score to better understand its output:
Layout description:
- The first entry is always the word: Begin
- The second entry is the full path name of the score being exported: ScoreName = '<name>'
- Next will be any custom text cast member entries you specified for export. When you create a text castmember and give it the name of "Info", the text it contains will be added to the Layout Information. You can export none to any number of these text cast members.
These are in the format of the word 'Info' followed by the castmember number of the text castmember, an equal sign, followed by the text of the castmember in quotes: Info 4 = "This is some text"
- Next, as many entries as there are defined frames in the score, in the format of: the word 'Frame' followed by an equal sign and then the frame number: 'Frame = 4'.
If the frame is empty, that is all the entry will contain.
If the frame contains a label, this is added: the word 'Label', followed by an equal sign, followed by the text of the label in quotes: 'Label = 'Opening sequence''
If a bitmap castmember is to be exported has a color associated with it (that is not orange), then the following is added: the word 'color', followed by an equal sign, followed by the number of the color. The colors range from 0 to 5.
If the frame contains a bitmap castmember (that is not colorized orange), this is added: the word 'member', followed by an equal sign, followed by the castmember number, the word 'at', then the rectangular render information, then the channel in which the cast member has been placed. There will be as many 'member' entries as there are bitmap castmembers in the frame eligible for exportation.
- Following the frame entries is the full path name to the folder that contains the exported cast member image files, in this form: the word 'PathToExportedCastMembers', followed by an equal sign, followed by the full path to the directory/folder in qoutes. For example: PathToExportedCastMembers = 'C:\Documents and Settings\Testing\Exported Cast\'
- Finally, the last entry is the word: End
SpriTec Xtra Set Up
To set up a Director Score for Single-Click exportation of its bitmap cast members and layout information:
- Create a folder in the same place as the Score (within the same parent folder). Name this folder "Exported Cast". The name must be exact.
- Add the supplied lingo script to the Score (using the Import feature of Director).
Once set up, exportation is easy. Simply hold down the Alt Key (Command key on the Macintosh) and Play the Score. You can select Play from the Control menu or press the Play button in the Controls palette.
Manual Control
To manually control the Xtra from your own lingo script, use its BitmapToPICT method:
|
|
set result to BitmapToPICT(xtra "SpriTecXtra", memberNumber, fullPathName)
|
BitmapToPICT exports a single bitmap cast member to a .bmp or PICT file. It takes three parameters and returns the result of the exportation operation.
- The first parameter should always be: xtra "SpriTecXtra"
- The second parameter is the cast member number of the cast member you wish to export.
- The third parameter is the full path name of the exporting file, including the hard disk name, any intermediate folder names and the name of the image file itself.
You may wish to use Director's pathName variable to help contstruct the full path name. For example, our lingo script constructs the thrid parameter as such:
|
|
the pathName & "Exported Cast:" & name
|
The result returned from BitmapToPICT will be zero upon successfully exporting the cast member or a non-zero error code if the operation fails.
|