本文来自:http://wangcheng.iteye.com/blog/187213

在Flex Builder的flex_builder_dir/sdks/3.0.0/frameworks/rsls 目录中可以找到FlexBuilder提供的the framework RSLs, 包括:

  • framework_3.0.build_number.swz (signed framework RSL)
  • rpc_3.0.build_number.swz (signed data services RSL)
  • datavisualization_3.0.build_number.swz (signed data visualization RSL)

在不使用RSL时,我们创建一个flex应用,不添加任何组件和内容,生成的swf有238k。

 

现在再创建一个flex应用,并使用RSL。只须在项目的properties -> Flex Builder Path -> Library path -> Framework linkage 下拉框中,选中Runtime shared Library(RSL) 即可。

 

再看生成的swf只有70k了。并且在bin目录中多了两个文件framework_3.0.0.477.swf 和 framework_3.0.0.477.swz。 这一个swz文件就是需要browser缓存的。也是上面flexBuilder目录中提供的。browser在浏览RSL的应用后,会在C:\Documents and Settings\user_name\Application Data\Adobe\Flash Player\AssetCache\ 目录中缓RSL。(我的缓存在更深一层的子目录中)。

 

上面的设置只是指定了framework.swc的RSL, 你也可以试试rpc.swc的RSL.

 

RSL是有签名证书认证的(signed)、以SWZ结尾的,只有Adobe可以创建带签名的RSL。也只有带签名证书的RSL才会被缓存在Flash Player Cache里。 如果使用Flash Player 9.0.115以前的版本来load一个RSL, 它会跳过,并loads a failover RSL(if one was specified when the application was compiled)。

 

参考

http://livedocs.adobe.com/flex/3/html/help.html?content=rsl_09.html

http://swingchen.bokee.com/6237984.html

posted on 2011-10-21 13:52  夏麦宜  阅读(282)  评论(0编辑  收藏  举报