MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuel d'utilisateur Page 150

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 155
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 149
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
147
Event handler summary
XMLSocket constructor
new XMLSocket(streamOrFlash)
Creates a new XMLSocket object ("flash") or a new XMLStreams object ("stream"). The XMLSocket and
XMLStreams objects are not initially connected to any server. You must call
XMLSocket.connect() to connect the
object to a server.
For more information about the XMLStreams class, see XMLStreams class.
Availability
Flash Communication Server 1.5
Parameters
streamOrFlash A string indicating whether this object is an XMLSocket object or an XMLStreams object. This
parameter can have one of the following two values: "
flash" or "stream".
Returns
A reference to an XMLSocket object or an XMLStreams object.
Example
The following example creates an XMLSocket object:
var socket = new XMLSocket("flash");
The following example creates an XMLStreams object:
var stream = new XMLSocket("stream");
XMLSocket.close()
myXMLSocket.close()
Closes the connection specified by the XMLSocket object.
Availability
Flash Media Server 2
Example
The following simple example creates an XMLSocket object, attempts to connect to the server, and then closes the
connection:
var socket = new XMLSocket();
socket.connect(null, 2000);
Event handler Description
XMLSocket.onClose() Invoked when an open connection is closed by the server.
XMLSocket.onConnect() Invoked by Flash Media Interactive Server when a connection request initiated through
XMLSocket.connect() succeeds or fails.
XMLSocket.onData() Invoked when a message has been downloaded from the server, terminated by a zero (0) byte.
XMLSocket.onXML() Invoked when the specified XML object containing an XML document arrives through an open
XMLSocket connection.
Vue de la page 149

Commentaires sur ces manuels

Pas de commentaire