Media | Label Description |
---|---|
Composite | Cast member media data in a portable (byte-swapped) opaque handle. |
Image | Primary image data (for a bitmap, PICT, and so on). |
Text | Text character string |
TextStyles | Text style run data |
Sound | Sound samples |
Palette | Palette entries |
Score | Score data for a movie or film loop |
Media Format | Description |
---|---|
moaHandle | Generic MoaHandle of data |
moaTEStyles | textStyles stored in a MoaHandle |
macTEStyles | textStyles in TextEdit StScrpHandle format stored in a Macintosh handle |
macPICT | Macintosh PicHandle. Note that 32bit images have alpha channel data. |
macSnd | Macintosh sndHdl. Handle in Macintosh sound resource format. |
macColorTable | Macintosh CTabHandle. Handle to a ColorTable record |
winDIB | Windows packed DIB GlobalHandle with bitmap information, color table, and bits. Note that 32bit images have alpha channel data. |
winWAVE | Windows RIFF WAVE GlobalHandle. RIFF sound format. |
winPALETTE | Windows HPALETTE GlobalHandle. RIFF palette format |
All media types support the composite label; that is, you can get the media data for any cast member as a single, opaque portable MoaHandle. Because Director handles the byteswapping of these, they're safe to write out to disk and read back in on another platform. The format for composite media is always MoaHandle.
Other mediaIn addition to composite, each built-in cast member type supports one or more other labels or formats. For example, bitmaps, PICTs, Rich Text, and OLE support the image label (RichText and OLE are Get-only for this); the bitmap format supported depends on the platform (macPICT on mac, winDIB on Windows). In the future, we may add additional formats, such as a portable pixel map format which is identical on both platforms.
Text supports multiple labels: text to get or set the ASCII text, textStyles (Macintosh-only) to get or set the style data independently from the ASCII.
Both movies and cast members support the score media label, with the format MoaHandle. This lets you get and set the score data itself. You can attach a ScoreAccess interface to one of these data handles using IMoaDrUtils::NewScoreAccess(). However, if you want to edit the score of an existing movie or cast member, it's easier just to obtain the ScoreAccess interface directly from the object itself using IMoaDrCastMem::GetScoreAccess(),
Here's a complete list of the media labels and formats supported by the Director cast member types:
Cast member type | Media label | Media format |
---|---|---|
BITMAP | Composite Image |
moaHandle mac: macPICT win: winDIB |
FILMLOOP | Composite Score |
moaHandle moaHandle |
TEXTFIELD | Composite Text TextStyles |
moaHandle moaHandle (null-terminated string) mac: macTEStyles mac & win: moaTEStyles |
PALETTE | Composite Palette |
moaHandle mac: macColorTable win: winPALETTE |
PICT | Composite Image |
moaHandle mac: macPICT win: winDIB |
SOUND | Composite Sound |
moaHandle mac: macSnd win: winWAVE |
BUTTON | Composite Text TextStyles |
moaHandle moaHandle (null-terminated string handle) mac: macTEStyles mac & win: moaTEStyles |
SHAPE | Composite | moaHandle |
MOVIE | Composite | moaHandle |
DIGITAL VIDEO | Composite | moaHandle |
SCRIPT | Composite | moaHandle NOTE: Script text can be accessed using GetProp() and SetProp() |
RICH TEXT | Composite Text Image (Get Only) |
moaHandle moaHandle (null-terminated string handle). Set allowed only in authoring applications mac: macPICT win: winDIB |
OLE | Composite Image (Get Only) |
moaHandle mac: macPICT win: winDIB |
XTRA | Composite | moaHandle |
TRANS | Composite | moaHandle |
Sprite Xtras, which provide cast members through extensions to Director, only support the composite media label, which is a combination of the Xtra's media, properties, and built-in properties combined in an opaque format. You can get or set the media data of any Xtra-based cast member type as a composite MoaHandle.
kMoaErr_NoErr | Successful |
kMoaMmErr_FunctionNotFound | Function not supported |
kMoaMmErr_WrongNumberOfArgs | Argument count wrong, |
Other Property/CallHandler errors | Also acceptable here |
kMoaErr_NoErr | Property exists and value was returned |
kMoaErr_BadParam | Invalid pPropValue passed in |
kMoaMmErr_PropertyNotFound | Property isn't supported by this class |
kMoaMmErr_InternalError | Property exists but couldn't get due to internal error |
kMoaMmErr_NoMemForString | Couldn't allocate memory for string value data |
kMoaErr_OutOfMem | Couldn't allocate memory for other value data |
kMoaErr_NoErr | Property exists and value was set |
kMoaErr_BadParam | Invalid pPropValue passed in |
kMoaMmErr_PropertyNotFound | Property isn't supported by this class |
kMoaMmErr_InternalError | Property exists, value ok, can't set--internal error |
kMoaMmErr_NoMemForString | Can't allocate memory for setting string value data |
kMoaErr_OutOfMem | Can't allocate memory for setting other value data |
kMoaMmErr_IntegerExpected | Type mismatch: integer value expected |
kMoaMmErr_SymbolExpected | Type mismatch: symbol value expected |
kMoaMmErr_FloatExpected | Type mismatch: float value expected |
kMoaMmErr_StringExpected | Type mismatch: string value expected |
kMoaMmErr_PointExpected | Type mismatch: point value expected |
kMoaMmErr_RectExpected | Type mismatch: rect value expected |
kMoaMmErr_ValueTypeMismatch | Type mismatch: other value expected (non-specific) |
kMoaDrErr_CastMemberExpected | Type mismatch: CMRef value expected |