# (AS3), page transition

**URL:** https://forum.kirupa.com/t/as3-page-transition/251587
**Category:** Uncategorized
**Created:** [February 10, 2008, 7:57pm UTC](https://forum.kirupa.com/t/as3-page-transition/251587 "2008-02-10T19:57:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![snickelfritz](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@snickelfritz](https://forum.kirupa.com/u/snickelfritz)
#### Post date: [February 10, 2008, 7:57pm UTC](https://forum.kirupa.com/t/as3-page-transition/251587/1 "2008-02-10T19:57:23Z")

</div>

Desired page behavior:  
→ slide into view when loaded,  
← slide out of view when another page is loaded.

With the current script I’m using, the current page simply vanishes when a new page slides in, which tends to destroy the illusion of pages moving on stage.

I suspect the solution is probably simple, but I’m having trouble figuring it out.  
This seems like it should be on page one of any “learn how to make a website with Flash” tutorial, but I’m having trouble figuring out a concise way to search for this.  
BTW, I’m using TweenLite(AS3) for animations, if that makes any difference.  
Thanks in advance.

my code:

```auto
this.b2.addEventListener ('click', function() {
	gotoAndStop ("page1");
	TweenLite.to(b2.bar, .2, {tint:null, alpha:0, ease:Linear.easeIn});
	TweenLite.to(b2.buttText, 2, {x:0, ease:Elastic.easeOut});
});

```

My first guess, which does not work:

```auto
this.b2.addEventListener ('click', function() {
	gotoAndStop (nextFrame, "page1");
	TweenLite.to(b2.bar, .2, {tint:null, alpha:0, ease:Linear.easeIn});
	TweenLite.to(b2.buttText, 2, {x:0, ease:Elastic.easeOut});
});

```
