1

I have one swf file which takes theme from network during runtime. Now I conerted that swf to swc, and created another container swf to point to that swc. Seems the new swf file has the theme information, which the swc does not take the theme.

How do I enable swc to take the same theme as its parent container swf file?

Thanks.

BlueDolphin
  • 9,765
  • 20
  • 59
  • 74
  • I am very confused as to what you're asking or what the problem is. IT may help if you were to give each SWF and SWC a name so I can tell which is which. It may help to include a formal list of steps you took from where you started to where you are now. – JeffryHouser Feb 13 '12 at 03:41

1 Answers1

1

Not sure if this is exactly what you are looking for, but Take a look at this: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f8c.html#WS2db454920e96a9e51e63e3d11c0bf69084-7e68

From Adobe:

If you have an existing theme SWC file, you can use it as a run-time style sheet. To do this, you must extract the CSS file from the theme SWC file. You then compile the style SWF file by passing the remaining SWC file as a library.

The following steps show this process using the command line:

Extract the CSS file from the SWC file using PKZip or similar archiving utility, as the following example shows:

$ unzip halo.swc defaults.css

(Optional) Rename the CSS file to a meaningful name. This is the name of your style SWF file. The following example renames the defaults.css file to halo.css:

$ mv defaults.css halo.css

Compile the style SWF file. Add the theme SWC file to the style SWF file by using the include-libraries option, as the following example shows:

$ mxmlc -include-libraries=halo.swc halo.css

If you have multiple CSS files inside a theme SWC file, you must extract all of them before compiling the style SWF file.

Todd Moses
  • 10,969
  • 10
  • 47
  • 65
  • Thanks for the link. That's helpful. It helped me understand how to get CSS from SWC to SWF. But my scenario is opposite, I'd like the runtime theme loaded from SWF to apply to the modules in SWC. Any suggestions? – BlueDolphin Feb 13 '12 at 15:30
  • BTW, the style is loaded by SWF, and SWC does not have knowledge of the theme SWF is loading. I just expect SWC to use styles defined in SWF. – BlueDolphin Feb 13 '12 at 15:33