只有增加孩子当前帧孩子

2023-09-08 14:34:55 作者:勿忘心安

是否有可能给孩子添加到当前帧只?

Is it possible to add a child to the current frame only?

我知道你可以删除/隐藏起来,并生成/再次显示。

I know you can just remove/hide them, and generate/show them again.

不过,是不是有一个更简单的方法?

But isn't there an easier way?

推荐答案

旧校方式:

如果你有一个时间表,你只能在帧中添加一个影片剪辑作为持有人。支架夹只存在于该帧。一旦你达到这个框架您使用code真正的剪辑添加到持有人显示列表:

If you have a timeline you can add a MovieClip as a holder only on that frame. The holder clip only exists on that frame. Once you reach that frame you add the real clip to the holder display list using code:

holder.addChild(新special_clip())

holder.addChild(new special_clip())

这样,当你切换到另一个画面将被删除。它将然而,需要重新创建下一次你到了框架。

That way it will be removed when you change to another frame. It will however need to be re-created the next time you get to the frame.

 
精彩推荐
图片推荐