ShiVa Flash: XML and CrossDomain – ShiVa Engine

ShiVa Flash: XML and CrossDomain

ShiVa’s Flash exporter is currently in BETA, but a lot of our licensed users have already embraced the new platform and are starting to port their games. In order to interact with XML files on your server, you need to make use of a little file that handles access permission for your Flash documents, called crossdomain.xml.


Flash is a client-side technology. If you want to grant the application access to your server in order to retrieve XML data, you need to place a crossdomain.xml file at the root level of your domain.

Without crossdomain.xml, you will not be able to retrieve the content of target.xml.


This is the entire example code for a crossdomain.xml file that will work with ShiVa SWF projects.

<?xml version="1.0"?>
        <allow-access-from domain="*" />
		<allow-http-request-headers-from domain="*" headers="*"/>
        <site-control permitted-cross-domain-policies="master-only" />

You can now retrieve the content of any XML document on your server using xml.receive.

How to proceed

Stay tuned for next week, when we will provide you with a full highscore retrieval code and sample STE project!

Links and Further Reading

  • slackBanner