# How to do something else after a prototype animation

**URL:** <https://forum.kirupa.com/t/how-to-do-something-else-after-a-prototype-animation/187109>\
**Category:** Uncategorized\
**Created:** [April 26, 2006, 6:32pm UTC](https://forum.kirupa.com/t/how-to-do-something-else-after-a-prototype-animation/187109 "2006-04-26T18:32:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dru\_nasty](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@dru\_nasty](https://forum.kirupa.com/u/dru_nasty)\
**Post date:** [April 26, 2006, 6:32pm UTC](https://forum.kirupa.com/t/how-to-do-something-else-after-a-prototype-animation/187109/1 "2006-04-26T18:32:08Z")

</div>

I’m messing around with some text effects from a book.  
Here’s the script:

```auto

MovieClip.prototype.OpacityTransition = function (max, min, step)
{
	this.messages = new Array(
    	"Offset Printing",
		"Promotional Printing",
		"Web Design",
		"Docmann.com"
		);
	this.max = max;
	this.min = min;
	this.step = step;
	this.counter = 1;
	this.fadeIn = true;
	this._alpha = min;
	this.message = this.messages[0];
	this.onEnterFrame = function ()
	{
		if (this.fadeIn)
		{
			this._alpha += this.step;
		}
		else
		{
			this._alpha -= this.step;
		}
		if (this._alpha <= this.min || this._alpha >= this.max)
		{
			this.fadeIn = !this.fadeIn;
			if (this.fadeIn)
			{
				this.message = this.messages[this.counter++];
				if (this.counter >= this.messages.length)
				{
					this.counter = 0;
				}
			}
		}
	};
};
message.OpacityTransition (100, 0, 5);

```

What that does is make a mc fade through each of the strings in the message array. What I’d like is to be able to load a new movie or something once the words [Docmann.com](http://Docmann.com) fade out. I just don’t know where to put any gotoAndPlay or loadMovie in the above script.

Thanks 😉
