# Play Backwards on Roll Over

**URL:** <https://forum.kirupa.com/t/play-backwards-on-roll-over/311098>\
**Category:** flash\
**Created:** [June 28, 2010, 3:02am UTC](https://forum.kirupa.com/t/play-backwards-on-roll-over/311098 "2010-06-28T03:02:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![swicked](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@swicked](https://forum.kirupa.com/u/swicked)\
**Post date:** [June 28, 2010, 3:02am UTC](https://forum.kirupa.com/t/play-backwards-on-roll-over/311098/1 "2010-06-28T03:02:30Z")

</div>

Hey guys,  
In my project i have a mc called theArrow, which contains 85 frames of animation, and a roll-over region called mouseRegion.

When the mouse rolls over the region i want theArrow mc to play backwards from the point it is at, and when the mouse leaves the region i want it to resume playing forward again.

here is my script:

```auto
theArrow.addEventListener(event.ENTER_FRAME, playBck);

function playBck(event:Event):void {
	this.theArrow.prevFrame();
}

mouseRegion.addEventListener(MouseEvent.ROLL_OVER, mouse_In, false, 0, true);
mouseRegion.addEventListener(MouseEvent.ROLL_OUT, mouse_Out, false, 0, true);

function mouse_In(event:MouseEvent):void {
	if (this.theArrow.currentFrame==1) {
		this.theArrow.stop();
	} else {
		this.theArrow.playBck();
	}
}
	

function mouse_Out(event:MouseEvent):void {
	if (this.theArrow.currentFrame==85) {
		this.theArrow.stop();
	} else {
		this.theArrow.play();
	}
}

```

Any Ideas?  
Thanks in advance.
