# Easily adding additional movie clips to perform same task

**URL:** <https://forum.kirupa.com/t/easily-adding-additional-movie-clips-to-perform-same-task/318904>\
**Category:** flash\
**Created:** [February 3, 2011, 6:44am UTC](https://forum.kirupa.com/t/easily-adding-additional-movie-clips-to-perform-same-task/318904 "2011-02-03T06:44:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eddie\_E](https://avatars.discourse-cdn.com/v4/letter/e/2acd7d/32.png) [@Eddie\_E](https://forum.kirupa.com/u/Eddie_E)\
**Post date:** [February 3, 2011, 6:44am UTC](https://forum.kirupa.com/t/easily-adding-additional-movie-clips-to-perform-same-task/318904/1 "2011-02-03T06:44:06Z")

</div>

Hey,

I found a script that I use often to manipulate a movieclip to perform the old AS2 rewind function as shown below:

```auto
var isOver = false;
function onEnter(event)
{
	if (isOver)
	{
		mcFlip.nextFrame()   
		
	}
	else
	{
		mcFlip.prevFrame() 
	}
}

addEventListener('enterFrame',onEnter);

// mouse over 
function onOver(event)
{
	isOver = true;
}
addEventListener('rollOver',onOver);

// mouse out 
function onOut(event)
{
	isOver = false;
}
addEventListener('rollOut',onOut);

// mouse click 
function onClick(event)
{
	gotoAndPlay('test');
}
addEventListener('click',onClick);

```

My problem is that I have about 50 movieclips that perform a rewind tween, so is there a quick way to manipulate this script to add additional movie clips i.e. mcFlip2, mcFlip3 than repeating it over and over?

Thanks

Eddie
