Arguments: |
|
---|
Executes the given JavaScript in the UI. To maintain modularity of the UI from the server, this should only be used for debugging.
Arguments: |
|
---|---|
Returns: | The value of the global variable. |
Gets the global data variable with the given key (name).
Arguments: |
|
---|
For each user X, calls the given function passing X’s user data as the parameter.
//This example finds the high score for a game by iterating over each user's score.
var highscore = -1;
var highscore_user = "";
fl.iterateUserData(function(user) {
if (user['score'] > highscore) {
highscore = user['score'];
highscore_user = user['viewer']['id'];
}
});
system.print(highscore_user+" has the highest score of "+highscore+" points!\n");
Arguments: |
|
---|
Sets the callback to be invoked when a button on the UI is pressed (the button’s callback must be set to notifyController). The callback takes as parameters the text on the button and the button’s scripter-defined metadata.
Arguments: |
|
---|
Sets the callback to be invoked when the UI for the given presence is served to an avatar. The callback takes as a parameter the ID of the avatar who requested the UI.
Arguments: |
|
---|
Sets the callback to be invoked after the UI for the given presence saves a user’s data to the server. The callback takes no parameters.
Arguments: |
|
---|
Sets the callback to be invoked just before the UI for the given presence saves a user’s data to the server. The callback takes as a parameter the new user data. If the callback returns false, the changes to user data will be rejected.
Arguments: |
|
---|
Sets the UI script for the given presence (defaults to system.self). The UI script is a string of JavaScript code that will be executed in a dialog window when a user right-clicks on the given presence.
Arguments: |
|
---|
Sends the given message to all avatars currently viewing any of the UIs defined for presences on this entity.
Arguments: |
|
---|
Sets the global data variable with the given key (name) to the given value.
Arguments: |
|
---|---|
Returns: | The value of the user variable. |
Gets the value of the user data variable with the given key (name), for the given user.