Script Global
From Virtual World Web Wiki
Revision as of 17:47, 24 March 2017 by Spark5 (Talk | contribs) (Documentation for the Script Global class)
- This is a JavaScript global object named Script
Remarks [edit]
Properties
- JSDOMObject Controller {get;}
- Gets the DOM node representing your avatar's controller.
- bool MouseWheelHandled {get; set;}
- string Name {get;}
- Returns the name of this script package
- JSDOMObject Parent {get;}
- If this script originates from a DOMObject, returns that DOMObject
Events
- OnDeselect()
- Event fired when user deselects a DOMRenderable this script is tied to
- OnDoubleClick()
- Event fired when user double-clicks on DOMObject this script is tied to
- OnLeftClick()
- Event fired when user left-clicks on DOMObject this script is tied to
- OnLocalScriptEvent()
- Event fired when this script receives a LocalScriptEvent from another script
- OnMouseLeave()
- Event fired when user stops mousing over DOMObject this script is tied to
- OnMouseOver()
- Event fired when user mouses over DOMObject this is tied script to
- OnRightClick()
- Event fired when user right-clicks on DOMObject this script is tied to
- OnSelect()
- Event fired when user selects a DOMRenderable this script is tied to
- OnVolumeEnter()
- Event fired when user enters a DOMVolume this script is tied to
- OnVolumeLeave()
- Event fired when user leaves a DOMVolume this script is tied to
Methods
- void Broadcast(string message, JSObject jsObject = NULL)
- Triggers an OnLocalScriptEvent event across all client scripts with the given data
- void CopyStringToClipboard(string value)
- Sets a given string as your clipboard data for later pasting
- void Exit(string message = "")
- Ends this script entirely and optionally sends a message back to the server
- ReturnType GetController()
- float? GetFloat(string key)
- Gets a floating point value previously stored in the client data store
- int? GetInteger(string key)
- Gets an integer value previously stored in the client data store
- ReturnType GetMetadata(string key = "")
- Gets metadata from the script context - either the entire serialized block, or just one value if a key is given
- ReturnType GetMetaData(string key = "")
- JSDOMObject GetParent()
- string GetString(string key)
- Gets a string value previously stored in the client data store
- bool ListenOnChannel(int channel, JSFlexibleFunction func)
- Listens for script messages arriving from server scripts on a given channel
- bool MuteChannel(int channel)
- Stop listening to messages on a given script channel
- JSObject NewObject()
- Generates an empty C#-passable object for use with the Broadcast function.
- void RaiseLocalScriptEvent(string message, GUIContainer jsObject = NULL)
- void RequestWebTransfer(string relativeUri)
- Requests an authenticated web URL from the server and immediately navigates to it
- void RequestWebTransferUrl(string relativeUri, JSFlexibleFunction callback)
- Requests an authenticated web URL from the server and invokes the callback function when it is retrieved
- void ServerMessage(string message)
- Sends a message to the server Component this script originated from
- void SetFloat(string key, float value)
- Stores a floating point value in the client data store, persisting across sessions, keyed to this system.
- void SetInteger(string key, int value)
- Stores an integer value in the client data store, persisting across sessions, keyed to this system.
- void SetString(string key, string value)
- Stores a string value in the client data store, persisting across sessions, keyed to this system.