MM Developer's Guide
MM Interfaces | MM Methods
| MM Types and Misc API
IMoaMmSpriteCallback
Interface ID: IID_IMoaMmSpriteCallback
Pointer type: PIMoaMmSpriteCallback
Inheritance: IMoaUnknown
Header file: mmiservc.h
Description
-
This interface is the callback interface for multimedia sprites.
It is supplied to a sprite by calling the IMoaMmXSprite::SetCallback()
method after the sprite has been instantiated. All multimedia
host applications support the multimedia sprite callback.
Director also supports application-specific sprite callbacks through the IMoaDrSpriteCallback interface. This interface is provided by the same object that provides the IMoaMmSpriteCallback interface. Call QueryInterface() on this interface using the interface identifier IID_IMoaDrSpriteCallback to get the Director-specific sprite callback.
Methods
-
-
Change notification
-
- InvalSpriteRect()
InvalSpriteCaps()
Asset interaction
-
- NotifyAsset()
Syntax
- InvalSpriteCaps(PIMoaMmSpriteCallbackThis)
Parameters
-
-
This
- Pointer to the
IMoaMmSpriteCallback
interface
Returns
-
MoaError
Description
-
- Invalidates the sprite's capabilities. Normally, a sprite's
GetCaps() method is
called just after the instance is created. However, you might
want to change the capabilities for the sprite in mid-span without
destroying the instance and recreating it. Call this method to
invalidate the sprite's capabilities. The next time the animation
loop runs, the host application calls the GetCaps()
method to get the new capabilities. For example, use this when
switching direct and offscreen image modes on-the-fly. You can
also use this to change your event mask, for example, to turn
on or off keyboard/focus events.
Syntax
- InvalSpriteRect(PIMoaMmSpriteCallbackThis)
Parameters
-
-
This
- Pointer to the
IMoaMmSpriteCallback
interface
Returns
-
MoaError
Description
-
- Invalidates the sprite rectangle on the display window (stage).
At authoring time, this method may be called wehn the movie isn't
playing and the sprite needs to be updated. Static sprites may
call this method at any time if they need to have their image
updated. The effect of this method is to cause the host application
to call an asset's CollectChanges()
and Image() methods,
which will also be called on any sprites intersecting the sprite's
rectangle.
Syntax
- NotifyAsset(PIMoaMmSpriteCallbackThis,
- MoaLongmsgCode,
PMoaVoidrefCon)
Parameters
-
-
This
- Pointer to the
IMoaMmSpriteCallback
interface
msgCode
- MoaLong
refCon
- PMoaVoid
Returns
-
MoaError
Description
-
Sends an arbitrary message to the parent asset. This calls the
asset's Notify() method
with the msgCode and
refCon you
supply. You can make up your own message code constants. refCon
is used to supply any additional data.
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.
Copyright © 1995-2007 Adobe Macromedia Software LLC, Inc.