使用 .swc 中的 style.css 文件并使用 ANT 构建 Flex 项目

发布于 2024-09-08 22:33:50 字数 412 浏览 1 评论 0原文

我有一个 .SWC 库,里面有一个 style.css 文件。 .SWC 文件被添加到我的项目中,并且 style.css 的使用方式如下:

<fx:Style source="assets/style/style.css" />

如果我想使用 ANT 脚本构建我的项目,它会说“找不到外部样式表”。 在 ANT 中,您需要以“/”开头编写资产路径。所以这可行:

<fx:Style source="/assets/style/style.css" />

但在这种情况下,不可能从 .swc 检索 style.css,因为编译器说“找不到外部样式表”。

有没有办法在 .swc 中使用 style.css 并使用 ANT 来构建项目?

I have an .SWC library with a style.css file inside.
The .SWC file is added to my project and the style.css is used this way:

<fx:Style source="assets/style/style.css" />

If I want to build my project with an ANT-script it says that "the external stylesheet couldn't be found".
In ANT you need to write the path for assets with an leading "/". So this would work:

<fx:Style source="/assets/style/style.css" />

But in this case it isn't possible to retrieve the style.css from the .swc as the compiler says that "the external stylesheet couldn't be found".

Is there any way to use the style.css inside the .swc AND use ANT to build the project?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心的憧憬 2024-09-15 22:33:50

已解决:
问题出在编译的 SWC 中。
我忘了说ant文件添加样式了。当我检查SWC时,我检查了Flash Builder编译的SWC,而不是ant脚本编译的SWC。

resolved:
problem was within the compiled SWC.
I've forgotten to say the ant file to add the style. When I checked the SWC, I checked the SWC compiled by the Flash Builder and not by the ant script.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文