0
votes

I have a Flex application. It loads a swf that represents a compiled CSS that contains some embedded fonts by doing a:

FlexGlobals.topLevelApplication.styleManager.loadStyleDeclarations("assets/css/fontCSS/Interstate.swf");

When this occurs, the flex app also tries to load assets/css/fontCSS/textLayout_2.0.0.232.swf

I understand that I need the text layout RSL. But I want to load it from the same directory as the flex app, not the directory of the module. I have several applications at that location, and I'd like them all to share the same RSL.

Any ideas on how I can force the RSL to load from my app URL?

2

2 Answers

0
votes

It turns out my CSS swf was compiled in debug mode, but the app was in release mode. So the app was using a cached swz and then the module was trying to load the debug swf version.

If the compile options matches, it doesn't try to double load and all is happy.

Also, using a release version works for both a debug and a release version of the app, so that's what I'm doing to simplify deployments.

0
votes

First of all, we have add some properties in the mxmlc task:

enter code here
              static-rsls="false"
              static-link-runtime-shared-libraries="false"
              verify-digests="false"

Then, the RSL paths of each library have to be added. Or, as all the ant files use a common libraries, we create a new xml file located in ant-build project (see: refractor similar code snippet in ANT files)

Finally, the version of swf/swz files of RSL is preferably initialized in the file build.properties.