# Animated Navigation

**URL:** <https://forum.kirupa.com/t/animated-navigation/90433>\
**Category:** flash\
**Created:** [May 17, 2005, 6:41pm UTC](https://forum.kirupa.com/t/animated-navigation/90433 "2005-05-17T18:41:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VersusMG](https://avatars.discourse-cdn.com/v4/letter/v/898d66/32.png) [@VersusMG](https://forum.kirupa.com/u/VersusMG)\
**Post date:** [May 17, 2005, 6:41pm UTC](https://forum.kirupa.com/t/animated-navigation/90433/1 "2005-05-17T18:41:52Z")

</div>

I am working on a few buttons for my companies new site.

When you rollOver the button it will play a intro animation.

When you rollOut of the button it will reverse the intro animation, code taken from the tutorial on here.

When you onPress the button it will load an external swf file and play a second animation.

When you rollOut after you press the button it will stay in the second animation state until you click a different button in the navigation.

```auto

stop();
this.onEnterFrame = function() {
	if (rewind == true) {
		prevFrame();
	}
};
this.onRollOver = function() {
	rewind = false;
	play();
};
this.onPress = function() {
	currSection = "services";
	gotoAndPlay("cicked");
};
this.onRollOut = function() {
	if (currSection != "services") {
		gotoAndPlay("transitionEnd");
	} else {
		(rewind=true);
	}
};

```

I have been working with this but i can’t figure out where i have gone wrong. I need to add the containerMC for it to load into but i cant figure it out.

Thanks
