是否有可能安排在Flash中的对象(Z)为了用ActionScript 3?
Is it possible to arrange (z) order of objects in Flash with ActionScript 3?
例如。我有一个给定的层3元件实例,我想执行的置于顶层,前移,和/或仅面向特定z位置是等效的。
e.g. I have 3 symbol instances on a given layer, and I want to perform the equivalent of 'Bring to Front', 'Bring Forward', and/or target a certain z position.
您可以在同一层内使用动作脚本这样的更改影片剪辑的z索引(堆栈顺序)。
You can change the z-index (stacking order) of a movie clip within a same layer using action script like this.
parent.setChildIndex(childObject, i)
更改childObject到电影的名字剪辑您想要更改的z-index,改变我一个整数(所需的z-index值)。
Change childObject to the name of the movie clip you want to change the z-index, change i to an integer (the desired z-index value).
如果你想实现这一目标上的鼠标事件,把上面的code函数内附加一个事件侦听器添加到按钮上的鼠标事件调用该函数。
If you want to make this happen on a mouse event, put above code inside a function and attach an event listener to a button to invoke this function on a mouse event.
上一篇:输出文件名在Flash Builder文件名、Flash、Builder
下一篇:ExternalInterface.call()没有得到返回值返回值、ExternalInterface、call