all groups > flash actionscript > november 2004 >
You're in the

flash actionscript

group:

how to change a movie clip depth?


how to change a movie clip depth? yofof
11/17/2004 10:11:41 PM
flash actionscript:
i have a movie clip on stage. how can i set or change the depth? anybody can help?
Re: how to change a movie clip depth? kglad
11/17/2004 10:17:36 PM
use the swapDepths() property of movieclips. for example, if you have a movieclip onstage with instance name mc1, to move it to depth 201 you could use:

Re: how to change a movie clip depth? yofof
11/17/2004 10:44:08 PM
thank you both
Re: how to change a movie clip depth? kglad
11/18/2004 12:29:56 AM
Re: how to change a movie clip depth? Jeckyl
11/18/2004 9:19:19 AM
swapDepths

Be careful though, if you clip is one you've statically created at authoring
time on the stage/timeline. You can get into trouble if you try to
dynamically change the depth of objects that are statically created.

It is best to ONLY use swapDepths with clips dynamically created (eg via
duplicateMovieClip etc). And only use positive values for depths (don't use
negative ones that are reserved for statically created objects).

Re: how to change a movie clip depth? Jeckyl
11/18/2004 3:14:24 PM
ditto
[quoted text, click to view]

AddThis Social Bookmark Button