# Depths problem

**URL:** <https://forum.kirupa.com/t/depths-problem/222217>\
**Category:** Uncategorized\
**Created:** [April 11, 2007, 5:53pm UTC](https://forum.kirupa.com/t/depths-problem/222217 "2007-04-11T17:53:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iceblueflame](https://avatars.discourse-cdn.com/v4/letter/i/bbe5ce/32.png) [@iceblueflame](https://forum.kirupa.com/u/iceblueflame)\
**Post date:** [April 11, 2007, 5:53pm UTC](https://forum.kirupa.com/t/depths-problem/222217/1 "2007-04-11T17:53:19Z")

</div>

ok, i need to create a border in my movie. i’ve used two buttons for two different types of borders and a NumericStepper to specify the thickness.  
i createEmptyMovieClip an mc and then i use moveTo and lineTo to draw the rectangular border inside it.

now, every time the new thickness is specified, a new border should appear and replace the older one. so how do i do this??  
i tried using a constant depth value which solved this problem.

but there’s another issue. i have a movieclip already on stage, placed manually by me. i dont want it to get overlapped by the border and so i used swapDepths for it. but if i use a constant depth, every alternate swapDepths puts this movie clip behind the border.  
so, first time the border’s behind. now i change thickness and again apply border, the border is over my movieclip.

how do i solve this so that the borders replace themselves and the mc on stage remains on top??
