Specifications
CHAPTER 10
216
Next, you create a crossdomain.xml file. If the domain that are you running the Flex application on is my-local-
domain.com, then you can create a crossdomain.xml file that looks like the following:
<cross-domain-policy>
<allow-access-from domain="*.my-local-domain.com" to-ports="*"/>
</cross-domain-policy>
You now deploy the main application and the RSL. This time, however, the RSL is deployed on a remote server in
the /rsls directory. You must also ensure that the crossdomain.xml file is in that directory. Finally, you must ensure
that the failover RSL and its crossdomain.xm l file are deployed to the other remote domain.
Using the framework RSLs
Every Flex application uses some aspects of the Flex framework, which is a relatively large set of ActionScript
classes that define the infrastructure of a Flex application. If a client loads two different Flex applications, the
application will likely load overlapping class definitions. This can be a problem for users who are on dialup or slow
network connections. It also leads to the perception that Flex applications load more slowly than HTML-based
applications.
To overcome these limitations, you can use framework RSLs with your Flex applications. These libraries are
comprised of the Flex class libraries and can be used with any Flex application. Framework RSLs come in two
versions: signed and unsigned. Signed framework RSLs are cached in a special Player cache rather than the browser
cache. They can be accessed by any application regardless of that applicationâs originating domain. They only need
to be downloaded to the client once, and they are not cleared from the clientâs disk when the browserâs cache is
cleared. Unsigned framework RSLs are cached in the browser cache and can only be used by applications that have
access to the RSLâs domain.
Flash Player 9.0.115 and later support loading signed framework RSLs. These RSLs can be loaded by applications
in different domains. The framework RSLs are signed and have the extension SWZ. Only Adobe can create signed
RSLs, and only signed RSLs can be stored in the Player cache. If you create an RSL that contains a custom library,
it will be unsigned. You cannot sign it. If a Player with a version earlier than 9.0.115 attempts to load a framework
RSL, then Flash Player skips it and loads a failover RSL, if one was specified when the application was compiled.
Only applications compiled with the Flex 3 compilers can use signed framework RSLs. Applications compiled
earlier versions of the compilers cannot use signed framework RSLs.










