如何使用 Flex 使 MovieClip 的根显示对象成为 MovieClip 对象?
我正在尝试使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
mx Application 和 Spark Application 都继承自 Sprite,而不是 MovieClip。看一下最上面的继承链
第三方 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
The third-party API can't cast your Flex movie to MovieClip, because it's not one.
HTH;
aMY