Flash Builder 4 Release Build multiple files

坚强是说给别人听的谎言 提交于 2019-12-11 07:29:50

问题


When i make a release build the folder is populated with a number of swfs. Are all these swfs necessary? Is there a option to generate one swf?

Thanks in advance

EDIT

The files I see are:

  • framework_4.5.0.18623.swf
  • osmf_1.0.0.16316.swf
  • rpc_4.5.0.18623.swf
  • spark_4.5.0.18623.swf
  • sparkskins_4.5.0.18623.swf
  • textLayout_2.0.0.200.swf
  • playerProductInstall.swf

回答1:


I assume you're using Flash Builder 4 and/or Flex 4 SDK and see a bunch of SWZ files is that correct? These are framework files which can be cached by the player across multiple domains. Through this caching, the download size of your app is smaller because all these dependencies are left out.

If you want to combine everything to one SWF, in Flash Builder 4 open up the project properties and choose Flex build Path. You'll see a framework linkage option. Change it from "Runtime shared library" to "Merged into code. This default value was changed when moving from Flex 3 to Flex 4.

I'm not sure how to do it via command line, but I'm sure similar options exist.

Be warned, though, this will make your SWF bigger and you won't take advantage of the framework caching options.

Update: The files you're seeing are definitely Flex Framework files. The reason they are SWFs instead of SWZs is because you are using a prerelease SDK (4.5 ) and the SWZs are not available for caching yet.




回答2:


Here's what I found:

With Flex closed navigate to:

{Your Flex installation}\sdks\4.1.0\frameworks\flex-config.xml (where 4.1.0 is your latest version)

open flex-config.xml and scroll down until you see 6 items for "runtime-shared-library-path" it will look similar to:

<runtime-shared-library-path>
        <path-element>libs/textLayout.swc</path-element>
        <rsl-url>http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz</rsl-url>
        <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
        <rsl-url>textLayout_1.1.0.604.swz</rsl-url>
        <policy-file-url></policy-file-url>
    </runtime-shared-library-path>

Edit the "rsl-url" tag to place the swz file where you'd like:

<rsl-url>myrsl/textLayout_1.1.0.604.swz</rsl-url>

Do this for the remaining "runtime-shared-library-path" tags. Save it and launch Flex, your release build should now dump those .swz files into a folder called myrsl (or whatever you named it)



来源:https://stackoverflow.com/questions/4389583/flash-builder-4-release-build-multiple-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!