# Perspective Depth

**URL:** <https://forum.kirupa.com/t/perspective-depth/120919>\
**Category:** Uncategorized\
**Created:** [August 28, 2004, 7:54pm UTC](https://forum.kirupa.com/t/perspective-depth/120919 "2004-08-28T19:54:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ferdi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ferdi/32/689_2.png) [@Ferdi](https://forum.kirupa.com/u/Ferdi)\
**Post date:** [August 28, 2004, 7:54pm UTC](https://forum.kirupa.com/t/perspective-depth/120919/1 "2004-08-28T19:54:17Z")

</div>

Hey people!

I’ve been searching the forum for this, I’m almost sure I saw a thread about it somewhere but can’t find it anywhere, so exuse me if I’m duplicating another thread…

I’ve got a little problem. I started working on this game yesterday and already bumped into a problem (take a look at the screenshot). All the (for now ugly) bushes and houses are being generated with a **for(i=…** statement with a random position to keep the gameplay different everytime you play it. Some bushes that are further away from our perspective should be _behind_the other bushes that are closer to us.

Is there anybody who knows a simple treatment to swap the depths of the movieclips which \_y positions \< than the \_y positions of the ones closer to us??

Thanks for any thoughts/help in advance!!
