Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts • Assignment Client Scripts
Thelocation
API provides facilities related to your current location in the directory services.
Getter/Setter
You can get and set your current directory services address by directly reading a string value from and writing a string value to
the location
object. This is an alternative to using the location.href
property or other object
functions.
Properties
Name | Type | Summary |
---|---|---|
domainID | Uuid |
A UUID uniquely identifying the domain you're visiting. Is Uuid.NONE if you're not connected to the domain or are in a serverless domain. Read-only. |
hostname | string |
The name of the domain for your current directory services address (e.g., |
href | string |
Your current directory services address (e.g., |
isConnected | boolean |
|
pathname | string |
The location and orientation in your current |
placename | string |
The place name in your current |
protocol | string |
The protocol of your current |
Methods
Name | Return Value | Summary |
---|---|---|
canGoBack
|
boolean |
Checks if going back to the previous location is possible. |
copyAddress
|
None |
Copies your current directory services address (i.e., |
copyPath
|
None |
Copies your current directory services location and orientation (i.e., |
goBack
|
None |
Takes you back to the previous location in your navigation history, if there is one. |
goForward
|
None |
Takes you forward to the next location in your navigation history, if there is one. |
goToEntry
|
None |
Takes you to the default "welcome" directory services address. |
goToLastAddress
|
None |
Takes you to the last address tried. This will be the last URL tried from |
goToLocalSandbox
|
None |
Takes you to the local Sandbox server that's running on the same PC as Interface. |
goToUser
|
None |
Takes you to the specified user's location. |
goToViewpointForPath
|
None |
Takes you to a position and orientation resulting from a lookup for a named path in the domain (set in the domain server's settings). Deprecated: This function is deprecated and will be removed. |
handleLookupString
|
None |
Takes you to a specified directory services address. |
lookupShareableNameForDomainID
|
None |
Retrieves and remembers the place name for the given domain ID if the place name is not already known. Deprecated: This function is deprecated and will be removed. |
refreshPreviousLookup
|
None |
Refreshes the current address, e.g., after connecting to a domain in order to position the user to the desired location. Deprecated: This function is deprecated and will be removed. |
storeCurrentAddress
|
None |
Updates your current directory services location in Interface's Settings file as your last-known address. This can be used to ensure that you start up at that address if you exit Interface without a later address automatically being saved. |
Signals
Name | Summary |
---|---|
goBackPossible
|
Triggered when there's a change in whether or not there's a previous location that can be navigated to using goBack. (Reflects changes in the state of the "Goto" dialog's back arrow.) |
goForwardPossible
|
Triggered when there's a change in whether or not there's a forward location that can be navigated to using goForward. (Reflects changes in the state of the "Goto" dialog's forward arrow.) |
hostChanged
|
Triggered when you navigate to a new domain. |
locationChangeRequired
|
Triggered when an attempt is made to send your avatar to a specified position on the current domain. For example, when you change domains or enter a position to go to in the "Goto" dialog. |
lookupResultIsNotFound
|
Triggered when looking up the details of a directory services user or location to go to has completed and the domain or user could not be found. |
lookupResultIsOffline
|
Triggered when looking up the details of a directory services user or location to go to has completed and the domain or user is offline. |
lookupResultsFinished
|
Triggered when looking up the details of a directory services user or location to go to has completed (successfully or unsuccessfully). |
pathChangeRequired
|
Triggered when an attempt is made to send your avatar to a new named path on the domain (set in the domain server's settings). For example, when you enter a "/" followed by the path's name in the "GOTO" dialog. |
possibleDomainChangeRequired
|
Triggered when a request is made to go to a URL or IP address. |
possibleDomainChangeRequiredViaICEForID
|
Triggered when a request is made to go to a named domain or user. |
Type Definitions
LookupTrigger Type: number |
||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The reasons for an address lookup via the Directory Services API are defined by numeric values:
|
Method Details
(static) canGoBack( ) → {boolean}
Returns: true if going back is possible, false if it isn't.
|
---|
Checks if going back to the previous location is possible. |
(static) copyAddress( ) |
---|
Copies your current directory services address (i.e., |
(static) copyPath( ) |
---|
Copies your current directory services location and orientation (i.e., |
(static) goBack( ) |
---|
Takes you back to the previous location in your navigation history, if there is one. |
(static) goForward( ) |
---|
Takes you forward to the next location in your navigation history, if there is one. |
(static) goToEntry( trigger ) | ||||||||
---|---|---|---|---|---|---|---|---|
Takes you to the default "welcome" directory services address. Parameters
|
(static) goToLastAddress( ) |
---|
Takes you to the last address tried. This will be the last URL tried from |
(static) goToLocalSandbox( pathopt, triggeropt ) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Takes you to the local Sandbox server that's running on the same PC as Interface. Parameters
|
(static) goToUser( username, matchOrientationopt ) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Takes you to the specified user's location. Parameters
|
(static) goToViewpointForPath( path, namedPath ) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Takes you to a position and orientation resulting from a lookup for a named path in the domain (set in the domain server's settings). Deprecated: This function is deprecated and will be removed. Parameters
|
(static) handleLookupString( address, fromSuggestionsopt ) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Takes you to a specified directory services address. Parameters
|
Retrieves and remembers the place name for the given domain ID if the place name is not already known. Deprecated: This function is deprecated and will be removed. Parameters
|
(static) refreshPreviousLookup( ) |
---|
Refreshes the current address, e.g., after connecting to a domain in order to position the user to the desired location. Deprecated: This function is deprecated and will be removed. |
(static) storeCurrentAddress( ) |
---|
Updates your current directory services location in Interface's Settings file as your last-known address. This can be used to ensure that you start up at that address if you exit Interface without a later address automatically being saved. |
Signal Details
goBackPossible(
isPossible
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when there's a change in whether or not there's a previous location that can be navigated to using goBack. (Reflects changes in the state of the "Goto" dialog's back arrow.) Parameters
Example
|
goForwardPossible(
isPossible
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when there's a change in whether or not there's a forward location that can be navigated to using goForward. (Reflects changes in the state of the "Goto" dialog's forward arrow.) Parameters
Example
|
hostChanged(
hostname
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when you navigate to a new domain. Parameters
Example
|
locationChangeRequired(
position,
hasOrientationChange,
orientation,
shouldFaceLocation
)
Returns: Signal |
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Triggered when an attempt is made to send your avatar to a specified position on the current domain. For example, when you change domains or enter a position to go to in the "Goto" dialog. Parameters
Example
|
lookupResultIsNotFound(
)
Returns: Signal |
---|
Triggered when looking up the details of a directory services user or location to go to has completed and the domain or user could not be found. |
lookupResultIsOffline(
)
Returns: Signal |
---|
Triggered when looking up the details of a directory services user or location to go to has completed and the domain or user is offline. |
lookupResultsFinished(
)
Returns: Signal |
---|
Triggered when looking up the details of a directory services user or location to go to has completed (successfully or unsuccessfully). |
pathChangeRequired(
path
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when an attempt is made to send your avatar to a new named path on the domain (set in the domain server's settings). For example, when you enter a "/" followed by the path's name in the "GOTO" dialog. Parameters
Example
|
possibleDomainChangeRequired(
domainURL,
domainID
)
Returns: Signal |
|||||||||
---|---|---|---|---|---|---|---|---|---|
Triggered when a request is made to go to a URL or IP address. Parameters
|
possibleDomainChangeRequiredViaICEForID(
iceServerHostName,
domainID
)
Returns: Signal |
|||||||||
---|---|---|---|---|---|---|---|---|---|
Triggered when a request is made to go to a named domain or user. Parameters
|