User Guide

Application class 23
Example
The following example clears all recorded streams:
function onApplicationStop(){
application.clearStreams("/");
}
The following example clears all MP3 files from the application instance’s /disco subdirectory:
function onApplicationStop(){
application.clearStreams("mp3:/disco/*");
}
Application.clients
Availability
Flash Communication Server MX 1.0.
Usage
application.clients
Description
Property (read-only); an object containing all the Flash clients or other Flash Media Servers
currently connected to the application. The object is a custom object like an array, but with
only one property,
length. Each element in the object is a reference to a Client object
instance, and you can use the
length property to determine the number of users connected to
the application. You can use the array access operator (
[]) with the application.clients
property to access elements in the object.
The object used for the
clients property is not an array, but it acts the same except for one
difference: you cant use the following syntax to iterate through the object:
for(var i in application.clients) {
// Insert code here.
}
Instead, use the following code to loop through each element in a clients object:
for (var i = 0; i < application.clients.length; i++) {
// Insert code here.
}