Flash Media Server Developer Documentation

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 can be an HTTP address or a local file address (for example, file:///C:/Flash Media Server applications/example.html).

Availability

Flash Media Server 2

Example

The following example uses the Client.pageURI property to verify whether a new client is located at a particular URI. 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;
    }
};