# Dynamic image fade

**URL:** <https://forum.kirupa.com/t/dynamic-image-fade/58039>\
**Category:** Uncategorized\
**Created:** [July 19, 2004, 9:19am UTC](https://forum.kirupa.com/t/dynamic-image-fade/58039 "2004-07-19T09:19:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![phatbyte](https://avatars.discourse-cdn.com/v4/letter/p/5f9b8f/32.png) [@phatbyte](https://forum.kirupa.com/u/phatbyte)\
**Post date:** [July 19, 2004, 9:19am UTC](https://forum.kirupa.com/t/dynamic-image-fade/58039/1 "2004-07-19T09:19:44Z")

</div>

hello folks!

i need to fade some dynamic images one after the other in… how i do this?

```auto
this.imgs = ['oks.jpg','oks2.jpg'];
 
var x = 0;
var y = 0;

var i;
for (i in imgs) {	
	var t = this.createEmptyMovieClip ("thumbnail" + i, i);
	var c = t.createEmptyMovieClip ("picHolder", 0);
	var thumb = imgs*;
	c.loadMovie (thumb);
	c._x = x + (80 * i);
	c._y = y;
	c._alpha = 80;
}

```

[http://oliver.mopa.at/oks/oks\_intro.fla](http://oliver.mopa.at/oks/oks_intro.fla)

thanks in advance!  
oliver

---

<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 19, 2004, 11:48am UTC](https://forum.kirupa.com/t/dynamic-image-fade/58039/2 "2004-07-19T11:48:25Z")

</div>

```auto
this.imgs = ['oks.jpg','oks2.jpg','oks3.jpg'];
 
var x = 0;
var y = 0;
this.fadeSpeed = 20;

for (var i in imgs) {	
	var t = this.createEmptyMovieClip("thumbnail" + i, i);
    var c = t.createEmptyMovieClip("picHolder", 0);
    var thumb = imgs*;
    c.loadMovie(thumb);
    t._x = x + (80 * i);
    t._y = y;
	t._alpha = 0;
	if (this.t._alpha<100-this.fadeSpeed) {
		this.t._alpha += this.fadeSpeed;
	} else {
		this.t._alpha = 100;
	}
}

```

why this is not working? any ideas?

thanks

---

<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 19, 2004, 12:43pm UTC](https://forum.kirupa.com/t/dynamic-image-fade/58039/3 "2004-07-19T12:43:54Z")

</div>

```auto
this.imgs = ['oks.jpg','oks2.jpg','oks3.jpg'];
 
var x = 0;
var y = 0;

for (var i in imgs) {	
	var t = this.createEmptyMovieClip("thumbnail" + i, i);
    var c = t.createEmptyMovieClip("picHolder", 0);
    var thumb = imgs*;
    c.loadMovie(thumb);
    t._x = x + (80 * i);
    t._y = y;
	t._alpha = 0;
	t.onEnterFrame = function() {
    	if(t._alpha < 80){
    		t._alpha += 0.5;
    	}
	}
}

```

works now but only once!?

---

<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 19, 2004, 1:33pm UTC](https://forum.kirupa.com/t/dynamic-image-fade/58039/4 "2004-07-19T13:33:11Z")

</div>

Hi mate!!  
I think this may might help you.  
If i understand what you want, else, this is perfect!!

Go here:  
[http://www.kirupaforum.com/forums/showthread.php?t=63260](http://www.kirupaforum.com/forums/showthread.php?t=63260)

crackode

---

<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 19, 2004, 1:42pm UTC](https://forum.kirupa.com/t/dynamic-image-fade/58039/5 "2004-07-19T13:42:04Z")

</div>

hm this works for me but displays only one image with onEnterFrame any ideas?

```auto
t._alpha = 0;
t.onEnterFrame = function() {
  if(t._alpha < 80){
    t._alpha += 0.5;
  }
}

```
