DISCLAIMER: Please understand that this document is incomplete and may contain errors. The file was originally created as internal engineering reference material and has since grown into a useful document for all. Sometime during the Spring or Summer of 2004 we hope to complete this document (or rather complete a set of object model documentation), remove any erroneous material and then post everything to the macromedia.com website, most likely in the Developer's or Support Centers, maybe both. If you find any missing or incorrect properties and methods within the objects listed in this document then please feel free to contact me (Tom Higgins, don't forget to remove the nospam_) directly so I can make the appropriate changes. Please do NOT write me indicating objects that are not listed in this document (I'm aware of them and working on entering them), please do NOT write me asking when it will all be complete (it'll be done as soon as I can get to it! :) ). The only time to write me in reference to this document is when an object is listed and is missing information or has incorrect information shown. Sorry to be stern about that but I don't want any excess email traffic, thanks. Keep an eye on the revision history as I'll make sure to outline any and all updates that are made over time. Tom Higgins - Product Specialist, Director Team |
| Director Object Model (DOM) |
Top Level Properties
Top Level
Functions
Player
Object
Movie Object
Cast
Object
Member
Object
Sprite
Object
Sprite Channel Object
Window Object
Sound Object
Sound Channel Object
. . . |
| Introduction |
This document describes the object model that will be exposed to both Lingo and ECMAScript code within Director, projectors and the Shockwave player. It is helpful to think of ECMAScript within Director as sitting on top of the pre-existing animation engine and Lingo language, and as such it inherits the object and event models from Director. The discussion begins with a high-level view of the object model structure followed by some top level property definitions and then the core object definitions. At the end of this document is a section for discussing open issues and a revision history. This document covers the core functions, properties and objects built within the player engine. As such, this document does not discuss the top-level properties and methods nor the cast member or sprite properties and methods introduced by specific media types that are supported in Director. Throughout this document you will see table entries colored orange, these entries are deprecated Lingo that will no longer be documented nor actively supported. Support for these commands will remain in the player engine so as not to break pre-existing content, but these commands or properties will not be updated going forward so as to include new functionality. We recommend that developers begin migrating to the new syntax elements sooner as opposed to later. Here are a few helpful references regarding our implementation of ECMAScript support in Director MX 2004:
|
| The Big Picture |
![]() |
| Top Level Properties |
| Property | Description | Comments | ||||
_global |
: |
refers to the Global object used to store/access global variables | new to MX2004 | |||
_key
|
:
|
refers to the Key object used to access keyboard functionality | new to MX2004 | |||
_menuBar
|
:
|
refers to the MenuBar object installed by the player's installMenu() method | new to MX2004 | |||
_mouse
|
:
|
refers to the Mouse object used to access mouse functionality | new to MX2004 | |||
_movie
|
:
|
refers to the currently active Movie object | new to MX2004 | |||
_player
|
:
|
refers to the Director Player object | new to MX2004 | |||
_sound
|
:
|
refers to the Sound object used to access sound functionality | new to MX2004 | |||
_system
|
:
|
refers to the System object | new to MX2004 |
| Top Level Functions |
| Function | ECMAScript Syntax | Lingo Syntax | Comments | |||||
| castLib() | castLib(stringCastLibName) | castLib(stringCastName) | ||||||
| castLib(integerCastLibNum) | castLib(integerCastNum) | |||||||
| castLib stringCastName | ||||||||
| castLib integerCastNum | ||||||||
| channel() | channel(channelNumber) | channel(channelNumber) | new to MX2004 | |||||
| channel(channelName) | channel(channelName) | |||||||
| color() | color(integerPaletteIndex) | color(integerPaletteIndex) | new to MX2004 | |||||
| color(integerRed,integerGreen,integerBlue) | color(integerRed,integerGreen,integerBlue) | |||||||
| date() | date(stringFormat) | |||||||
| date(integerFormat) | ||||||||
| date(intYearFormat,intMonthFormat,intDayFormat) | ||||||||
| image() | image(intWidth,intHeight,intBitDepth) | image(intWidth,intHeight,intBitDepth) | ||||||
| list() | list() | list() | ||||||
| [] | ||||||||
| list(value,value,value,...) | list(value,value,value,...) | |||||||
| [value,value,value,...] | ||||||||
| member() | member(memNameNum{,castNameNum}) | member(memNameNum {,castNameNum}) | ||||||
| member memNameNum | ||||||||
| member nameNum of castLib nameNum | ||||||||
| propList() | propList() | propList() | ||||||
| [:] | ||||||||
| propList(string,value,string,value,...) | propList(string,value,string,value,...) | |||||||
| propList(symbol,value,symbol,value,...) | ||||||||
| [#symbol:value,#symbol:value,...] | ||||||||
| put() | put(value) | put(value) | ||||||
| put value | ||||||||
| point() | point(integerH,integerV) | point(integerH,integerV) | ||||||
| random() | random(integerA {,integerB}) | random(integerA {,integerB}) | ||||||
| randomVector() | randomVector() | randomVector() | ||||||
| rect() | rect(intLeft,intTop,intRight,intBottom) | rect(intLeft,intTop,intRight,intBottom) | ||||||
| script() | script(memNameNum {,castNameNum}) | script(memNameNum {,castNameNum}) | ||||||
| showLocals() | - not available : Lingo only - | showLocals() | ||||||
| sound() | sound(intSoundChannel) | sound(intSoundChannel) | ||||||
| soundBusy() | soundBusy(intSoundChannel) | soundBusy(intSoundChannel) | ||||||
| sprite() | sprite(channelNameNum) | sprite(channelNameNum) | ||||||
| sprite(stringChannelName) | sprite(stringChannelName) | |||||||
| sprite intChannelNum | ||||||||
| symbol() | symbol(stringValue) | symbol(stringValue) | ||||||
| timeout() | timeout(timeoutObjName) | timeout(timeoutObjName) | ||||||
| trace() | trace(displayString) | trace(displayString) | new to MX2004 | |||||
| vector() | vector() | vector() | ||||||
| vector(intX,intY,intZ) | vector(intX,intY,intZ) | |||||||
| window() | window(stringWindowName) | window(stringWindowName) | ||||||
| xtra() | xtra(integerXtraNum) | xtra(integerXtraNum) | ||||||
| xtra(stringXtraName) | xtra(stringXtraName) | |||||||
| paletteIndex(integer) | replaced by color() above | |||||||
| rgb(intRed,intGreen,intBlue) | replaced by color() above | |||||||
| tell | direct access now available | |||||||
| xtra integerXtraNum | use _player.scriptingXtraList[] |
| Cast Object |
properties
indexed properties
methods
Related Objects:
Director Player Object
Movie Object
Window Object
Sprite Object
Sprite Channel Object
Member Object
| Global Object |
| Key Object |
| Member Object |
Related
Objects:
Director Player Object
Movie Object
Window Object
Cast Object
Sprite Object
Sprite Channel Object
| Mouse Object |