Flex使用module加载swf,部分组件样式丢失

flex使用module加载swf,部分组件样式丢失(datefield RadioButton)

解决方法:

方案一.在Application主文件里面放入丢失样式的组件,并设置组件属性visible=false.

方案二.在flex编译属性配置文件(.actionScriptProperties)编译参数中加上-keep-all-type-selectors=true。如下配置:

<compiler additionalCompilerArguments="-services &quot;x:/workspace/xxx/WebRoot/WEB-INF/flex/services-config.xml&quot; -keep-all-type-selectors=true -allow-source-path-overlap=true -source-path=com/cist/gis/config -locale zh_CN" autoRSLOrdering="true" copyDependentFiles="true" flex3CompatMode="false" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="WebRoot" removeUnusedRSL="true" rootURL="http://localhost:8080/xxx" sourceFolderPath="flex_src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">

 

4. 分模块下样式丢失的问题

(1)          可以在每次加载模块前设置该模块应用父模块相同的moduleFactor

this.moduleFactory=FlexGlobals.topLevelApplication.moduleFactory ;

(2)          可以在配置文件 actionScriptProperties里面添加

isolate-styles="false"

 

 

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值