1

To make my Ant Generated swf as small as possible, i used the Runtime Shared Library like described in this URL.

By default, the RSL files should be located with the compiled swf (without RSL).

Thus, do you know how can I change the location's property of the SRL files?

Because I have the compiled swf in many directories, that's why we should have only one resource of the RSL as well as in one separated directory

kaissun
  • 3,044
  • 4
  • 20
  • 35

1 Answers1

3

Have a look at an RSL linkage definition:

<runtime-shared-library-path>
    <path-element>libs/framework.swc</path-element>
    <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/framework_4.6.0.23201.swz</rsl-url>
    <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
    <rsl-url>framework_4.6.0.23201.swz</rsl-url>
    <policy-file-url></policy-file-url>
</runtime-shared-library-path>

The rsl-url nodes define where the application will look for the library. It will first try to get it from the first URL; if that fails it will try the second; and so on until it finds a link that works or fails.
You can add as many URL's as you like, but for framework RSL's you'll typically have a link to Adobe's repository as the first URL, and one fallback URL on your own server.

These URL's can be absolute or relative. If for instance you'd want you SDK RSL's to be located in a directory called 'sdk' under the same directory your application is in, just change the secondary rsl-url node to:

<rsl-url>sdk/framework_4.6.0.23201.swz</rsl-url>

The same principle applies if you wish to do it through compiler arguments. You could do it like this:

-runtime-shared-library-path=${swc},${swz.primary},http://fpdownload.adobe.com/pub/swz/crossdomain.xml,${swz.secondary}
RIAstar
  • 11,912
  • 20
  • 37
  • I appreciate your help. But when launching the application, which contains two folders src (contains the generated swf) and srl (contains all the related files for SRL), an error displayed the #2032 error it always access the {url}/src/framework_4.5.1.21489.swz even i do the change as you mentioned – kaissun Jun 19 '12 at 13:49
  • It looks like your changes aren't being applied since that is the default location. How are you applying your changes? Command line or config file? (Also make sure the application you're testing is not cached in the browser, in which case you'd still be seeing the previous version). – RIAstar Jun 19 '12 at 14:07
  • never mind, solution admitted. It is just a problem of cache. Thank you very much friend. – kaissun Jun 19 '12 at 14:08