int aw_url_click (const char* url) |
|
aw_url_click triggers a url-click event. Callback None (returns immediately) Notes This method requires at least SDK build 37 and world server build 63. aw_url_click triggers the event AW_EVENT_URL_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 clicks on a special url in their web view, however it is also available for use by SDK applications which may wish to simulate url click actions for the purposes of testing, etc. The browser only reports data after URL's prefixed with "aworld:?". Example: aworld:?test will trigger an event with AW_URL_NAME set to "test". Also, aworld:?close is trapped by the browser and is used to close the aw_3d web view without prompting. Example /* Simulate url click */
void handle_url_click (void)
{
printf ("User %s (session #%d) clicked %s\n",
aw_string (AW_AVATAR_NAME),
aw_int (AW_AVATAR_SESSION),
aw_string (AW_URL_NAME));
}
aw_event_set (AW_EVENT_URL_CLICK, handle_url_click);
aw_url_click ("foo=bar&text=Hello%20World");
SEE ALSO |