0

I'm creating a Flex 4 application which contains different modules in it. The main application contains a style sheet and the modules inherit the styles defined in this file.

Its working fine when the swf's are generated using Flash Builder. But when I'm generating it using Ant script, the modules does not inherit the styles and everything looks weird.

I added

isolate-styles="false"

as an additional parameter to mxmlc, but still its not working :(

Can someone please provide your suggestions?

2 Answers 2

0

I have never had to do anything special in regards to modules, flex and ANT but maybe I have been lucky. Or there is something else going on in your ant script. You can try being explicit and adding your css files via the compiler argument - [defaults-css-files filename , ... but that would be a brute force method forcing the styles to be recompiled into your module. Another option to help with debugging is to call getMergedStyleDeclaration() from your module so that you can compare the difference between Flash Builder and when ant builds the file. I am sure you have already read this document, but just in case, here is Adobe's information on modular applications.

If none of this helps please post some more detailed information around your current scripts and I can help from there.

0

Turned out to be a simple solution. All styles except fonts were inherited to the modules.

mx|Module{
font-family :   "Myriad Web";
}

Needs to be added when built using ant. Flash builder generated swf's were working fine with out this additional style definition. I had provided only

s|Application {
font-family: "Myriad Web";
font-size: 12;
font-anti-alias-type:advanced;
}

in the main style sheet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.