# Interactive Movie Clip Scroller w/Easing

**URL:** https://forum.kirupa.com/t/interactive-movie-clip-scroller-w-easing/279741
**Category:** flash
**Created:** [January 18, 2009, 7:40pm UTC](https://forum.kirupa.com/t/interactive-movie-clip-scroller-w-easing/279741 "2009-01-18T19:40:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![davidreid](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@davidreid](https://forum.kirupa.com/u/davidreid)
#### Post date: [January 18, 2009, 7:40pm UTC](https://forum.kirupa.com/t/interactive-movie-clip-scroller-w-easing/279741/1 "2009-01-18T19:40:25Z")

</div>

Hi guys,

Recently I’ve been developing a new site that runs 100% with noScale. What I’m aiming to achieve is the ability for the user to move their mouse up and down on the Y Axis to effectively scroll the site. (Without having to click)

I’ve tried adapting the Interactive Image Panner Actionscript from the Tutorial on kirupa - but it doesn’t seem to be working quite right ☹ I’ve changed all the X Values to Y.

```auto

stop();

this.onMouseMove = function() {
	constrainedMove(bg_mc, 4, 1);
};
function constrainedMove(target:MovieClip, speed:Number, dir:Number) {
	var mousePercent:Number = _ymouse/Stage.height;
	var mSpeed:Number;
	if (dir == 1) {
		mSpeed = 1-mousePercent;
	} else {
		mSpeed = mousePercent;
	}
	target.destY = Math.round(-((target._height-Stage.height)*mSpeed));
	target.onEnterFrame = function() {
		if (target._y == target.destY) {
			delete target.onEnterFrame;
		} else if (target._y>target.destY) {
			target._y -= Math.ceil((target._y-target.destY)*(speed/150));
		} else if (target._y<target.destY) {
			target._y += Math.ceil((target.destY-target._y)*(speed/150));
		}
	};
}

```

The zip containing the fla and html files are located here - [http://www.archeradvertising.co.uk/kirupa/Archive.zip](http://www.archeradvertising.co.uk/kirupa/Archive.zip)

If anyone can help I’d really appreciate it.

Cheers  
David
