Hi. Hoping someone can help me here. I have created a “banner” which cycles (using masks) a series of pictures on the main timeline. I also have 5 movieclips which move some text across (at different times) and then fade out (done with AS). All works great - the FIRST time thru. After that the images transition as expected but the AS movieclips, altho they start at the right time, seem to be already running and fading out the text as it comes on the screen - rather than fading as the setInterval did the first time thru. I am thinking that I need a Stop() somewhere but have tried everything (except the right thing obviously :te: ), but alas!
My main movie controls the images / masking using shape tweens etc. The code for my movieclips is below:
// RealInvest
this._alpha = 100;
this._visible = true;
this._x = 1050;
this._visible = true;
this.onEnterFrame = function() {
// move the text across the stage until it reaches it's target
if (this._x > _global.target) {
_global.speed = (_global.target - this._x)/_global.speedVar;
this._x += _global.speed;
// clear, then set a Timer and call function fadeImage
clearInterval(alpha_interval);
var alpha_interval:Number = setInterval(fadeClip, _global.timeBeforeFade, this);
}
else {
delete this.onEnterFrame;
this.gotoAndStop(1);
}
};
// functions
// Fade
function fadeClip(target_mc:MovieClip):Void {
if (_alpha > 0) {
target_mc._alpha -= _global.fadeRate;
}
else {
target_mc._visible = false;
}
}
I can send the .fla if necessary.