MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 1341

Actionscript 2.0 language reference
Table of Contents

Advertisement

The following restrictions apply to how and where an XMLSocket object can connect to the
server:
The XMLSocket.connect() method can connect only to TCP port numbers greater than
or equal to 1024. One consequence of this restriction is that the server daemons that
communicate with the XMLSocket object must also be assigned to port numbers greater
than or equal to 1024. Port numbers below 1024 are often used by system services such as
FTP, Telnet, and HTTP, so XMLSocket objects are barred from these ports for security
reasons. The port number restriction limits the possibility that these resources will be
inappropriately accessed and abused.
The XMLSocket.connect() method can connect only to computers in the same domain
where the SWF file resides. This restriction does not apply to SWF files running off a local
disk. (This restriction is identical to the security rules for loadVariables(),
XML.sendAndLoad(), and XML.load().) To connect to a server daemon running in a
domain other than the one where the SWF resides, you can create a security policy file on
the server that allows access from specific domains.
Setting up a server to communicate with the XMLSocket object can be challenging. If your
application does not require real-time interactivity, use the loadVariables() function, or Flash
HTTP-based XML server connectivity (XML.load(), XML.sendAndLoad(), XML.send()),
instead of the XMLSocket class. To use the methods of the XMLSocket class, you must first
use the constructor, new XMLSocket, to create an XMLSocket object.
Availability: ActionScript 1.0; Flash Player 5
Property summary
Properties inherited from class Object
constructor (Object.constructor
property),
prototype (Object.prototype
(Object.__resolve property)
Event summary
Event
Description
Invoked only when an open connection is closed by the server.
onClose
=
function() {}
Invoked by Flash Player when a connection request initiated through
onConnect
=
XMLSocket.connect() has succeeded or failed.
function(success
:Boolean) {}
property),
__proto__ (Object.__proto__
property),
__resolve
XMLSocket
1341

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents