# Could someone tell me why this doesnt work? (swapDepth)

**URL:** https://forum.kirupa.com/t/could-someone-tell-me-why-this-doesnt-work-swapdepth/96700
**Category:** Uncategorized
**Created:** [December 12, 2003, 2:27pm UTC](https://forum.kirupa.com/t/could-someone-tell-me-why-this-doesnt-work-swapdepth/96700 "2003-12-12T14:27:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![b0b0](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@b0b0](https://forum.kirupa.com/u/b0b0)
#### Post date: [December 12, 2003, 2:27pm UTC](https://forum.kirupa.com/t/could-someone-tell-me-why-this-doesnt-work-swapdepth/96700/1 "2003-12-12T14:27:12Z")

</div>

could someone help me to figure out this, and how to code this correctly, it’s probably something simple though right now I can’t figure it out!

I want the circle to swapdepth with the box when the circle.\_y is behind the box.\_y

steer the circle with the arrow keys, the actions are in the first frame of each movie clip.

thanx in advance

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 12, 2003, 7:11pm UTC](https://forum.kirupa.com/t/could-someone-tell-me-why-this-doesnt-work-swapdepth/96700/2 "2003-12-12T19:11:22Z")

</div>

I downloaded the .fla and when tested it does nothing.

All I see is script that reads:  
\_global.speed = 10;

I see no code on the two shape mc’s and no overview of the desired action. Please post more description of desired interaction and I will see what I can do.

–jmac

* * *

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 12, 2003, 7:54pm UTC](https://forum.kirupa.com/t/could-someone-tell-me-why-this-doesnt-work-swapdepth/96700/3 "2003-12-12T19:54:36Z")

</div>

[http://www.kirupa.com/developer/actionscript/swapdepth.htm](http://www.kirupa.com/developer/actionscript/swapdepth.htm)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 13, 2003, 1:43pm UTC](https://forum.kirupa.com/t/could-someone-tell-me-why-this-doesnt-work-swapdepth/96700/4 "2003-12-13T13:43:28Z")

</div>

I want the circle to swapdepth with the box when the circle.\_y is behind the box.\_y

steer the circle with the arrow keys, the actions are in the first frame of each movie clip.
