[英]How do I get the root display object of a MovieClip to be a MovieClip object with Flex?
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. 我正在尝试使用Flash Builder 4.5构建MXML应用程序,并且我正在集成一个API,该API要求显示对象的根目录为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? 有没有办法可以将MXML应用程序中的舞台类型更改为MovieClip,还是有办法强制MovieClip包装器成为显示对象的根?
Both mx Application and Spark Application inherit from Sprite, not MovieClip. mx Application和Spark Application都继承自Sprite,而不是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. 第三方API无法将Flex影片投射到MovieClip,因为它不是一个。
HTH; HTH;
aMY 艾米
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.