MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Spécifications Page 134

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 369
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 133
Chapter 456
cam.setKeyFrameInterval(5);
client_mic.setRate(11);
// For demonstration purposes, change size of screen
Output_mc._height = 130;
Output_mc._width = 175;
// If "LAN" was selected
} else /*if ( b == 3 )*/ {
client_cam = Camera.get();
client_cam.setMode(160,120,15);
client_cam.setQuality(0, 90);
client_cam.setKeyFrameInterval(10);
client_mic.setRate(22);
// For demonstration purposes, change size of screen
Output_mc._height = 150;
Output_mc._width = 200;
}
// Call the server function setBandwidth and pass the user’s
// selection, b.
client_nc.call("setBandwidth", 0, b);
}
// Get the stream to play
getPlayStream();
Meanwhile, the main.asc file contains a setBandwidth function, which when called from the
client-side code, updates the bandwidth limit with the appropriate settings.
// If server-side code is part of the application,
// it must define an onConnect function that accepts
// the client connection.
application.onConnect = function(client) {
// Establish the connection
application.acceptConnection(client);
}
// Called when user presses a bandwidth choice (Modem=1, DSL=2, LAN=3)
Client.prototype.setBandwidth = function(bw) {
// set the bandwidth for the client
if ( bw == 1 ) {
// modem settings
this.setBandwidthLimit( 35000/8, 22000/8 );
} else if ( bw == 2 ) {
// DSL settings
this.setBandwidthLimit( 800000/8, 100000/8 );
} else /*if ( bw == 3 )*/ {
// LAN settings
this.setBandwidthLimit( 400000, 400000 );
}
}
Vue de la page 133
1 2 ... 129 130 131 132 133 134 135 136 137 138 139 ... 368 369

Commentaires sur ces manuels

Pas de commentaire