# Interactive image pan

**URL:** <https://forum.kirupa.com/t/interactive-image-pan/211205>\
**Category:** Uncategorized\
**Created:** [December 28, 2006, 4:25pm UTC](https://forum.kirupa.com/t/interactive-image-pan/211205 "2006-12-28T16:25:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![juice22](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@juice22](https://forum.kirupa.com/u/juice22)\
**Post date:** [December 28, 2006, 4:25pm UTC](https://forum.kirupa.com/t/interactive-image-pan/211205/1 "2006-12-28T16:25:19Z")

</div>

i followed the interactive image pan tutorial off of the flash tutorials and it worked

now i’m trying to make this image pan go vertically as opposed to horizontally as it does in this code:

//////////////////////////////  
[COLOR=#0000d0]this[/COLOR].[COLOR=#0000d0]onMouseMove[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#006610]function[/COLOR]COLOR=#0000ff[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]constrainedMove[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]bg\_mc[/COLOR], [COLOR=#991010]4[/COLOR], [COLOR=#991010]1[/COLOR][COLOR=#0000ff])[/COLOR]; [COLOR=#0000ff]}[/COLOR]; [COLOR=#006610]function[/COLOR] [COLOR=#000050]constrainedMove[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#0000d0]target[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]MovieClip[/COLOR], [COLOR=#000050]speed[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]Number[/COLOR], [COLOR=#000050]dir[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]Number[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#006610]var[/COLOR] [COLOR=#000050]mousePercent[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]Number[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000d0]\_xmouse[/COLOR][COLOR=#0000ff]/[/COLOR][COLOR=#0000d0]Stage[/COLOR].[COLOR=#0000d0]width[/COLOR]; [COLOR=#006610]var[/COLOR] [COLOR=#000050]mSpeed[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]Number[/COLOR]; [COLOR=#006610]if[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#000050]dir[/COLOR] [COLOR=#0000ff]==[/COLOR] [COLOR=#991010]1[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]mSpeed[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]1[/COLOR][COLOR=#0000ff]-[/COLOR][COLOR=#000050]mousePercent[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#006610]else[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]mSpeed[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#000050]mousePercent[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#0000d0]target[/COLOR].[COLOR=#000050]destX[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000d0]Math[/COLOR].[COLOR=#0000d0]round[/COLOR]COLOR=#0000ff[/COLOR]; [COLOR=#0000d0]target[/COLOR].[COLOR=#0000d0]onEnterFrame[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#006610]function[/COLOR]COLOR=#0000ff[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#006610]if[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#0000d0]target[/COLOR].[COLOR=#0000d0]\_x[/COLOR] [COLOR=#0000ff]==[/COLOR] [COLOR=#0000d0]target[/COLOR].[COLOR=#000050]destX[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#006610]delete[/COLOR] [COLOR=#0000d0]target[/COLOR].[COLOR=#0000d0]onEnterFrame[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#006610]else[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#0000d0]target[/COLOR].[COLOR=#0000d0]\_x[/COLOR] [COLOR=#0000ff]+=[/COLOR] [COLOR=#0000d0]Math[/COLOR].[COLOR=#0000d0]ceil[/COLOR]COLOR=#0000ff[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#0000ff]}[/COLOR]; [COLOR=#0000ff]}[/COLOR]  
//////////////////////would anyone know what i would need to change in this code for the pan to be vertical?  
id really appreciate it
