Creates a DAEvent object that represents an event. Events identify specific times, states or user actions and are used to specify when given actions should occur. Typically, you use events with the Until and UntilEx functions (in the DAStatics class) to create behaviors that change as a result of the event. For example, you can change the color of an object when the user presses a mouse button by using the LeftButtonDown property and the UntilEx function. Every event, when it occurs, returns some event data. This data may or may not be meaningful, depending on the event. For example, LeftButtonDown does not return any meaningful data.
You can combine existing events to create new, more complex events. For example, the AndEvent function in DAStatics lets you combine two events so that the resulting event occurs only if both of the original events occurred simultaneously. The data produced by an event can only be examined within the notifier.
Takes a DABehavior object and produces a new event. The new event occurs at the same time as the original event, but its data is now the data that was specified in the call to AttachData. This allows an application to associate arbitrary client data with an event and know that it will be delivered to the notifier when the event occurs.
eventObj.AttachData(
data
)
Returns a DAEvent object. The event data is the event data of the new event.
Creates a new event. This occurs when the original event occurs. It then calls the notifier and uses the result as its event data.
eventObj.Notify(
notifier
)
Returns the DAEvent object. The event data is the time the event fired and the new behavior.
Invokes VBScript or JScript functions from within animations.
eventObj.ScriptCallback(
function,
language
)
Returns a DAEvent object. When this event occurs, the data it produces has a trivial value.
When called on an instance of a behavior, samples the given behavior and returns it as a constant behavior with the value as data. The event time of the new event is when the original event occurs.
eventObj.Snapshot(
a
)
Returns the DAEvent object. The event data is the value of the behavior at the time it was sampled, returned as a constant behavior.
The following functions are defined in the DAStatics class and are most relevant to objects of type DAEvent.
The following properties are defined in the DAStatics class and are most relevant to objects of type DAEvent.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.