Flash CS3 Professional.
document.id
Read-only property; a unique integer (assigned automatically) that identifies a document during a Flash session. Use this property in conjunction with fl.findDocumentDOM() to specify a particular document for an action.
The following example displays the document ID for the current document:
fl.trace("Current doc's internal ID is: " + fl.getDocumentDOM().id);