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


IMoaMmAssetCallback2


Interface ID: IID_IMoaMmAssetCallback2
Pointer type: PIMoaMmAssetCallback2
Inheritance: IMoaMmAssetCallback
Header file: mmiservc.h

Description

Callback interface for asset Xtras, supplied to an asset when the host application calls the IMoaMmXAsset::SetCallback() method, soon after the asset has been instantiated. This interface supercedes the IMoaMmAssetCallback interface from which it inherits.

Director supplies the IMoaDrAssetCallback interface to support application-specific callback through the object providing the IMoaDrAssetCallback2 interface. Call QueryInterface() on this interface, using the interface identifier IID_IMoaDrAssetCallback to get this asset callback.

Methods

Change notification

GetModified()
SetModified()
InvalDefaultRectValue()

Actor notification

NotifySprites()

Media management

ForceMediaLoad()
ForceMediaUnload()

ForceMediaLoad()

Syntax

ForceMediaLoad(PIMoaMmAssetCallback2 This)

Parameters

This
Pointer to the IMoaMmAssetCallback2 interface

Returns

MoaError

ForceMediaUnload()

Syntax

ForceMediaUnload(PIMoaMmAssetCallback2 This)

Parameters

This
Pointer to the IMoaMmAssetCallback2 interface

Returns

MoaError

GetModified()

Syntax

GetModified(PIMoaMmAssetCallback2 This,
PMoaMmModifyFlags pModifyFlags) )

Parameters

This
Pointer to the IMoaMmAssetCallback2 interface

pModifyFlags)
PMoaMmModifyFlags

Returns

MoaError

Description

Gets the modifyFlags value for the asset, which lets you see if the asset has been marked as dirty or not. See the description of MoaMmModifyFlags later in this chapter for details on specific entries in the flag.

InvalDefaultRectValue()

Syntax

InvalDefaultRectValue(PIMoaMmAssetCallback2 This)

Parameters

This
Pointer to the IMoaMmAssetCallback2 interface

Returns

MoaError

Description

To change your asset's default rectangle, you must notify the host application using this asset callback method. After calling this method, the host application calls your GetDefaultRect() method again to get the updated rectangle the next time the default rectangle is needed.

NotifySprites()

Syntax

NotifySprites(PIMoaMmAssetCallback2 This,
MoaLong msgCode,
PMoaVoid refCon )

Parameters

This
Pointer to the IMoaMmAssetCallback2 interface

msgCode
MoaLong

refCon
PMoaVoid

Returns

MoaError

Description


Sends an arbitrary message to all currently instantiated sprite actors. You can make up your own message code constants; refCon is used to supply any additional data. This will result with each of your SpriteActor's Notify() methods being called with the msgCode and refCon you supply.

Note: Xtra developers may specify values in the range of 0 to 65535 for their notification codes. Higher values are reserved by Macromedia for future use.


SetModified()

Syntax

SetModified(PIMoaMmAssetCallback2 This,
MoaMmModifyFlags modifyFlags )

Parameters

This
Pointer to the IMoaMmAssetCallback2 interface

modifyFlags
MoaMmModifyFlags

Returns

MoaError

Description

Sets the modifyFlags for the asset. For example, if SetProp() is called and you successfully change a property that you want saved to disk, call this method to notify the application that your properties need to be written out at save time.

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