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.