Skip to main content
Participant
December 16, 2009
Question

Building theme SWF with recent nightly

  • December 16, 2009
  • 1 reply
  • 1057 views

I'm trying to upgrade from the Flex 4 Beta 2 SDK to nightly build 12891, and am having an issue with our dynamically-loaded theme SWF:

When the theme SWF is built via ant, running mxmlc on the CSS file, at theme-loading time our app tries to download the framework RSLs again (i.e., they were already downloaded when the app initially loaded). It also attempts to load a locale (which was also already loaded).

When the theme SWF is built via Flash Builder (by selecting the 'Compile CSS to SWF' option on the CSS file, and using the same nightly SDK), it does not attempt to load the framework RSLs or a locale.

This behavior differs from what we see when using the Beta 2 SDK; in that case, I never noticed the RSLs being requested when the theme was loaded.

Also, the theme SWF that is created with ant is smaller (50-some kb) than the one created by Flash Builder (80-some kb), when using nightly 12891.

When using the Beta 2 SDK, the theme SWF created with ant was larger than the one created by Flash Builder, using the same compiler options.

This implies that Flash Builder is providing some different options to mxmlc than our ant target is, but it's a mystery to me what those are. It seems that the default behavior of mxmlc has changed between the two SDKs.

Our ant call to mxmlc is quite simple: we provide the CSS file as the source, add an assets directory to the source path, and set our main application SWC as an external library (so skin files can resolve their host components).

I tried adding the framework SWCs as external libraries, but that didn't change the behavior.

What options should I be providing to replicate Flash Builder's compile command?

Cheers,

Aron

This topic has been closed for replies.

1 reply

matt_chotin
Inspiring
December 17, 2009

Hmm, can you try adding -dump-config=config.xml to your project's compiler arguments? that way you can see how things are being set up from Builder. It may very well be a bug.

Matt

Mr__McBobAuthor
Participant
December 18, 2009

Nothing jumps out at me from the generated config.xml; perhaps it'll be more meaningful to you:

http://pastebin.com/m40f8aa8e

This is from the top-level project that also contains the CSS file being compiled into a SWF. (Our main code base is in another, library project.)

Bug or not, am I correct in thinking that Flash Builder is just invoking mxmlc to compile the CSS file? I.e., there is some set of options that I can provide to mxmlc to achieve the same (working) result?

Cheers,

Aron

matt_chotin
Inspiring
December 21, 2009

Yes, Flash Builder just invokes MXMLC, so you should be able to do the same things as if you were compiling an app to change what gets linked into the SWF.