# 'Interactive Image Pan' tutorial help

**URL:** <https://forum.kirupa.com/t/interactive-image-pan-tutorial-help/233176>\
**Category:** Uncategorized\
**Created:** [July 20, 2007, 7:41pm UTC](https://forum.kirupa.com/t/interactive-image-pan-tutorial-help/233176 "2007-07-20T19:41:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![genesisdesigns](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/genesisdesigns/32/3912_2.png) [@genesisdesigns](https://forum.kirupa.com/u/genesisdesigns)\
**Post date:** [July 20, 2007, 7:41pm UTC](https://forum.kirupa.com/t/interactive-image-pan-tutorial-help/233176/1 "2007-07-20T19:41:42Z")

</div>

Hey,

I just did this tutorial ‘Interactive Image Pan’

> **[kirupa.com - Interactive Image Panning, Page 1](https://www.kirupa.com/developer/flash8/interactive_image_pan.htm)**
>
> Create a nice special effect by learning how to pan an image based on mouse movement.

I completed it with succes, but my question:  
Is there a way to make it scroll slowly from the beginning, even before you start rolling over it with your mouse?

I dont want it to stand still when you start the movie.

This is the full Kirupa code:

> this.onMouseMove = function() { constrainedMove(bg\_mc, 4, 1); }; function constrainedMove(target:MovieClip, speed:Number, dir:Number) { var mousePercent:Number = \_xmouse/Stage.width; var mSpeed:Number; if (dir == 1) { mSpeed = 1-mousePercent; } else { mSpeed = mousePercent; } target.destX = Math.round(-((target.\_width-Stage.width)_mSpeed)); target.onEnterFrame = function() { if (target.\_x == target.destX) { delete target.onEnterFrame; } else { target.\_x += Math.ceil((target.destX-target.\_x)_(speed/100));}}; }
