Multiple alpha tweens failing

Hello everyone! I’m some intermittent problems with the following function:

function alphaTween(subNav_mc:MovieClip):void {
var subTween:Tween;
subTween = new Tween(subNav_mc, “alpha”, Strong.easeOut, subNav_mc.alpha, 0, 1.5, true);
}

The issue is that this function is called a lot to fade the alpha property of multiple movieclips at once. I’ve even written multiple functions to see if that will help the problem (run 3 different functions contemporaneously). But the issue is that the tween fails at times. It just stops, midway. This doesn’t always happen, but it happens enough that it’s a problem.

Everything in this site is supposed to fade in and out. I don’t want to revert back to timeline tweens, but I’m thinking with this much alpha fading, it might be necessary?

Any suggestions would be greatly appreciated. Thanks!

  • R

[quote=reddronin;2358218]Hello everyone! I’m some intermittent problems with the following function:

function alphaTween(subNav_mc:MovieClip):void {
var subTween:Tween;
subTween = new Tween(subNav_mc, “alpha”, Strong.easeOut, subNav_mc.alpha, 0, 1.5, true);
}

The issue is that this function is called a lot to fade the alpha property of multiple movieclips at once. I’ve even written multiple functions to see if that will help the problem (run 3 different functions contemporaneously). But the issue is that the tween fails at times. It just stops, midway. This doesn’t always happen, but it happens enough that it’s a problem.

Everything in this site is supposed to fade in and out. I don’t want to revert back to timeline tweens, but I’m thinking with this much alpha fading, it might be necessary?

Any suggestions would be greatly appreciated. Thanks!

  • R[/quote]

Since there are multiple movieclips i think the childIndexes of the displayobjects are going for a toss. When a displayobject is added or removed the flash player recalculates the indexes and re allocates the indexes to the existing display object.