# Swapdepths problem

**URL:** <https://forum.kirupa.com/t/swapdepths-problem/246904>\
**Category:** flash\
**Created:** [December 16, 2007, 5:47am UTC](https://forum.kirupa.com/t/swapdepths-problem/246904 "2007-12-16T05:47:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![silverneo188](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@silverneo188](https://forum.kirupa.com/u/silverneo188)\
**Post date:** [December 16, 2007, 5:47am UTC](https://forum.kirupa.com/t/swapdepths-problem/246904/1 "2007-12-16T05:47:59Z")

</div>

im making a 3d imitation game i need 2 different movie clips to swap depths, here is my AS(2.0) which is on my main char movie clip.  
ActionScript Code:  
[FONT=Courier New][LEFT][COLOR=#0000FF][/COLOR]  
[COLOR=#0000FF]onClipEvent[/COLOR]COLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]  
[COLOR=#0000FF]if[/COLOR]COLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]  
\_y-=[COLOR=#000080]5[/COLOR]  
[COLOR=#000000]}[/COLOR]  
[COLOR=#0000FF]if[/COLOR]COLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]  
[COLOR=#0000FF]\_y[/COLOR]+=[COLOR=#000080]5[/COLOR]  
[COLOR=#000000]}[/COLOR]  
[COLOR=#0000FF]if[/COLOR]COLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]  
\_x-=[COLOR=#000080]5[/COLOR]  
[COLOR=#000000]}[/COLOR]  
[COLOR=#0000FF]if[/COLOR]COLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]  
[COLOR=#0000FF]\_x[/COLOR]+=[COLOR=#000080]5[/COLOR]  
[COLOR=#000000]}[/COLOR]

```
[COLOR=#0000FF]if[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000FF]this[/COLOR]._y&gt;=[COLOR=#0000FF]_root[/COLOR].[COLOR=#000080]podium1[/COLOR].[COLOR=#0000FF]_y[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]swapDepths[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000FF]_root[/COLOR].[COLOR=#000080]podium1[/COLOR][COLOR=#000000])[/COLOR]
[COLOR=#000000]}[/COLOR]

```

[COLOR=#000000]}[/COLOR]  
[/LEFT]  
[/FONT]

the problem is that he flickers when he touches it. Can anyone help me w/ this problem?
