2 Replies Latest reply on Jul 14, 2009 6:08 PM by Darrell Loverin

    Using mxmlc.exe to link in an RSL's

    _chas_

      Hi,

       

      I created a Flex mxml project in Flex Builder and a library it needs to share with other projects.  From Flex Builder, it builds and runs when linked either as static / "Merged into code" or as dynamic / "Runtime Shared Library", which is good.

       

      Unfortunately, I need to build this from the command line. This worked before I added the library.  Now when I try to link statically, mxlmc.exe complains about the library object in the mxml file being undefined.  When I try to link dynamically the mxml builds into a swf, but when I run the swf it complains "".  See below:

       

      static = true
      >mxmlc.exe Sample.mxml -static-link-runtime-shared-libraries=true  -runtime-shared-library-path=shared.swc,library.swf 
      Loading configuration file C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\frameworks\flex-config.xml
      C:\...\Sample\swf\src\Sample.mxml(15):  Error: Type was not found or was not a compile-time constant: Profile.

                              private var myProfile:Profile;

      C:\...\Sample\swf\src\Sample.mxml(22):  Error: Call to a possibly undefined method Profile.

                                      myProfile = new Profile(...);

       

      >

      static = false
      >mxmlc.exe Sample.mxml -static-link-runtime-shared-libraries=false  -runtime-shared-library-path=shared.swc,library.swf
      Loading configuration file C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\fram
      eworks\flex-config.xml
      C:\...\Sample\swf\src\Sample.swf (70714 bytes)

      >Sample.swf

       

      MessageBox Error:

      SecurityError: Error #2148: SWF file file:///C|/.../Sample/swf/src/Sample.swf cannot access local resource file:///C|/.../SampleDevice/swf/src/library.swf. Only local-with-filesystem and trusted local SWF files may access local resources.
      at flash.net::URLStream/load()
      at flash.net::URLLoader/load()
      at mx.core::CrossDomainRSLItem/load()
      at mx.core::RSLListLoader/loadNext()
      at mx.core::RSLListLoader/load()
      at mx.preloaders::Preloader/initialize()
      at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()
      at mx.managers::SystemManager/initHandler()

       

      Ideally I would like to get both working. Second best option would be static linking, and dynamic linking would be third best.

       

      Any chance it matters that I have not rebuilt the swc from the command line and am using the one built by Flex?

       

      Thanks,

      _chas_