# Transitions - tween

**URL:** <https://forum.kirupa.com/t/transitions-tween/284357>\
**Category:** Uncategorized\
**Created:** [March 18, 2009, 12:33pm UTC](https://forum.kirupa.com/t/transitions-tween/284357 "2009-03-18T12:33:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![laertjansen](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@laertjansen](https://forum.kirupa.com/u/laertjansen)\
**Post date:** [March 18, 2009, 12:33pm UTC](https://forum.kirupa.com/t/transitions-tween/284357/1 "2009-03-18T12:33:08Z")

</div>

Hi everyone.

I´m working on a flash website and I gotta do something that I´ve never done. I´ve been researching on google, reading forums and downloading files but nothing is helping me up to now. Then I thought someone here could give me an idea of how to solve my problem. thanks a lot in advance.

I have 6 links(home + 5) and each of them when clicked will load one or more external swfs. How can I have an alpha transition when a button is clicked?  
So when you click on ‘biography’ for example, the previous content loaded will have a transition from alpha=100 to alpha = 0 while the biography page will be loaded from alpha=0 to alpha=100.

I´m working with tween. My **AS 2** is:

import mx.transitions.Tween;  
import mx.transitions.easing.\*;  
function moveDesloca(mc, escalax, escalay, posicaox, posicaoy) {  
var escalaxX:Object = new Tween(mc, “\_xscale”, Strong.easeOut, mc.\_xscale, escalax, 6, true);  
var escalayY:Object = new Tween(mc, “\_yscale”, Strong.easeOut, mc.\_yscale, escalay, 6, true);  
var posicaoxX:Object = new Tween(mc, “\_x”, Strong.easeOut, mc.\_x, posicaox, 3, true);  
var posicaoyY:Object = new Tween(mc, “\_y”, Strong.easeOut, mc.\_y, posicaoy, 5, true);  
}

//home  
function home() {  
moveDesloca(mc\_bgfotos,null,null,-1955,33);  
moveDesloca(mc\_menu,null,null,46.8,39.8);  
moveDesloca(mc\_base,null,null,9,566);

//bio  
function bio() {  
moveDesloca(mc\_bgfotos,null,null,-2995,33);  
moveDesloca(mc\_menu,null,null,510,39.8);

.  
.  
.  
home();  
\_root.mc\_menu.mc\_home.onRelease = home;  
\_root.mc\_menu.mc\_bio.onRelease = bio;  
\_root.mc\_menu.mc\_agenda.onRelease = agenda;  
\_root.mc\_menu.mc\_fotos.onRelease = fotos;  
\_root.mc\_menu.mc\_musicas.onRelease = musicas;  
\_root.mc\_menu.mc\_contato.onRelease = contato;  
\_root.mc\_menu.mc\_blog.onRelease = blog;

stop();

I´ve always used this code but loading external content without any transitions and now I´d like to make something better.

Thank you.
