Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否可以将事件侦听器添加到每次将孩子添加到其中或从中删除时触发的 MovieClip。
这可能吗?
先感谢您,
马泰奥
您可以覆盖 addChild / addChildAt 和 removeChild / removeChildAt 函数并调度您想要的任何事件:
public override function addChild(child:DisplayObject):DisplayObject { dispatchEvent(new Event("newChild")); return super.addChild(child); }