1

I am having 2 different CSS files in my application but i need to use one swf file by combining those two CSS styles.

Can anyone give me some idea to compile two css files in command prompt.

Usually we do compile single css file by using like

"SDK-path/mxmlc -locale= 'target-file' -output='output-filename.swf'"

I tried by using those 2 css files as target files seperated by comma(,) but it is not working. "SDK-path/mxmlc -locale= 'target-file-1,target-file-2' -output='output-filename.swf'"

How to compile 2 CSS files like this in command prompt. Thanks in advance.

ketan
  • 19,129
  • 42
  • 60
  • 98
raj
  • 43
  • 14

2 Answers2

1

Since mxmlc compiles only one css to swf at a time, we can merge or append multiple css files to single file and then compile that output css file to swf.

In command prompt

type file_1.css >> output.css
type file_2.css >> output.css
%FLEX_SDK_PATH%/mxmlc output.css -o output.swf

If you don't want the output.css simple delete the css using delete command

del output.css

the above commands will append the two css files and then compile that to single swf, if you thought to merge the css files (this in case of using same className/styleName for overriding file_1.css with file_2.css so that file_2.css will take the precedence) use the following command

copy file_1.css+file_2.css output.css
%FLEX_SDK_PATH%/mxmlc output.css -o output.swf
del output.css

hope this might help you...

Gowtham S
  • 923
  • 14
  • 39
0

This is not possible, but I guess if 1 file needs/uses/imports the other file it should also be compiled into the Shockwafe Flash.

Try adding this: @import("/path-to-your-styles.css"); to one of the CSS files.


DISCLAIMER: I have not tried this yet.

CodeFanatic
  • 11,434
  • 1
  • 20
  • 38
  • Thanks for your response. I tried by imported 'myImport.css' into 'myBase.css' and in main application load 'myBase.css' using . Tried to access style which is in 'myImport.css' to the application Label component, it is not working for me. Please let me know anything am doing wrong or kindly give me idea about the other option to achieve this. – raj Aug 18 '14 at 06:52