chchrist
chchrist

Reputation: 19832

Flash Builder 4 Release Build multiple files

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:

Upvotes: 1

Views: 2362

Answers (2)

Max
Max

Reputation: 11

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)

Upvotes: 1

JeffryHouser
JeffryHouser

Reputation: 39408

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.

Upvotes: 1

Related Questions