hey all - i’m trying to do a simple fade in function. Then after a certain amount of time, fade it out, fade the new one in, rinse, wash and repeat. I thought that this should work for the fade in portion but it doesn’t seem to do so.
Not quite sure where i’m going wrong.
I have an array of movieclips - i attachMovie and then try to run the function.
// array of movie clips
clipsArray = ["clip_1", "clip_2", "clip_3", "clip_4"];
// fade speed
speed = 10;
// fadeIn function
function fadeIn(target_mc) {
target_mc.onEnterFrame = function() {
this._alpha += speed;
if (this._alpha>=100) {
trace("fade in finished");
delete this.onEnterFrame;
}
};
}
// attach the movie. this works. if i set the _alpha to 50, it's clearly there.
attachMovie(clipsArray[2], clipsArray[2], -3, {_alpha:0});
// run the fadeIn
fadeIn(clipsArray[2]);
Thanks