R – save StyleSheet object to css file in Flex3

actionscript-3airapache-flexflex3

i can able to create StyleSheet object , i need to save that StyleSheet object to css file(in the css format).

how can i do in flex3 Air application , is there any build in library ? Or links available to save as *.css file

Thanks in advance

Best Answer

styleNames array of the StyleSheet class contains the names of all the styles in that object. The StyleSheet class also contains a getStyle method that returns a style object associated with a given style name. I guess you can make a CSS string using these two. As for saving it as css file, you can do it with the FileStream class. Use the writeUTFBytes method.