User Guide
1344 ActionScript classes
When load() is executed, the XML object property loaded is set to false. When the XML
data finishes downloading, the
loaded property is set to true, and the onLoad event handler
is invoked. The XML data is not parsed until it is completely downloaded. If the XML object
previously contained any XML trees, they are discarded.
If
XMLSocket.connect() returns a value of true, the initial stage of the connection process is
successful; later, the
XMLSocket.onConnect method is invoked to determine whether the
final connection succeeded or failed. If
XMLSocket.connect() returns false, a connection
could not be established.
When using this method, consider the Flash Player security model.
■ For Flash Player 8, the XMLSocket.connect() method is not allowed if the calling SWF
file is in the local-with-file-system sandbox.
■ For Flash Player 7 and later, websites can permit access to a resource from requesters in
different domains by deploying a cross-domain policy file.
For more information, see the following:
■ Chapter 17, "Understanding Security," in Learning ActionScript 2.0 in Flash
■ The Flash Player 8 Security white paper at http://www.macromedia.com/go/fp8_security
■ The Flash Player 8 Security-Related API white paper at http://www.macromedia.com/go/
fp8_security_apis
Availability: ActionScript 1.0; Flash Player 5 - Behavior changed in Flash Player 7.
Parameters
url:String - String; a fully qualified DNS domain name or an IP address in the form
aaa.bbb.ccc.ddd. You can also specify
null to connect to the host server on which the SWF file
resides. If the SWF file issuing this call is running in a web browser,
host must be in the same
domain as the SWF file; for details, see the information about domain restrictions for SWF
files in the main description of this method.
port:Number - A number; the TCP port number on the host used to establish a connection.
The port number must be 1024 or greater.
Returns
Boolean - true if the connection is successful; false otherwise.