# Reverse MC

**URL:** <https://forum.kirupa.com/t/reverse-mc/203528>\
**Category:** flash\
**Created:** [October 11, 2006, 7:42pm UTC](https://forum.kirupa.com/t/reverse-mc/203528 "2006-10-11T19:42:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![friggingmick](https://avatars.discourse-cdn.com/v4/letter/f/58956e/32.png) [@friggingmick](https://forum.kirupa.com/u/friggingmick)\
**Post date:** [October 11, 2006, 7:42pm UTC](https://forum.kirupa.com/t/reverse-mc/203528/1 "2006-10-11T19:42:47Z")

</div>

Able to get the swap function to work but seem can’t get the reverse function to work (prefFrame):

```auto
var swaps:Array = [one, two, three, four, five];
var highest:Number = _root.getNextHighestDepth();
var current:Number;
for (i=0; i<swaps.length; i++) {
	swaps*.onRollOver = function() {
		current = this.getDepth();
		this.swapDepths(highest);
		this.gotoAndPlay(2);
	};
	swaps*.onRollOut = function() {
		this.swapDepths(current);
		this.onEnterFrame = function(){
		prevFrame();
	}
	};
}

```

The functions I’m attempting to simulate is similar to this concept: [http://www.templatemonster.com/flash-templates/8785.html](http://www.templatemonster.com/flash-templates/8785.html)

Any suggestion or better functions than above?

Thanks,

Friggin’ Mick
