## AppTriggeredEvent Class

    public class AppTriggeredEvent extends DXMEvent {
         // Methods
         public void trigger();
         public void trigger(Behavior eventData);
    }

Creates the event. The event can be used in the until and untilNotify methods to create reactive behaviors based on external events.

In the following example, a cube turns from red to blue, based upon some external application event:

    //Turn a cube from red to blue when an external event occurs
    //The following code is a fragment from a larger program
    //Get the cube
    GeometryBvr cube = importGeometry(buildURL(geobase, "cube.wrl");
    //Create the external event
    AppTriggeredEvent appEvent = new AppTriggeredEvent();
    //Set up the color of the cube -- red until the event, then blue
    ColorBvr col = (ColorBvr)until(red, appEvent, blue);
    //Map the color to all points of the cube
    GeometryBvr coloredCube = cube.diffuseColor(col);

    //...elsewhere, when the application receives the event...
    appEvent.trigger();

    //...now coloredCube (assuming it's running) will turn blue

### AppTriggeredEvent Methods

trigger()
trigger(eventData)

####

trigger

AppTriggeredEvent Class

Triggers the event.

public void trigger( );

##### Remarks

The triggered event occurs as soon as possible.

####

trigger

AppTriggeredEvent Class

Triggers the event and passes the given data to the event handler or notifier.

public void trigger(
Behavior eventData
);

##### Parameters

eventData
  An object that contains any data representing the event.

##### Remarks

The triggered event occurs as soon as possible.

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