开发者

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. 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 t开发者_Go百科o become the root of a display object?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜