# Website Nav, Tween between pages in the same scene

**URL:** <https://forum.kirupa.com/t/website-nav-tween-between-pages-in-the-same-scene/283240>\
**Category:** flash\
**Created:** [March 4, 2009, 1:06am UTC](https://forum.kirupa.com/t/website-nav-tween-between-pages-in-the-same-scene/283240 "2009-03-04T01:06:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeppy](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jeppy](https://forum.kirupa.com/u/jeppy)\
**Post date:** [March 4, 2009, 1:06am UTC](https://forum.kirupa.com/t/website-nav-tween-between-pages-in-the-same-scene/283240/1 "2009-03-04T01:06:20Z")

</div>

Hello, I am new to Actionscript and am working with AS3 in Flash CS3 to produce a portfolio website. Basically I have my flash set up with a 3x3 grid (9 boxes about 450px by 450px each box) and each box will have info and basically be a page that will be displayed in the masked area I have made.

I have already got the navigation working but I want to make it tween to each page with a deceleration effect. The following is my code for my navigation which currently works fine:

```auto
stop();

function goTopRight (e:MouseEvent):void{
gotoAndStop(3);
}
topright_btn.addEventListener(MouseEvent.CLICK, goTopRight);

function goTopMiddle (e:MouseEvent):void{
gotoAndStop(2);
}
topmiddle_btn.addEventListener(MouseEvent.CLICK, goTopMiddle);

function goTopLeft (e:MouseEvent):void{
gotoAndStop(1);
}
topleft_btn.addEventListener(MouseEvent.CLICK, goTopLeft);

function goCentreRight (e:MouseEvent):void{
gotoAndStop(6);
}
centreright_btn.addEventListener(MouseEvent.CLICK, goCentreRight);

function goCentreMiddle (e:MouseEvent):void{
gotoAndStop(5);
}
centremiddle_btn.addEventListener(MouseEvent.CLICK, goCentreMiddle);

function goCentreLeft (e:MouseEvent):void{
gotoAndStop(4);
}
centreleft_btn.addEventListener(MouseEvent.CLICK, goCentreLeft);

function goBottomRight (e:MouseEvent):void{
gotoAndStop(9);
}
bottomright_btn.addEventListener(MouseEvent.CLICK, goBottomRight);

function goBottomMiddle (e:MouseEvent):void{
gotoAndStop(8);
}
bottommiddle_btn.addEventListener(MouseEvent.CLICK, goBottomMiddle);

function goBottomLeft (e:MouseEvent):void{
gotoAndStop(7);
}
bottomleft_btn.addEventListener(MouseEvent.CLICK, goBottomLeft);

```

I have found another portfolio website that is almost identical to the one I want to make: [http://www.dustontodd.com/](http://www.dustontodd.com/)

I would like to know how they have made the content tween smoothly and decelerate to each page and if possible be given a sample of the code and where to put it amongst the code I already have.

Thank you for your time :hugegrin:
