03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

This causes Flash Player to attempt to retrieve a policy file from the specified host <strong>and</strong> port.<br />

Any port can be used, not only ports 1024 <strong>and</strong> higher. Upon establishing a connection with<br />

the specified port, Flash Player transmits , terminated by a null<br />

byte. An XMLSocket server can be configured to serve both policy files <strong>and</strong> normal<br />

XMLSocket connections over the same port, in which case the server should wait for<br />

before transmitting a policy file. A server can also be set up to<br />

serve policy files over a separate port from st<strong>and</strong>ard connections, in which case it can send a<br />

policy file as soon as a connection is established on the dedicated policy file port. The server<br />

must send a null byte to terminate a policy file, <strong>and</strong> may thereafter close the connection; if the<br />

server does not close the connection, Flash Player does so upon receiving the terminating<br />

null byte.<br />

A policy file served by an XMLSocket server has the same syntax as any other policy file,<br />

except that it must also specify the ports to which access is granted. When a policy file comes<br />

from a port lower than 1024, it can grant access to any ports; when a policy file comes from<br />

port 1024 or higher, it can grant access only to other ports 1024 <strong>and</strong> higher. The allowed<br />

ports are specified in a "to-ports" attribute in the tag. Single port<br />

numbers, port ranges, <strong>and</strong> wildcards are all allowed. The following example shows an<br />

XMLSocket policy file:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

A policy file obtained from the old default location--/crossdomain.xml on an HTTP server on<br />

port 80—implicitly authorizes access to all ports 1024 <strong>and</strong> above. There is no way to retrieve<br />

a policy file to authorize XMLSocket operations from any other location on an HTTP server;<br />

any custom locations for XMLSocket policy files must be on an XMLSocket server.<br />

Because the ability to connect to ports lower than 1024 is new, a policy file loaded with<br />

loadPolicyFile() must always authorize this connection, even when a movie clip is<br />

connecting to its own subdomain.<br />

Parameters<br />

url:String - A string; the URL where the cross-domain policy file to be loaded is located.<br />

Selection<br />

Object<br />

542 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!