
46
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Client.onReportedAddressChange()
client.onReportedAddressChange = function(){}
Invoked when a client reports new addresses.
Use this event to store a list of client addresses in a global registry or shared datastore to support distributed peer
lookups. See
Distribute peer introductions across multiple servers.
Availability
Flash Media Server 4.5
Example
client.onReportedAddressesChange = function() {
var newReportedAddresses = this.reportedAddresses;
// Now store these in a global registry or shared datastore to support distributed scripted
peer lookups.
// ...
}
Client.pageUrl
clientObject.pageUrl
Read-only; A string containing the URL of the web page in which the client SWF file is embedded. If the SWF file isn’t
embedded in a web page, the value is the location of the SWF file. The following code shows the two examples:
// trace.swf file is embedded in trace.html.
client.pageUrl: http://www.example.com/trace.html
// trace.swf is not embedded in an html file.
client.pageUrl: http://www.example.com/trace.swf
The value cannot be a local file address.
Availability
Flash Media Server 2
Example
The following example uses the Client.pageUrl property to verify whether a new client is located at a particular
URL. The result determines which block of code runs.
application.onConnect = function(newClient){
if (newClient.pageUrl == "http://www.example.com/index.html"){
return true;
} else {
return false;
}
};
Client.ping()
clientObject.ping()
Sends a “ping” message to the client and waits for a response. If the client responds, the method returns true;
otherwise,
false. Use this method to determine whether the client connection is still active.
Komentáře k této Příručce