如何使用 Flex 使 MovieClip 的根显示对象成为 MovieClip 对象?

发布于 2024-11-17 03:35:30 字数 221 浏览 6 评论 0原文

我正在尝试使用 Flash Builder 4.5 构建一个 MXML 应用程序,并且正在集成一个需要显示对象的根为 MovieClip 的 API。我个人认为这是糟糕的设计,但我必须接受它。根对象似乎总是最终成为舞台,因为我当然必须将对象添加到舞台才能将其添加到显示列表中。是否有某种方法可以将 MXML 应用程序中的舞台类型更改为 MovieClip,或者是否有某种方法可以强制 MovieClip 包装器成为显示对象的根?

I am trying to build an MXML application with Flash Builder 4.5, and I am integrating an API that requires the root of a display object to be a MovieClip. Personally I think this is bad design but I have to go with it. The root object always seems to end up as the stage, because of course I have to add the object to the stage for it to be added to the display list. Is there some way that I can either change the stage type in an MXML application to a MovieClip or is there some way to force a MovieClip wrapper to become the root of a display object?

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

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

发布评论

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

评论(1

ゃ人海孤独症 2024-11-24 03:35:30

mx Application 和 Spark Application 都继承自 Sprite,而不是 MovieClip。看一下最上面的继承链

mx 应用程序文档

Spark 应用程序文档

第三方 API 无法将您的 Flex 影片投射到 MovieClip,因为它不是一个。

HTH;

艾米

Both mx Application and Spark Application inherit from Sprite, not MovieClip. Take a look at the inheritance chain at the top of

mx Application docs

Spark Application docs

The third-party API can't cast your Flex movie to MovieClip, because it's not one.

HTH;

aMY

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