int aw_avatar_click (int session_id) |
|
aw_avatar_click triggers an avatar-click event. Callback None (returns immediately) Notes This method requires at least SDK build 14 and world server build 21. aw_avatar_click triggers the event AW_EVENT_AVATAR_CLICK in all nearby SDK applications that have subscribed to the event. It is intended for use by the Active Worlds Browser to indicate when a user left-clicks on an avatar with the mouse, however it is also available for use by SDK applications which may wish to simulate user mouse actions for the purposes of testing, etc. Set the argument session_id to indicate the avatar being clicked on. Example
void handle_chat (void)
{
int rc;
/* simulate an avatar click in response to a spoken request */
if (!strcmp (aw_string (AW_CHAT_MESSAGE), "click me"))
if (rc = aw_avatar_click (aw_int (AW_CHAT_SESSION)))
printf ("Avatar click failed (reason %d)\n", rc);
}
aw_event_set (AW_EVENT_CHAT, handle_chat);
SEE ALSO |