# Loading and fading movie clips

**URL:** <https://forum.kirupa.com/t/loading-and-fading-movie-clips/115297>\
**Category:** Uncategorized\
**Created:** [July 7, 2004, 3:17pm UTC](https://forum.kirupa.com/t/loading-and-fading-movie-clips/115297 "2004-07-07T15:17:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlashInthePan](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@FlashInthePan](https://forum.kirupa.com/u/FlashInthePan)\
**Post date:** [July 7, 2004, 3:17pm UTC](https://forum.kirupa.com/t/loading-and-fading-movie-clips/115297/1 "2004-07-07T15:17:51Z")

</div>

Hi  
New to flash but not to programming. Need help on two things:  
If i need to load movie clips from library onto the stage one after the other. How do i make the second clip load only after the first stops playing. The main time line i have has only one frame.  
I need to make a movie clip on stage fade away using action script. I tried to use a loop to decrement the alpha value but flash discards the script saying that it would make the system unstable (it really does) . Any solutions or work arounds??

thanks in advance

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 7, 2004, 6:21pm UTC](https://forum.kirupa.com/t/loading-and-fading-movie-clips/115297/2 "2004-07-07T18:21:42Z")

</div>

use onEnterFrame actions:

```auto

//attachcode
_root.attachclip1.onEnterFrame = function() {
	this._alpha -= 10;
	if(this._alpha <= 0) {
		//attach second clip
		this.removeMovieClip();
	}
}

```

Hopefully thats helps 😃

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 8, 2004, 1:25am UTC](https://forum.kirupa.com/t/loading-and-fading-movie-clips/115297/3 "2004-07-08T01:25:10Z")

</div>

Thanks  
it works for two movie clips with fixed names. What if i want to go through a list of movies in the library (jpeg images stored as movie clips ) and make them appear and fade one by one? The main timeline is one frame so is the movie:) how do i keep running the piece of code above every time a new movie loads. I guess i can if i put some code in the first frame of every movie but i would like to avoid that
