PDA

View Full Version : swap depths question


binetron
10-09-2005, 01:12 AM
I'm trying to simply send movieclip_a to the back most layer or level
by clicking movieclip_d.
I have 4 movieclips total.
when clicking movieclips they move to the topmost level using swapDepth.
But then I need certain ones to move to the far back based on which one is at the top.

here's a bad rendition of what I'm trying to do.
Hi, I'm mc_a. I was on the bottom but I've just been clicked and now I'm on top.
But now I need to send mc_c below mc_b and then send mc_d behind mc_c.

any help?

oldnewbie
10-09-2005, 01:38 AM
How about getting mc_b's depth [my_depthVAR = mc_b.getDepth();], and then swapping depths on mc_c & mc_d, according to mc_b's depth + 1 and mc_b's depth + 2 ?

binetron
10-09-2005, 01:45 AM
thanks for the reply.
That sounds like it might work but it is way above my comprehension.

Is there a more direct way of just saying, you go to this depth and you go to that depth? Like set depth to 0 or something?

oldnewbie
10-09-2005, 02:27 AM
Have you tried it?

binetron
10-09-2005, 02:39 AM
tried what? set depth?

trust me, I've tried everything that doesnt work.
I have tried your code but it is way over my head.
I don't know where anything goes.

I just need to know how to set something's depth to a specified depth.
I know this is wrong but here's the logic.
on click
this.setDepth to 4
then mc_b.setDepth to 3 etc. etc.

Is this even possible?

oldnewbie
10-09-2005, 03:47 AM
http://www.kirupa.com/developer/actionscript/swapdepth.htm