# swapDepths Problem

**URL:** <https://forum.kirupa.com/t/swapdepths-problem/201000>\
**Category:** flash\
**Created:** [September 17, 2006, 4:30pm UTC](https://forum.kirupa.com/t/swapdepths-problem/201000 "2006-09-17T16:30:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flash\_Man1](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Flash\_Man1](https://forum.kirupa.com/u/Flash_Man1)\
**Post date:** [September 17, 2006, 4:30pm UTC](https://forum.kirupa.com/t/swapdepths-problem/201000/1 "2006-09-17T16:30:42Z")

</div>

hey again,

its a similiar question to my previous post…it works fine so far but here is my prob.

- i click to services page where code on that button has \_root.menu\_2.swapDepths(2);
- on home button it has same code but swapDepths(1);  
-once clicked on the services i can only go to pages with higher depths so i can’t go back to home page ☹
- i know the fix would lie somewhere in a if else if statement im pretty sure…

but if anyone knows of short way of writing this if statement or a similiar fix it would be appreciated 😃

thanks in advance!! 😃
