DAStatic Functions Relevant to DAEvent Objects



AndEvent

Creates an event that occurs only when the two given events happen simultaneously. The event time for the new event is when both of the given events occur.

lib.AndEvent(
  first,
  second
  )

Parameters
first and second
The DAEvent objects.
Return Values

Returns a DAEvent object. When the event occurs, it produces a DAPair. The first member is the event data returned by the first event. The second member is the event data returned by the second event.


KeyDown

Returns a DAEvent when a specific key is pressed. This is a state-transition event.

lib.KeyDown(
  keyCode
  )

Parameters
keyCode
This is a number (a long). Consult a Visual Basic reference for information about key codes.
Return Values

Returns the DAEvent object. This event produces no data.


KeyUp

Returns a DAEvent when a specific key is released. This is a state-transition event.

lib.KeyUp(
  keyCode
  )

Parameters
keyCode
This is a number (a long). Consult a Visual Basic reference for information about key codes.
Return Values

Returns the DAEvent object. This event produces no data.


NotEvent

Creates an event that occurs when the given event does not occur. This is useful for creating combined events that occur only if the given event is not also occurring. For example, an event that occurs when the left mouse button is down and the right button is not down.

lib.NotEvent(
  ev
  )

Parameters
ev
The DAEvent object.
Return Values

Returns the DAEvent object. This event produces no data.


OrEvent

Creates an event that occurs when either one of the given events occur. The event time for the new event is when either the first or second given event has occurred.

lib.OrEvent(
  first,
  second
  )

Parameters
first and second
The DAEvent objects.
Return Values

Returns a DAEvent object. Its data is the event data of either the first or second event.


Predicate

Creates an event that occurs when the value of the given Boolean behavior changes from false to true. Note that, because of implementation dependencies and the potential for aliasing, the system cannot always detect when a Boolean behavior becomes true.

lib.Predicate(
  bool
  )

Parameters
bool
The DABoolean object.
Return Values

Returns the DAEvent. This event produces no data.


ThenEvent

Creates an event if e2 occurs after e1. The event time of the new event is the time of the second event.

lib.ThenEvent(
  e1,
  e2
  )

Parameters
e1
The first event, that, when it occurs, triggers the second event.
e2
The second event, caused by the occurrence of the first event.
Return Values

Returns the DAEvent object. Its event data is the time the second event fired and a DAPair containing the event data for both events.


TimerAnim

Creates an event that occurs when the specified time has elapsed.

lib.TimerAnim(
  timeout
  )

Parameters
timeout
The DANumber object that controls when the timer fires. This must be an animated number
Return Values

Returns the DAEvent object. This event produces no data.


Timer

The same as TimerAnim except that timeout is a non-animated number (a double).

lib.Timer(
  timeout
  )

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