在 Flash/Flex Builder 中显示嵌入图像

发布于 2024-09-04 08:40:37 字数 379 浏览 1 评论 0原文

我在 Flex 4 中使用图像嵌入(Flex 3 也是如此)。我有一个包含很多内容的类

[Embed(source="../assets/icons/icon1.png")] 
public static const image:ClasS

,我使用以下方式引用它们:

<mx:Image source="{imagesResources.image}"/>

当我运行应用程序时,我看到图标,但在 Flash(Flex) Builder 中,我在设计模式下工作时看不到图像。有什么方法可以在 Flash Builder 设计模式下启用图像可视化吗?或者更好的方式来包含资源。

谢谢

i'm using image embedding in Flex 4 (the same goes with Flex 3). I have one class with a lot of

[Embed(source="../assets/icons/icon1.png")] 
public static const image:ClasS

And i reference them using:

<mx:Image source="{imagesResources.image}"/>

When i run the application i see the icon but in Flash(Flex) Builder i can't see the images while working in Design mode. Is there any way to enable image visualization in Flash Builder design mode ? or a better way to include resources.

thanks

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

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

发布评论

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

评论(2

两仪 2024-09-11 08:40:37

遗憾的是没有。如果您嵌入图像(或资源),然后将源属性设置为 Class 变量,它们将不会显示在 Flex Builder for Flash Builder 的设计视图中。

当我想看到它们时,我所做的就是使它们成为静态 source="mypath/myimage.jpg",进行调整,然后将其更改回 Class 变量。

Sadly no. If you embed an image (or resource) and then set the source property to be the Class variable they will not show in Design View in Flex Builder for Flash Builder.

What I do when I want to see them is make them static source="mypath/myimage.jpg", do the tweaks then change that back to the Class variable.

猫卆 2024-09-11 08:40:37

您是否尝试过在 MXML 中使用 @Embed() 指令?查看标题“下的此链接”在 MXML 中使用 @Embed() 指令”

Have you tried using the @Embed() directive in MXML? Look at this link under the title "Using the @Embed() directive in MXML"

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