# Multiple alpha tweens failing

**URL:** https://forum.kirupa.com/t/multiple-alpha-tweens-failing/265897
**Category:** Uncategorized
**Created:** [July 14, 2008, 12:27pm UTC](https://forum.kirupa.com/t/multiple-alpha-tweens-failing/265897 "2008-07-14T12:27:22Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![reddronin](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@reddronin](https://forum.kirupa.com/u/reddronin)
#### Post date: [July 14, 2008, 12:27pm UTC](https://forum.kirupa.com/t/multiple-alpha-tweens-failing/265897/1 "2008-07-14T12:27:22Z")

</div>

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

---

<div class="post-metadata">

### Author: ![flashdeva](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@flashdeva](https://forum.kirupa.com/u/flashdeva)
#### Post date: [July 14, 2008, 12:50pm UTC](https://forum.kirupa.com/t/multiple-alpha-tweens-failing/265897/2 "2008-07-14T12:50:07Z")

</div>

[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.
