[FMX]_alpha crossfade between 2 MC's Help

I have 2 movieClips that I want to fade.
mc 1 fades out while mc2 fades in. I want to do it in AS to keep my file size down, 'cause I will be having quite a few of this happing.

I know how to have one mc fade in using:
(I know this is a fade in and I can fadein/out individually)

speed = 10;
bigCalendar_mc.onEnterFrame = function() {
if (this._alpha<100) {
this._alpha += speed;
} else {
delete this.onEnterFrame;
}
};

But my brain is hurting trying to figure out how to get the two crossfading.

Many thanks!!
Dcell


speed = 10;
bigCalendar_mc.onEnterFrame = function() {
  if (this._alpha<100) {
    this._alpha += speed;
    myOtherMC._alpha = (100 - this._alpha);
  } 
  else {
    delete this.onEnterFrame;
  }
};

Hi,
Just insert this line of code :
[AS]instancename._alpha -=speed;[/AS]

after this :[AS]this._alpha += speed;[/AS]

That should do the trick

Cheers

SteveD

quick edit, just seen razz’s post, that code is far more effective - now why didn’t I think of that (lol)

Many thanks!!!
I was going a little nutz…ok…a lot nutz.

Much appreciate your help!!
Dcell(-:

Np problem :slight_smile: