## DAStatic Functions Relevant to DABehavior Objects

###

Cond

DAStatics Class

Creates a new behavior from the DABoolean and two other behaviors. The value of the new behavior, at any point in time, is one of those two behaviors. Which of the behaviors chosen depends on the value of the DABoolean.

lib.Cond(
bool,
a,
b
)

##### Parameters

bool
  The DABoolean object that determines which of the two behaviors will become the value of the new behavior.
a
  The first of the two possible values the new behavior can assume.
b
  The second of the two possible values the new behavior can assume.

##### Return Values

Returns the DABehavior object.

###

ModifiableBehavior

DAStatics Class

Returns an object whose animated behavior can be replaced, at run time, with another animated behavior. This is useful when the states of an animation model cannot be predicted at development time, as well as for integrating animation models with other events and functions.

lib.ModifiableBehavior(
initialBehavior
)

##### Parameters

initialBehavior
  The behavior that will later be replaced.

##### Return Values

Returns the DABehavior object.

##### See Also

SwitchTo(newBehavior)

###

Sequence

DAStatics Class

Creates a new behavior that is the sum of the two DABehavior parameters. In other words, the two behaviors are concatenated, according to their order in the parameter list. Once the duration is over, the behavior becomes a snapshot of the second behavior. An exception is when the first behavior is of infinite duration. In this case, the returned behavior is always the infinite behavior, no matter what the second behavior is.

lib.Sequence(
a,
b
)

##### Parameters

a
  The first behavior in the sequence.
b
  The second behavior in the sequence.

##### Return Values

Returns the DABehavior object.

##### Remarks

Notice that, in contrast to Compose2 and Compose3, which first apply the right-hand argument and then the left, Sequence first applies the left-hand argument and then the right.

###

Until

DAStatics Class

Creates a behavior that changes when a given event occurs. Up to and including the time the event occurs, the behavior is the same as a. After the event e occurs, the behavior changes to be the same as b. Because Until takes behaviors and returns a behavior, it can be nested.

lib.Until(
a,
e,
b
)

##### Parameters

a
  The DABehavior object that the behavior represents initially.
e
  A DAEvent object specifying the event.
b
  The DABehavior object that the behavior represents after the event.

##### Return Values

Returns the DABehavior object.

###

UntilEx

DAStatics Class

Creates a DABehavior that changes upon a given event. Initially, the behavior is the same as a. When event e occurs, the behavior changes to the behavior returned by the event. This means that only DAEvents that return a DABehavior can be used. These events can be constructed with AttachData, Notify, and Snapshot.

lib.UntilEx(
a,
e
)

##### Parameters

a
  The DABehavior object that the behavior represents initially.
e
  The DAEvent object that triggers the switch and returns the new behavior.

##### Return Values

Returns the DABehavior object caused by the event e.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.