问题
Hmmm... I'm working at creating an AS3 UI library, since most of the ones out there each seem to miss out at least 1 feature I need. In order to keep it lightweight, I created everything from scratch. I use Sprites to render just about anything. But I want to allow the user of the library the possibility of adding a custom graphic for a button. Now... maybe that graphic is a MovieClip which has a nice animation within it.
So can I say sprite.addChild(mc) and then if I do mc.play, will the mc play within a sprite?
Thank you ::- ).
回答1:
Yes.
Sprite
extends DisplayObjectContainer
which can contain any DisplayObject
or subclass of DisplayObject
.
来源:https://stackoverflow.com/questions/2321152/can-a-sprite-contain-a-movieclip