DR Developer's Guide
DR Interfaces | DR Methods | DR Types and Misc API

IMoaDrScoreAccess

Interface ID: IID_IMoaDrScoreAccess
Pointer type: PIMoaDrScoreAccess
Inheritance: IMoaDrMediaAccess
Header file: driservc.h
Description
IMoaDrScoreAccess inherits from IMoaDrMediaAccess. This interface provides specific methods for accessing and editing the contents of a Director movie's score. You can acquire a score interface by calling the IMoaDrMovie::GetScoreAccess() method. Film loop cast members also have scores, which can be acquired by IMoaDrCastMem::GetScoreAccess().

See the section entitled IMoaDrMediaAccess for information regarding the inherited IMoaDrMediaAccess-specific methods of this interface. This file now uses C++ style syntax.

Methods

Editing support
New()
Refresh()
Commit()
BeginUpdate()
EndUpdate()
Media access
GetAccessInfo()
SetAccessInfo()
SetOwner()
Frame access
SetCurFrameIndex()
GetCurFrameIndex()
GetLastFrameIndex()
GetFrame()
Frame editing
UpdateFrame()
InsertFrame()
DuplicateFrame()
ClearFrame()
DeleteFrame()
Channel access
GetSound()
GetSprite()

BeginUpdate()

Syntax
BeginUpdate()
Parameters
Returns
MoaError
Description
Begins a score editing session. Before inserting or deleting frames, or modifying score frames, sounds, or sprites, you must call BeginUpdate(). When done with your changes, call EndUpdate().

ClearFrame()

Syntax
ClearFrame()
Parameters
Returns
MoaError
Description
Clears all of the cells in the current frame to their default (empty) values.

Commit()

Syntax
Commit()
Parameters
Returns
MoaError
Description
Commits changes made to media back since the last BeginUpdate(), Commit(), or Refresh(). Call this method to apply changes to media back to the owner. Call this method after calling EndUpdate().

DeleteFrame()

Syntax
DeleteFrame()
Parameters
Returns
MoaError
Description
Deletes the current frame from the score.

DuplicateFrame()

Syntax
DuplicateFrame()
Parameters
Returns
MoaError
Description
Duplicates the current frame. The new frame is inserted at position <currentFrame + 1>. The current frame is incremented to the new frame (<currentFrame + 1>).

EndUpdate()

Syntax
EndUpdate()
Parameters
Returns
MoaError
Description
Finishes an update session initiated by a call to BeginUpdate(). If you wish to keep score changes, call Commit() after calling this method; to revert to previous score, simply call this method without committing the media.

GetAccessInfo()

Syntax
GetAccessInfo(PMoaDrAccessInfo pAccessInfo)
Parameters
pAccessInfo
Pointer to MoaDrAccessInfo structure to receive information
Returns
MoaError
Description
Obtains the current accessInfo for the score accessor. pAccessInfo is a pointer to a MoaDrAccessInfo structure to receive the information. This call populates the structure with the PIMoaDrMediaOwner for the media owner, the label symbol for the media being accessed, and the format symbol for the media being accessed. Since an interface is being supplied in this structure (pOwner), the caller is responsible for releasing it.

GetCurFrameIndex()

Syntax
GetCurFrameIndex(PMoaDrFrameIndex pFrameIndex)
Parameters
pFrameIndex
Returns
The current frame is returned. Note that this does not return a MoaError.
Description
Obtains the frame number of the current frame being accessed.

GetFrame()

Syntax
GetFrame(PIMoaDrScoreFrame * ppFrame)
Parameters
ppFrame
address to store the interface
Returns
MoaError
Description
Obtains the IMoaDrScoreFrame interface for the score data being accessed. This interface is used to get and set frame-level properties of the score data.

GetLastFrameIndex()

Syntax
GetLastFrameIndex(PMoaDrFrameIndex pFrameIndex)
Parameters
pFrameIndex
address to store the last frame
Returns
The last frame is returned. Note that this does not return a MoaError.
Description
Obtains the frame number of the last occupied frame in the score.

GetSound()

Syntax
GetSound(MoaDrSoundChanIndex chanIndex, PIMoaDrScoreSound * ppSound)
Parameters
chanIndex
Specifies the sound channel to access
ppSound
address to store the interface
Returns
MoaError
Description
Obtains the IMoaDrScoreSound interface for a certain sound channel of the score data being accessed. chanIndex specifies the sound channel to access; in Director 5.0, this must be either 1 or 2. This interface is used to get and set sound channel-level properties of the score data.

GetSprite()

Syntax
GetSprite(MoaDrSpriteChanIndex chanIndex, PIMoaDrScoreSprite * ppSprite)
Parameters
chanIndex
Specifies the sprite channel to access
ppSprite
address to store the interface
Returns
MoaError
Description
Obtains the IMoaDrScoreSprite interface for a certain sprite channel of the score data being accessed. chanIndex specifies the sprite channel to access; in Director 5.0, this must be in the range 1 to 48. This interface is used to get and set sprite channel-level properties of the score data.

InsertFrame()

Syntax
InsertFrame()
Parameters
Returns
MoaError
Description
Inserts a frame at the current frame position. This has the same effect as DuplicateFrame().

New()

Syntax
New()
Parameters
Returns
MoaError
Description
See IMoaDrMediaAccess

Refresh()

Syntax
Refresh()
Parameters
Returns
MoaError
Description
See IMoaDrMediaAccess

SetAccessInfo()

Syntax
SetAccessInfo(ConstPMoaDrAccessInfo pAccessInfo)
Parameters
pAccessInfo
Pointer to MoaDrAccessInfo structure to receive information
Returns
MoaError
Description
Sets the current accessInfo for the score accessor. pAccessInfo is a pointer to a MoaDrAccessInfo structure providing the information. This call populates the structure with the PIMoaDrMediaOwner for the media owner, the label symbol for the media being accessed, and the format symbol for the media being accessed. Since the caller supplies an interface in this structure (pOwner), the caller is responsible for releasing it.

SetCurFrameIndex()

Syntax
SetCurFrameIndex(MoaDrFrameIndex frameIndex)
Parameters
frameIndex
Frame number of the new current frame
Returns
MoaError
Description
Sets the current frame being accessed. frameIndex is the frame number of the new current frame.

SetOwner()

Syntax
SetOwner(PIMoaDrMediaOwner pOwner)
Parameters
pOwner
Returns
MoaError
Description
Convenience method to set the access information for the ScoreAccess object. Calling this method results in the same behavior as calling SetAccessInfo() with score and MoaHandle as the label and format symbols, respectively.

UpdateFrame()

Syntax
UpdateFrame()
Parameters
Returns
MoaError
Description
Updates the current frame. This method has two effects, it

Copyright © 1995-2008 Adobe Macromedia Software LLC, Inc.