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

  • 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 353
54
Returns
A Boolean value of true if the message was sent to the client; false otherwise.
Description
Method; executes a method in a client-side script. You can use SharedObject.send to
asynchronously execute a method on all the Flash clients subscribing to a shared object. The
server does not receive any notification from the client on the success, failure, or return value in
response to this message.
Example
This example calls the SharedObject.send method to execute the doSomething method in the
client-side ActionScript and passes
doSomething the string "this is a test".
var myShared = SharedObject.get("foo", true);
myShared.send("doSomething", "this is a test");
The following example is the client-side ActionScript code that defines the doSomething method:
connection = new NetConnection();
connection.connect("rtmp://www.macromedia.com/someApp");
var x = SharedObject.getRemote("foo", connection.uri, true);
x.connect(connection);
x.doSomething = function(str) {
// process the str
};
SharedObject.setProperty
Availability
Flash Communication Server MX.
Usage
sharedInfo.setProperty(name, value);
Parameters
name The name of the property in the shared object.
value An ActionScript object associated with the property, or null to delete the property.
Returns
Nothing.
Description
Method; updates the value of a property in a shared object. A shared object property can be
modified by another user of the shared object between successive calls to
SharedObject.getProperty and SharedObject.setProperty. If you want to preserve
transactional integrity, call the
SharedObject.lock method before operating on the shared
object; be sure to call
SharedObject.unlock when the operations finish. If you dont call
SharedObject.lock and the SharedObject.setProperty is called, the change is made to the
shared object, and all subscribers of the object are notified before
SharedObject.setProperty
returns. If a call to the
SharedObject.lock method precedes a call to
SharedObject.setProperty, all changes are batched and sent when the SharedObject.unlock
method is called.
Vue de la page 353
1 2 ... 349 350 351 352 353 354 355 356 357 358 359 ... 368 369

Commentaires sur ces manuels

Pas de commentaire