亲子深度将在动作中改变 [英] parent-child depth will change in actionscript

查看:590
本文介绍了亲子深度将在动作中改变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请看看这个项目,在这个项目中我有两个符号,其中一个创建并添加另一个符号作为子。



父母如我所料。父符号有两个框架。当父母进入第二帧时,在父母下绘制的孩子符号。我的意思是深度顺序会改变。
有人可以帮助我!!对不起,语言不好。



下载地址:
https://drive.google.com/file/d/0B-KCX3wxRH-cOUk5YU1OUzNFN3M/view?usp=sharing

解决方案

您完全误解了Flash的渲染效果,所以这里有几个指针: 符号被绘制超过父母,如我所料,不,不会发生。父母的内容可以是图片,其他符号等等,他们都在父母的内部,所以没有任何孩子被父母吸引过来,他们有一个显示层次结构就是全部。



在父项下绘制的子项符号。那么再一次nope,一个孩子是不是绘制在它的父母下,它是在父母和其他对象下。

当多个帧的MovieClip显示的内容它将这些内容添加到它的显示列表(本身内部)。之后,如果你添加另一个孩子,它会在上面。然后移动到另一帧,比如第2帧。再一次,MovieClip将第2帧的内容添加到自身内部,但是由于您在前一帧添加的子节点已经存在,因此所有新内容都将添加到其中。 p>

Please have a look at this project, in this project I have two symbol, one of them create and add another symbol as child.

Child symbol is drawn over parent as I expected. Parent symbol has two frames. When parent goes to second frame, child symbol drawn under parent. I mean depth order will change. Can somebody help me!!?? Sorry for poor language.

Download link: https://drive.google.com/file/d/0B-KCX3wxRH-cOUk5YU1OUzNFN3M/view?usp=sharing

解决方案

You misunderstand completely how the Flash rendering works so here's a couple of pointers:

"Child symbol is drawn over parent as I expected", nope, that doesn't happen. A parent has content which can be pictures, other symbols ect ... and they are all inside the parent so no child are drawn over the parent, they have a display hierarchy that's all.

"child symbol drawn under parent." well once again nope, a child is not drawn under it's parent, it is inside the parent and under other objects.

When a MovieClip with multiple frame displays the content of a frame it adds those content to it's display list (inside itself). After that if you add another child in it it will be on top. Then you move to another frame let's say frame 2. Once again the MovieClip adds the content of frame 2 inside itself, but since the child you added in the previous frame is already there all the new content is added on top of it.

这篇关于亲子深度将在动作中改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆