2 Replies Latest reply on Mar 31, 2010 10:42 AM by holoscenes

    RSL configuration in FB4


      I need some help with configuring the location of RSLs.  We normally deploy our SWF files to a single path on our server such as  /ourapp/flex.  I have installed the shared libraries in the /ourapp/flex/lib path, and have been able to configure the library path in FB4 with an RSL URL of lib/framework_${build.number}.swz, using the fact that the RSL URL is relative to the URL of the SWF file.  It works fine for most of our apps.


      Unfortunately, one of our apps is deployed in /ourapp/flex/subdir, along with several dynamic modules that support it.  I haven't been able to configure the library path for that project so that it looks at ../lib/framework_${build.number}.swz, relative to the /ourapp/flex/subdir location of the SWF project.


      The FB4 plugin refuses to accept a path containing the double dots.  The "Edit RSL Deployment Path" dialog just shows an error: " '..' is an invalid name on this platform ".


      Although I can put an absolute path in there, I would rather use a relative path, since the application may not always be deployed in the same absolute location at all sites.


      I thought I might be able to use a flex_config.xml file to specify an override, but it doesn't seem to be doing anything, or it is not overriding the project's build path configuration from the IDE.  I tried adding "-load-config+=flex-config.xml" to the additional compiler arguments, and created a project/src/flex-config.xml containing the following:




      I don't receive any errors when I build the project, but it doesn't seem to recognize the rsl-url either.  It still tries to load the RSL from the same directory as the SWF file, rather than using the relative path that I provided in the flex-config.xml file.


      Any hints on how to specify a RSL URL location relative to the parent path of the SWF file?



        • 1. Re: RSL configuration in FB4
          Darrell Loverin Level 4

          I'd expect what you are doing can work as long you are using the latest version of 3.x.


          Check the LoaderInfo.url of your application to see if it includes the parent directory. The RSL paths are relative to the LoaderInfo.url of the application. If the url does not include the parent directory then the RSL URL won't be able to changed to the parent.


          Try setting a breakpoint in LoaderInfo.createAbsoluteURL() to see what is happening.




          • 2. Re: RSL configuration in FB4
            holoscenes Level 1

            I haven't been able to get Flash Builder 4 (the Eclipse plugin, using Flex 3.5 SDK) to do anything with the -load-config compiler option.  It does generate an error if the config file doesn't exist, but the contents of the config file don't seem to have any effect, at least not with respect to the RSL URL settings.


            I was able to work around the IDE error message caused by '..' in the RSL URL by encoding it as %2e%2e.  That allows me to specify a relative RSL URL to a path above the location of the SWF file, and the player correctly loads RSL.