# Left & Right navigation

**URL:** https://forum.kirupa.com/t/left-right-navigation/277523
**Category:** flash
**Created:** [December 13, 2008, 12:48am UTC](https://forum.kirupa.com/t/left-right-navigation/277523 "2008-12-13T00:48:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![phil88](https://avatars.discourse-cdn.com/v4/letter/p/f0a364/32.png) [@phil88](https://forum.kirupa.com/u/phil88)
#### Post date: [December 13, 2008, 12:48am UTC](https://forum.kirupa.com/t/left-right-navigation/277523/1 "2008-12-13T00:48:30Z")

</div>

hiya, im trying to create a site where on clicking seperate left and right buttons they will move along a background image a set distance. ive drawn a picture to help:

for example the background image would be 2000px by 300px, the dotted box would be the screen size say 400px in length

![](http://www.uniwin.co.uk/idea.jpg)

when the right button was pressed i would like the screen to shift 400px to the right, which would then show a new part of the background.

would it look something like:

Right\_Button.onRelease = function()  
{  
\_root.destX = 400px  
\_root.destY = 0  
}

and the left:

Left\_Button.onRelease = function()  
{  
\_root.destX = -400px  
\_root.destY = 0  
}

also how would you make it so its a smooth transition? and what happens when it gets to the end

sorry for all the questions on my first post,

Phil
