Randomly fade pictures in and out

What I’m trying to do is this. I want to fade pictures in and out, but randomly. Kinda like KrazyDad’s cloud fly through. I looked at the code for that, but couldn’t figure it out. I want to use an array to load the jpegs, and then cycle through it constantly.


randomPics = random (pics.length);

I just don’t know how to fade them in and out. I grabbed this from a fla that faded pictures in and out using buttons


fadeIn = function () {
	if (this._alpha <= 100) this._alpha += 5 ;
	else this.onEnterFrame = null ;
	// When the movie is fully visible, it doesn't do anything
}

fadeOut = function () {
	if (this._alpha >= 0) this._alpha -= 5 ;
	else this.removeMovieClip () ;
	// When the movie is invisible, it is removed
}

I’m very bad at this programming stuff, so any help is much appreciated. I think I might keep my hands away from programming after this. Actually I have 1 more thing I wanna do, but then I will! :thumb: