Okay so im tryíng to do the following.
- Ease the topcontent down.
- Fade it out and at the same time fade/load in an new top.swf.content.
How do i call this function with an button call? This is what i have now… Right now it does all this at the same time with no delay. So easing and alpha happens at the same time… Help me plz!!
//Easing… and setting alpha to zero…
function easeTo(tar) {
toppaper.onEnterFrame = function() {
this._yscale = tar-(tar-this._yscale)/1.2;
menuMc._y = this._y+this._height+1;
if (Math.abs(tar-this._yscale)<1) {
this._yscale = tar;
menuMc._y = this._y+this._height-1;
delete this.onEnterFrame;
}
this._alpha = 0-(0-this._alpha)/1.2;
if(Math.abs(this._alpha-0)<1){
this._alpha = 0;
delete this.onEnterFrame;
}
}
}
////////////////
//BUTTONS//
////////////////////////////////////////////////////////////////////
//STICKS TO THE TOP AND LOADS NEW MOVIES ONCLICK!//
//////////////////////////////////////////////////////////////////
menuMc.b1.onRelease = function() {
//loadMovie(“top.swf”,toppaper); //The new top movie that will load…
//_root.paper.loadMovie(“b1.swf”); //The new content movie that will load…
//fadeTo(0);
easeTo(45);
};