# swapDepths problem

**URL:** <https://forum.kirupa.com/t/swapdepths-problem/199698>\
**Category:** flash\
**Created:** [September 5, 2006, 10:27am UTC](https://forum.kirupa.com/t/swapdepths-problem/199698 "2006-09-05T10:27:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ollie1](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ollie1/32/2180_2.png) [@ollie1](https://forum.kirupa.com/u/ollie1)\
**Post date:** [September 5, 2006, 10:27am UTC](https://forum.kirupa.com/t/swapdepths-problem/199698/1 "2006-09-05T10:27:03Z")

</div>

I am currently working on a sub menu system. When a main menu button is pressed it changes the \_alpha from 0 to 100 for the relevant submenu. All of the submenus are piled ontop of each other and as a result the ones ontop block the rollover effect of the buttons further down the pile. To remedy this I have been attempting to implement a method whereby when the menu button is pressed it not only changes the \_alpha to 100% but also places the submenu MC at the front. I can’t however seem to get this to work.

Here is an extract of the AS:

```auto
function demo()
{
	this.scroller2_mc.contentMain.vone_btn._alpha = 100;
	this.scroller2_mc.contentMain.vone_btn.swapDepths(_root.getNextHighestDepth());
}

```

This can be found on lines 34-38 of the .FLA file: [www.bambambam.co.uk/testing/index.fla](http://www.bambambam.co.uk/testing/index.fla)

You can recreate the problem by clicking on ‘clients’; the upper buttons dont work, but the lower ones do.

I would appreciate any help whatsoever with this.

Thanks,

-ollie

[edit] fixed link[/edit]
