# Problem with dynamic image fade

**URL:** <https://forum.kirupa.com/t/problem-with-dynamic-image-fade/193788>\
**Category:** Uncategorized\
**Created:** [July 18, 2006, 1:59pm UTC](https://forum.kirupa.com/t/problem-with-dynamic-image-fade/193788 "2006-07-18T13:59:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yodalr](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/yodalr/32/1816_2.png) [@yodalr](https://forum.kirupa.com/u/yodalr)\
**Post date:** [July 18, 2006, 1:59pm UTC](https://forum.kirupa.com/t/problem-with-dynamic-image-fade/193788/1 "2006-07-18T13:59:36Z")

</div>

Im trying to make a flash movie where the infinate number of images are loaded from external file. Then a loop is made from fading images.

Here’s the current code, any ideas how to make images fade one by one?

[AS]function fadinaway(){ var alpha\_interval:Number = setInterval(fadeImage, 50, target\_mc);  
function fadeImage(fadeeee:MovieClip):Void {  
fadeeee.\_alpha -= 5;  
if (fadeeee.\_alpha \<= 0) {  
fadeeee.\_visible = false;  
clearInterval(alpha\_interval);  
}  
}}

var n:Number = 0;  
this.createEmptyMovieClip(“target\_mc”, this.getNextHighestDepth());  
loadVariables(“params.txt”, target\_mc);  
function checkParamsLoaded() {  
if (target\_mc.done == undefined) {  
trace(“not yet.”);  
} else {  
for (i in target\_mc) {  
n = n+1;  
trace(target\_mc\*);  
duplicateMovieClip(target\_mc, “target\_mc2”+n, n);  
fadinaway()  
target\_mc.\_x = target\_mc.\_x+50;  
loadMovie(target\_mc\*, “target\_mc2”+n);  
trace(n);  
}  
clearInterval(param\_interval);  
}  
}  
var param\_interval:Number = setInterval(checkParamsLoaded, 100);  
[/AS]

external file:

```php

pilt1=http://www.helpexamples.com/flash/images/image1.jpg&pilt2=http://www.helpexamples.com/flash/images/image2.jpg&done="done"

```

current status:  
[http://www.zone.ee/bluescreen/vahetple\_0.1.html](http://www.zone.ee/bluescreen/vahetple_0.1.html)
