可以在 Flash builder 4.5 中锁定组件吗?

发布于 2024-12-01 03:08:29 字数 780 浏览 3 评论 0原文

在 flash builder 4.5 中使用设计模式时是否可以锁定组件?

我在催化剂中创建了一个自定义组件,充当应用程序的背景。我需要在不同的状态下为这个组件设置动画,而这些都是在催化剂中完成的。

然后,我将 Flash Catalyst 项目作为库导入到 Flash Builder 中。然后,我可以使用设计模式将该组件拖到我的应用程序中。

问题在于该组件已设置为拉伸以适合整个应用程序。代码如下所示:

<components:Background left="0" right="0" top="0" bottom="0"/>

令人烦恼的是,当我在设计模式下将新组件拖到应用程序上时,它们会被拖“到”组件中,如下所示:

<components:Background left="0" right="0" top="0" bottom="0">
    <s:Button x="397" y="413" label="Button"/>
</components:Background>

这会导致背景组件在应用程序执行时不显示。正确的代码应该是:

<components:Background left="0" right="0" top="0" bottom="0" />
<s:Button x="397" y="413" label="Button"/>

我是否可以在设计模式下锁定某些组件,以免发生这种情况?

Is it possible to lock components when using design mode in flash builder 4.5?

I have created a custom component in catalyst that acts as the background to the application. I need to animate this component in different states, and these are all done in catalyst.

I then imported the flash catalyst project into flash builder as a library. I was then able to drag the component into my application using design mode.

The problem is that this component has been set to stretch to fit the whole application. The code would look like:

<components:Background left="0" right="0" top="0" bottom="0"/>

The annoying thing is that as I drag new components in design mode onto the application, they get dragged "into" the component like so:

<components:Background left="0" right="0" top="0" bottom="0">
    <s:Button x="397" y="413" label="Button"/>
</components:Background>

This causes the background component to not show when the application executes. The correct code should be:

<components:Background left="0" right="0" top="0" bottom="0" />
<s:Button x="397" y="413" label="Button"/>

Is there anyway I can lock certain components in design mode so that this doesn't happen?

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

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

发布评论

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

评论(1

泪痕残 2024-12-08 03:08:29

您可以使用皮肤实现您想要的行为。例如,您可以在皮肤上设置背景。类似于: 向 Spark 添加背景填充和图像容器

You can achieve the behavior you want using Skins. For instance, you could set the background on a skin. Something like: Adding background fills and images to Spark containers

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